login
Triangle of numbers obtained by reversing the first n digits of Pi and juxtaposing.
0

%I #7 Jan 14 2025 06:01:24

%S 3,1,3,4,1,3,1,4,1,3,5,1,4,1,3,9,5,1,4,1,3,2,9,5,1,4,1,3,6,2,9,5,1,4,

%T 1,3,5,6,2,9,5,1,4,1,3,3,5,6,2,9,5,1,4,1,3,5,3,5,6,2,9,5,1,4,1,3,8,5,

%U 3,5,6,2,9,5,1,4,1,3,9,8,5,3,5,6,2,9,5,1,4,1,3,7,9,8,5,3,5,6,2,9,5,1,4,1,3

%N Triangle of numbers obtained by reversing the first n digits of Pi and juxtaposing.

%e Triangle begins:

%e 3;

%e 1,3;

%e 4,1,3;

%e 1,4,1,3;

%e 5,1,4,1,3;

%e ... (reverse order of 3; 3.1; 3.14; 3.141; 3.1415; ...)

%t Module[{nn=20,pid},pid=RealDigits[Pi,10,(nn(nn+1))/2][[1]];Table[ Reverse[ Take[ pid,n]],{n,nn}]]//Flatten (* _Harvey P. Dale_, Aug 13 2019 *)

%o (PARI) a(n)=if(n<1,0,default(realprecision,n+2);floor(Pi*10^(n-1))%10);

%o b(n)=1+binomial(1+floor(1/2+sqrt(2*n)),2)-n;

%o for(n=1,120,print1(a(b(n))", "))

%Y Cf. A000796.

%K base,easy,nonn,tabl

%O 1,1

%A Herman Jamke (hermanjamke(AT)fastmail.fm), Jul 07 2004