%I #3 Aug 13 2019 11:53:03
%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 3; 1,3; 4,1,3; 1,4,1,3; 5,1,4,1,3;... (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); b(n)=1+binomial(1+floor(1/2+sqrt(2*n)),2)-n; 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
|