PyMath #1 - When Dividorial and π Meet - Their Beautiful Relationship

Поделиться
HTML-код
  • Опубликовано: 20 янв 2025

Комментарии • 180

  • @NPCooking69
    @NPCooking69 4 года назад +35

    Hey you! Thanks for watching ! :D If you like what you saw, please share the video around :3 Love ya

    • @integralboi2900
      @integralboi2900 4 года назад +1

      You forgot to add the program in the description.

    • @PapaFlammy69
      @PapaFlammy69  4 года назад +2

      @@integralboi2900 Damn, thank you! It's been fixed now! =)

    • @MidnightStorm4990
      @MidnightStorm4990 4 года назад

      @@PapaFlammy69 I'm 16 and I'm really interested in math and learning python. Do you think I should attempt to learn this if I have barely any knowledge on python.

    • @Ou_dembele
      @Ou_dembele 3 года назад +1

      @@MidnightStorm4990 yes start learning

  • @nanare137
    @nanare137 4 года назад +61

    Introducing python coding and combining it with the maths on the board sounds good, I would love more of that. :)

    • @dr.peyamsfan7158
      @dr.peyamsfan7158 4 года назад +3

      Mee too

    • @PapaFlammy69
      @PapaFlammy69  4 года назад +7

      Definitely more to come soon! :) Thank you for your feedback! :)

    • @osman9750
      @osman9750 4 года назад

      Exactly my thoughts 👍

    • @JB-ym4up
      @JB-ym4up 4 года назад

      Python and n¡?
      Sounds like a skit about mathematicians that say n¡.

  • @AndrewDotsonvideos
    @AndrewDotsonvideos 4 года назад +38

    Hey last year you left your used napkin on my kitchen table. I still have it in case you want it back.

  • @VerrouSuo
    @VerrouSuo 4 года назад +29

    Dividorial is one of the silliest sounding terms I’ve ever heard of... but it’s starting to grow on me.

    • @PapaFlammy69
      @PapaFlammy69  4 года назад +3

      Same! :DDD

    • @trevorallen3212
      @trevorallen3212 4 года назад +1

      Just looking at the word has me going crazy pronouncing it.

    • @livedandletdie
      @livedandletdie 4 года назад +1

      I'm divided on the subject, but it's a factor, and that can I double down on.

    • @aasyjepale5210
      @aasyjepale5210 4 года назад +1

      Woah that escalated quickly...
      Or did it?

    • @trevorallen3212
      @trevorallen3212 4 года назад

      @@aasyjepale5210 exponentially or linearly?

  • @demetriuspsf
    @demetriuspsf 4 года назад +3

    YES! More dividorial vídeos. I still can't wrap my head around how awesome the notation for the dividorial is. Every time I think of the upside down exclamation I laugh.

    • @paulthiede
      @paulthiede 4 года назад +1

      same

    • @sergey1519
      @sergey1519 4 года назад +1

      ¿Qué quieres decir con eso? ¡Eso no es divertido!

  • @rupachakraborty3681
    @rupachakraborty3681 4 года назад +1

    Papa Flammy's Math video with Python programming.........it's worth more than gold. #pymath

  • @integralboi2900
    @integralboi2900 4 года назад +25

    Python? It thought this was a maths channel.
    Just kidding, these videos are interesting.

  • @MYCHEM1CALR0M4NCE
    @MYCHEM1CALR0M4NCE 4 года назад

    I've followed you for a few years now and this is one of my favourite videos you've made :))

  • @fractal_lynn
    @fractal_lynn 4 года назад +5

    Hey! I'd recommend using the Decimal class for longer decimals!
    Also python can handle converting to floating point automatically.
    the range in the for loop can specify an iteration, so "for i in range(x,1,-2): temp *= i" would solve the double factorial
    You can also slip expressions directly into the return statement!
    Some of the code that I wrote;
    def factorial( x, degree = 1 ):
    temp = 1
    for i in range( x, 1, -degree ): temp *= i
    return temp
    def dividorial( x ): return float( factorial( x, 2 ) / factorial( x - 1, 2 ) )
    You might be interested in Spyder, software included in the Anaconda package that comes with interesting packages built in for python data science.
    I am very impressed by how this converges to pi/2, this is incredible!
    I really enjoy your videos and look forward to more videos like this! :D

    • @PapaFlammy69
      @PapaFlammy69  4 года назад +2

      Thank you for the python bits and the information!!! :)

    • @fractal_lynn
      @fractal_lynn 4 года назад +1

      @@PapaFlammy69 Oh, and I apologize. I was mistaken for thinking pi/2 was Tau. Tau is actually 2pi, but I'm sure you already know that haha.
      Anyways, you might be interested to know Python has a built in complex number datatype. I used it to generate the fractal in my pfp lol.

    • @paulthiede
      @paulthiede 4 года назад

      @@fractal_lynn i thought that was just a zoomed in screenshot of the mandelbrot set. but yeah, i dont think the mandelbrot set looks like that, at least not exactly.

    • @fractal_lynn
      @fractal_lynn 4 года назад

      @@paulthiede Its a warped version of the mandelbrot set zoomed in to a specific spot; i.imgur.com/LmK5kow.png
      Also heres strictly the mandelbrot set with 1024 iterations per pixel; (7200x5400) i.imgur.com/l7JFxrH.png

    • @SugarBeetMC
      @SugarBeetMC 4 года назад +1

      @@fractal_lynn There is math.factorial().

  • @jfbb3369
    @jfbb3369 4 года назад +7

    I really liked the python part. I’m learning programming myself and this really helps understand math concepts in programming. Thanks Jens 😉

  • @dozzco2827
    @dozzco2827 4 года назад +3

    This video was incredibly interesting and incredibly fun to watch! Looking forward to more of this soon!

  • @eliyasne9695
    @eliyasne9695 4 года назад +31

    Seeing your video, one might mistakenly think that the limit notation was invented in the middle east.

  • @TheMahu13
    @TheMahu13 4 года назад +1

    Since an integer is either odd or even, you can simply right :
    if x%2 == 0 :
    ...
    else :
    ...
    Your video was really cool I like the addition of programming in it :) ! Keep it up

    • @sergey1519
      @sergey1519 4 года назад +1

      you can also do just:
      if x%2:
      ...
      else:
      ...
      but much cleaner solution was suggested for double factorial, that avoids cases altogether:
      df = 1
      for i in range(x, 1, -2):
      df *= i
      return df

  • @mkdk6831
    @mkdk6831 4 года назад +10

    Is there a way to write the dividorial as an integral formula just like the gamma- or pi function for the factorial?

    • @PapaFlammy69
      @PapaFlammy69  4 года назад +5

      haven't found one yet sadly :3

    • @aaronneugebauer4752
      @aaronneugebauer4752 4 года назад +1

      There exists an integral representation of 1/dividorial through n!!/(n-1)!!= Integral from 0 to pi/2 of sin(x)^n dx (*2/pi if n is even).
      So you can conclude that 1/divdorial=Integral from 0 to pi/2 sin(x)^n/((3*pi/4)+pi/4*(-1)^(n+1)) dx.
      WolframAlpha then gives an even better formular for dividorial with some transformations:
      www.wolframalpha.com/input/?i=1%2F%28%283*pi%2F4%29%2Bpi%2F4*%28-1%29%5E%28n%2B1%29%29+sin%28x%29%5En+dx+from+0+to+pi%2F2

    • @angelmendez-rivera351
      @angelmendez-rivera351 4 года назад

      Arjun Vyavaharkar I am not a fan of the fact that you defined a shifted version instead of simply defining an extension of the original. It is needlessly cumbersome.

    • @angelmendez-rivera351
      @angelmendez-rivera351 4 года назад

      Arjun Vyavaharkar *Use it or lose it*
      Nobody is going to be using such an arbitrary formula of an arbitrarily named function that doesn't really show up in applications. Also, I guess you're too damn immature to accept constructive criticism. It's not my fault you're so hopelessly arrogant.

    • @angelmendez-rivera351
      @angelmendez-rivera351 4 года назад

      Arjun Vyavaharkar *I don't care about what you think*
      And I don't care that you don't care. Grow up, kid.

  • @jack_papel
    @jack_papel 4 года назад +1

    12:00 I might be wrong but I'm pretty sure implications don't work like that

  • @SugarBeetMC
    @SugarBeetMC 4 года назад +1

    0:44 On the one hand, Pi. On the other hand, Py.

  • @m1kr0kosmos
    @m1kr0kosmos 4 года назад

    thanks for the python stuff. Since you, Lex Fridman & Andrew Dotson & 3B1B have some shared interest, I am surely not the only one hoping you all bro it out

  • @nitroh7745
    @nitroh7745 4 года назад

    I LOVE this new format it is amazing!! Thanks papa

  • @MathIguess
    @MathIguess 4 года назад +1

    I like the math + python format, it's nice
    Also, well made video, damn :D

  • @bmw123ck
    @bmw123ck 4 года назад

    Love python being introduced to the channel!!

  • @zh84
    @zh84 4 года назад +2

    Or just import scipy, which has a "factorial2" function that calculates the double factorial for you.

  • @gabriel7233
    @gabriel7233 4 года назад +2

    Why didn't you just made a loop from n to 1 with step -2 in dfac(x), it would be just df *= i and you wouldn't have to consider 2 cases

  • @budtastic1224
    @budtastic1224 4 года назад +4

    I've decided to call n!/(n-1)! the unfactorial

  • @davids841
    @davids841 4 года назад +1

    Using modulus two inside some of the loops can make for some much faster and nicer branchless coding. This would help if you were to try very large values of n.

  • @AggieRinse
    @AggieRinse 4 года назад

    Love the python/coding bits! More!

  • @hugh1643
    @hugh1643 4 года назад

    so 1/dividorial looks a bit like the integral of sin^n(x) or cos^n(x) from 0 to pi/2 just looking at the wikipedia page for double factorials.

  • @NathanThomasisepic
    @NathanThomasisepic 4 года назад +2

    You didn't have to split it up into odd and even cases. You can just do:
    def dfac(x):
    df = 1
    for i in range(x, 1, -2):
    df *= i
    return df
    This loops through the range from x to 1 and subtracts 2 for each iteration.

    • @PapaFlammy69
      @PapaFlammy69  4 года назад +2

      That is nice, I didn't know about that, thank you! :)

    • @VACatholic
      @VACatholic 4 года назад

      @@PapaFlammy69 No papa. Just do:
      def dfac(x):
      return prod(range(x,1,-2))
      "prod" is the product of all elements in a list, no need to write loops :(

    • @VACatholic
      @VACatholic 4 года назад

      no need to loop. Use "prod"

  • @mastershooter64
    @mastershooter64 4 года назад +6

    papa flammy are you gonna invent fractional rank tensors and fractional dimensional calculus in the next upload?

  • @fedebonons8453
    @fedebonons8453 4 года назад

    The CIAO at the end is poetry for my italian ears

  • @angelmendez-rivera351
    @angelmendez-rivera351 4 года назад

    Also, here are some relatively simple formulae that extend the dividorial to complex arguments via analytic continuation.
    z¡ = 1/sqrt(2)·(z/2)!/[(z - 1)/2!]·sqrt(π/2)^[cos(πz)/2]
    z¡ = 1/sqrt(2π)·2^z·sqrt(π/2)^[cos(πz)/4]·(z/2)!^2/z!
    z¡ = 1/sqrt(2π)·exp[ln(2)·z + ln(π/2)/4·cos(πz)]·Π(z/2)^2/Π(z)
    The second formula removes the quotient of difference from the first, just in case that this is preferrable, and expresses the dividorial more directly in terms of the factorial, and the third formula addresses notational concerns: namely, it uses the Π notation for complex numbers instead of using the factorial notation, which is, in most rigorous circles, reserved for natural numbers only, and it also addresses the concern that complex exponentiation is technically multivalued, and that the analytic exponential function should be used instead.

  • @torment808
    @torment808 4 года назад

    But what are their applications?

  • @elijahcamcam4611
    @elijahcamcam4611 4 года назад

    where do you buy a chalkboard

  • @matrefeytontias
    @matrefeytontias 4 года назад +7

    This `elif` with the entire test of whether x is odd after we already know it's not even hurts my little programmer heart. At least the cool math makes up for it ;_;

    • @paulthiede
      @paulthiede 4 года назад +1

      yeah, he could just have made an else. I noticed that as well and I dont understand it too.

    • @gabriel7233
      @gabriel7233 4 года назад

      He didn't even have to consider 2 cases and just made loop with step 2

    • @matrefeytontias
      @matrefeytontias 4 года назад +2

      Yeah, but for someone who's not a programmer and only follows the mathematical logic, it makes sense to have a disjunction of cases. Otherwise, just loop from n down to 1 exclusive in steps of 2 and multiply throughout.

    • @Daniel-nl3ug
      @Daniel-nl3ug 4 года назад +1

      This code makes sense because if it's not even, it could be a decimal, in which case it'd make sense to have an else statement and then raise an input error exception, papa just didn't include that part because it's not very relevant to the video.

    • @paulthiede
      @paulthiede 4 года назад

      @@Daniel-nl3ug you're right! i didnt think of that

  • @matthewcapstick6242
    @matthewcapstick6242 4 года назад

    At 7:48 is that a sin or a k or a h?

  • @MathIguess
    @MathIguess 4 года назад +5

    Bruh my math degree is killing me and then I watch more math to unwind
    What am I even? Lol

  • @PositronQ
    @PositronQ 4 года назад +1

    In the seco d Python program you can implement the code into a Github repository and I like This implementation

  • @Milldyria
    @Milldyria 4 года назад +2

    Is
    (ai)^2+(bi)^2=(ci)^2
    Or any sutch identity?

    • @paulthiede
      @paulthiede 4 года назад +1

      i mean
      (ai)² + (bi)² = aiai + bibi = -a² - b²
      and
      (ci)² = cici = -c² so -a² - b² = -c²
      which would be
      a² + b² = c² | *(-1).
      So just the pythagorean formular multiplied by -1.
      But then again its obvious that that would be true if you do the following:
      a² + b² = c² | *i²
      a²i² + b²i² = c²i² = (ai)² + (bi)² = (ci)².
      But because i²= -1 we are looping around with the same expressions.
      To answer your question,
      idk if there would be any use to your identity,
      but I think it would be a funny way of calculating the length of a hypothenuse in the 9th grade. :-)

    • @Milldyria
      @Milldyria 4 года назад

      @@paulthiede I was thinking about the dividorial. It would be very interesting to see if there are any identities with it.
      Like I dunno, pascals triangle but with dividorials.
      Or golden ratio in dividorials terms.

  • @dhoyt902
    @dhoyt902 4 года назад

    Hi Papa FM I have a question. You know how we accelerate summation series with partial sums(like Euler transform(ie van vigngaarden) and Shanks? Are there methods to accelerate this product? Or, would you have to treat the product as a series of repeated sums and then apply acceleration?

  • @OriginalSuschi
    @OriginalSuschi 4 года назад

    Ok so if we want to write the double factorial in terms of factorial, we would get this, right? :
    n!! = (2*(n/2))(2*(n/2 -1))...*(2*2)(2*1), which then equals to (n/2)!*2^(n/2)
    For even n's, right?

    • @paulthiede
      @paulthiede 4 года назад

      though im not sure I think you made an error with "2*(n/2-1)" I think it would need to be "2(n/2)-1" in order to be correct

    • @OriginalSuschi
      @OriginalSuschi 4 года назад

      Clashgamer04 if it was according to my assumption, for n=6 it would be:
      (2*(6/2))(2*(6/2 -1))(2*(6/2 -2))=(2*3)(2*2)(2*1), which is the thing PapaFlammy wrote as well.
      With your assumption it would be: (2*(6/2))(2*(6/2)-1)(2*(6/2)-2 = 2*3*2*5*2*4
      PapaFlammy already wrote (2*(n/2 - 1)) out to (2*n/2 -2)

    • @angelmendez-rivera351
      @angelmendez-rivera351 4 года назад +1

      Yes, n!! = 2^(n/2)·(n/2)! for even n is correct indeed.

  • @hugh1643
    @hugh1643 4 года назад +22

    this was stupid why not just print(math.pi/2) smh my head

  • @diegoalbertoduransalas4806
    @diegoalbertoduransalas4806 4 года назад

    that was so... clean!!

  • @Kdd160
    @Kdd160 4 года назад +10

    Lol 4:05 what is wafu do u mean wife?? 🤣🤣🤣🤣😂😂
    I think dividorial is pi's boyfriend and pi is dividorial's girlfriend what a beautiful relationship 😍😻💟
    And u pronounce 5 like FAF just like y as whayy(inspiriert von Ozarks bester Netflix-Serie)
    And u pronounce pi over 2 like paaaye over two ("""")

  • @Arnodorian6125
    @Arnodorian6125 4 года назад +3

    Pls do a live Q&A

  • @rokarus7658
    @rokarus7658 4 года назад

    So since we have lim ((2n)¡)^2/(2n+1) -> pi/2, does that mean that we have n¡ ~ n^1/2 ?

  • @paulthiede
    @paulthiede 4 года назад +1

    def double_fac(x):
    product = 1
    for i in range(x,1,-2):
    product = product * i
    return product
    This would also work as a double factorial

    • @VACatholic
      @VACatholic 4 года назад

      so would:
      def double_fack(x):
      return prod(range(x,1,-2))

  • @Milldyria
    @Milldyria 4 года назад +1

    What is the plot of
    Sin(xi) or cos(xi)?

    • @hughmungous1539
      @hughmungous1539 4 года назад +1

      Sinh(x) and cosh(x) respectively I'm pretty sure

    • @PapaFlammy69
      @PapaFlammy69  4 года назад

      kinda, yes

    • @angelmendez-rivera351
      @angelmendez-rivera351 4 года назад +1

      I think he meant the plot of sin(x¡) and cos(x¡). But honestly, there are no "good" continuous representations of the double factorial... let alone the dividorial. And no, I'm not counting that one strange continuous representation that Wikipedia uses for the double factorial. It hardly makes any sense to use, given the context.

  • @enzoqueijao
    @enzoqueijao 4 года назад

    He back
    ¡

  • @diegowielandt7089
    @diegowielandt7089 4 года назад

    great format

  • @angelmendez-rivera351
    @angelmendez-rivera351 4 года назад

    What I find neat about this is the fact that you unknowingly found a zeroth order asymptotic expansion for the dividorial. lim (2n)¡^2/(2n + 1) = π/2 implies lim (2n)¡/sqrt(2n + 1) = sqrt(π)/sqrt(2). sqrt(2n + 1) = sqrt(2)·sqrt(n + 1/2), so lim (2n)¡/sqrt(n + 1/2) = sqrt(π). Incidentally, this implies that lim (2n)¡/sqrt(n + 1/2) = (-1/2)!, so there is another cool connection between the dividorial and the factorial. Anyhow, the point I am making is that (2n)¡ ~ sqrt(π)·sqrt(n + 1/2), or equivalently, (2n)¡ = O(sqrt(n + 1/2)). This is useful because it gives you an understanding of growth that is now useful for calculating many other limits.

  • @hhtt37
    @hhtt37 4 года назад

    For python, maybe jupyter could be better for video, mixing live execution and cached results.
    Math plots could be enlightening!

  • @matron9936
    @matron9936 4 года назад

    But what is !i¡!?

  • @maksimpobedinsky5458
    @maksimpobedinsky5458 4 года назад +4

    nice

  • @victorrizkallah6014
    @victorrizkallah6014 4 года назад

    The python part is great

  • @OriginalSuschi
    @OriginalSuschi 4 года назад +1

    Wait but which dividorial definition do you mean here? 🚰
    Asking before watching the video

    • @angelmendez-rivera351
      @angelmendez-rivera351 4 года назад

      Why would you ask before the watching the video? That is so pointless.

    • @OriginalSuschi
      @OriginalSuschi 4 года назад

      Angel Mendez-Rivera yeah I know, but I like pointless things. Life is pointless as well... And I am 14 and this is deep

  • @iridium8562
    @iridium8562 4 года назад +6

    Im seriously getting pissed at youtube, i got this recommended but I wasn’t notified..? What..?

    • @PapaFlammy69
      @PapaFlammy69  4 года назад +1

      I hate it so god damn much :(((

  • @comradeelmo5272
    @comradeelmo5272 4 года назад +1

    I'm so used to visual studio it felt weird not seeing visual studio

  • @OmegaBlackjack
    @OmegaBlackjack 4 года назад

    Ok, why didn’t we just multiplied wa*2 to seek for π, not π/2 ? xD

  • @nnniv
    @nnniv 4 года назад +2

    Ayy python

  • @juansalazar6849
    @juansalazar6849 4 года назад

    Math goes wild

  • @tablonhobbs45
    @tablonhobbs45 4 года назад

    Still love ya, papa

  • @diederickfloor4261
    @diederickfloor4261 4 года назад +1

    Poopietorial

  • @michaelempeigne3519
    @michaelempeigne3519 4 года назад

    pi^2 does not equal g

  • @klofat
    @klofat 4 года назад

    do not mix up П and п.

  • @Supremebubble
    @Supremebubble 4 года назад +1

    I noticed

  • @djvalentedochp
    @djvalentedochp 4 года назад

    Nice

  • @phat5340
    @phat5340 4 года назад +4

    Papa flammy do you have depression ?

    • @PapaFlammy69
      @PapaFlammy69  4 года назад +4

      wat? Hell no lol

    • @phat5340
      @phat5340 4 года назад +4

      You look like you're having a Vietnam flashback on almost every video

    • @PapaFlammy69
      @PapaFlammy69  4 года назад +2

      xD

  • @Frankie13074
    @Frankie13074 4 года назад +1

    33th!!!

  • @sovietcat919
    @sovietcat919 4 года назад +1

    Papa answer this question I bet you can’t
    What’s 2+2

    • @PapaFlammy69
      @PapaFlammy69  4 года назад +1

      4 apples

    • @sovietcat919
      @sovietcat919 4 года назад +2

      @@PapaFlammy69 oh my
      I underestimated your intelligence

    • @PapaFlammy69
      @PapaFlammy69  4 года назад +1

      indeed my dear son.

    • @sovietcat919
      @sovietcat919 4 года назад +2

      @@PapaFlammy69 Dear Papa, I am sorry to inform you that the answer is actually 22 apples

  • @spaghetti1383
    @spaghetti1383 4 года назад

    Nice Jojo reference

  • @OonHan
    @OonHan 4 года назад

    haha yes

  • @ricardoparada5375
    @ricardoparada5375 4 года назад

    I never liked python syntax (c++/java looks so much better lmao) but this is still some really cool stuff

  • @mattchris3421
    @mattchris3421 4 года назад

    GENIUS likes to use blackboard not White board....using white board u become dumb cuz keep asking ' Why Board? '

  • @twiddle7125
    @twiddle7125 4 года назад

    May I make a suggestion to just slow down your speech just a little bit. Actually, you don't need to slow down, but you should take a breath between sentences, lol.

  • @tryphonunzouave8384
    @tryphonunzouave8384 4 года назад +3

    4 views 4 thumbs up, talk about ratio

  • @footballknight7
    @footballknight7 4 года назад +1

    I am second NGL!

  • @shlokmahajan8439
    @shlokmahajan8439 Год назад

    Hello bro love from India,your vedio helps a lot

  • @fujatv503
    @fujatv503 4 года назад

    *laughs in engineering* i havent understood a word you said, but i know that it is useless

    • @paulthiede
      @paulthiede 4 года назад +1

      is it really that hard? i mean i always though like "why is he explaining that 6/2 =3?"

    • @fujatv503
      @fujatv503 4 года назад

      @@paulthiede oh that is what he was trying to tell in this video, thanks for translating

  • @mudkip_btw
    @mudkip_btw 4 года назад +3

    I think a better name of the dividorial would be fictorial, short for fiction-orial, get it, fact-orial, fiction-orial cuz the dividorial is kind of made up ok imma leave

    • @mudkip_btw
      @mudkip_btw 4 года назад

      Do like the number pahhh

    • @mudkip_btw
      @mudkip_btw 4 года назад +1

      Please stop using the upside down ! :d just use a ?

    • @RealLifeKyurem
      @RealLifeKyurem 4 года назад

      Randy ? is already used for the termial, the addition version of the factorial. The function is introduced by Donald Knuth in 1997.
      Example:
      5? = 1 + 2 + 3 + 4 + 5
      5? = 15
      In general:
      n? = n(n+1)/2

    • @mudkip_btw
      @mudkip_btw 4 года назад

      @@RealLifeKyurem ah I didn't know that, ty

    • @integralboi2900
      @integralboi2900 4 года назад

      n. is a good option, but so is n, and maybe n;.

  • @VACatholic
    @VACatholic 4 года назад

    Your code sucks papa. You should just:
    def dfac(x):
    return prod(range(x,1,-2))
    I'm disappointed.