login
A240455
Primorial expansion of Pi.
3
3, 0, 0, 4, 1, 8, 1, 0, 8, 19, 13, 10, 28, 29, 23, 30, 9, 32, 4, 26, 12, 27, 75, 28, 45, 30, 47, 65, 91, 83, 9, 92, 123, 44, 73, 32, 140, 102, 28, 75, 108, 30, 139, 4, 127, 88, 57, 182, 207, 172, 80, 126, 150, 232, 227, 19, 256, 238, 195, 44, 56, 58, 131, 160, 243, 222, 22, 47, 30, 226, 312, 130, 161, 68, 358, 52, 250, 152, 15, 38, 120, 195, 120, 263, 412, 115, 412, 427, 284, 361, 121, 413, 355, 75, 473, 355, 10, 177, 101, 71
OFFSET
0,1
COMMENTS
The primorial expansion a(n) of a real number x is defined as x = Sum_{i>=0} a(i) / prime(i)# where a(0) = floor(x) and 0 <= a(i) < prime(i) for all i > 0.
FORMULA
x(0) = Pi; a(n) = floor(x(n)) where x(n + 1) = prime(n + 1) * (x(n) - a(n)) and prime(n) = A000040(n) is the n-th prime number. [corrected by Rémy Sigrist, Jan 06 2019]
EXAMPLE
Pi = 3/prime(0)# + 0/prime(1)# + 0/prime(2)# + 4/prime(3)# + 1/prime(4)# + 8/prime(5)# + ... where prime(n)# = A002110(n) is the n-th primorial number.
MATHEMATICA
pe = Block[{x = #, $MaxExtraPrecision = \[Infinity]},
Do[x = Prime[i] (x - Sow[x // Floor]) // Expand, {i, #2 - 1}];
x // Floor // Sow] // Reap // Last // Last // Function;
pe[\[Pi], 100]
CROSSREFS
Cf. A000796 (decimal expansion), A075874 (factorial number system expansion).
Sequence in context: A364084 A288654 A259191 * A304263 A305223 A316801
KEYWORD
nonn,base
AUTHOR
Albert Lau, Apr 05 2014
STATUS
approved