A276111 Decimal expansion of Pi truncated to numbers such that the partial sums of the decimal digits are perfect squares.
31, 3141, 3141592, 314159265, 31415926535897932384626433
Offset: 1
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..17
Programs
-
Mathematica
L=Rest@FoldList[Plus,0,First@RealDigits[Pi,10,500]];Do[If[IntegerQ[Sqrt[L[[n]]]],Print[FromDigits[First@RealDigits[Pi,10,n]]]],{n,500}] Module[{nn=50,pid,ac,po},pid=RealDigits[Pi,10,nn][[1]];ac=Accumulate[pid];po=Flatten[Position[ac,?(IntegerQ[Sqrt[#]]&)]];FromDigits/@ Table[ Take[ pid,k],{k,po}]] (* _Harvey P. Dale, May 24 2019 *)
Comments