cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A240455 Primorial expansion of Pi.

This page as a plain text file.
%I A240455 #33 Jul 20 2024 15:44:46
%S A240455 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,
%T A240455 47,65,91,83,9,92,123,44,73,32,140,102,28,75,108,30,139,4,127,88,57,
%U A240455 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
%N A240455 Primorial expansion of Pi.
%C A240455 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.
%H A240455 <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>
%H A240455 <a href="/index/Ph#Pi314">Index entries for sequences related to the number Pi</a>
%F A240455 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]
%e A240455 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.
%t A240455 pe = Block[{x = #, $MaxExtraPrecision = \[Infinity]},
%t A240455        Do[x = Prime[i] (x - Sow[x // Floor]) // Expand, {i, #2 - 1}];
%t A240455        x // Floor // Sow] // Reap // Last // Last // Function;
%t A240455 pe[\[Pi], 100]
%Y A240455 Cf. A000796 (decimal expansion), A075874 (factorial number system expansion).
%K A240455 nonn,base
%O A240455 0,1
%A A240455 _Albert Lau_, Apr 05 2014