[seqfan] Re: Recursions in decimal expansions

Simon Plouffe simon.plouffe at gmail.com
Mon Sep 24 19:19:59 CEST 2012




hello every body,

  I made up a formula a while ago,
for every integer in fact, there is a way to
expand it into a power series,

for example, 97, 49 , 48, as follows,

                     1/97, "can be expanded with this serie"

                                    infinity
                                     -----    (n - 1)
                                      \      3
                             1/97 =    )     --------
                                      /        (2 n)
                                     -----   10
                                     n = 1

 > dec(49);
                     1/49, "can be expanded with this serie"

                                  infinity
                                   -----   /   (n - 1)\
                                    \      |2 2       |
                           1/49 =    )     |----------|
                                    /      |   (2 n)  |
                                   -----   \ 10       /
                                   n = 1

 > dec(98);
                     1/98, "can be expanded with this serie"

                                    infinity
                                     -----    (n - 1)
                                      \      2
                             1/98 =    )     --------
                                      /        (2 n)
                                     -----   10
                                     n = 1


I made a program based on an old formula I had,

######################################################
# program for the expansion of 1/p in powers of an integer
##############################################################
############# In Maple



dec:=proc(p)
local n, p1, p2, p3, p4, ex;
     ex := trunc(log10(p) + 1);
     p2 := trunc(10^ex/p);
     p3 := trunc(10^ex) - p*trunc(10^ex/p);
     p4 := ex*n;
     print(1/p, "can be expanded with this serie");
     return 1/p = Sum(p2*p3^(n - 1)/10^p4, n = 1 .. infinity)
end;


and for 9899 I get this formula :

1/9899, "can be expanded with this serie"

                 infinity
                  -----      (n - 1)
                   \      101
        1/9899 =    )     ----------
                   /         (4 n)
                  -----    10
                  n = 1

Best regards,

  Simon plouffe






More information about the SeqFan mailing list