login
A185299
First n-digit square in the digits of Pi.
0
1, 64, 841, 3844, 3600, 255025, 8133904, 36445369, 189585361, 7497308569, 42741014121, 391651924041
OFFSET
1,2
COMMENTS
Squares are allowed to have prefix 0 (see example).
EXAMPLE
a(5) = 3600 is the first square that occurs in the sequence of the 5 decimal digits ...03600... with the index 358 in A000796.
MAPLE
Digits := 10000: p0 := evalf(Pi):for d from 1 to 20 do: id:=0:for i from 0
to 50000 while(id=0) do :q0:=trunc(p0*10^(i+d-1)): x:= irem(q0, 10^d): if sqrt(x)=floor(sqrt(x)) then printf(`%d, `, x):id:=1: else fi:od:od:
MATHEMATICA
With[{p=RealDigits[Pi, 10, 2*10^6][[1]]}, FromDigits/@Table[ SelectFirst[ Partition[ p, n, 1], IntegerQ[Sqrt[FromDigits[#]]]&], {n, 12}]] (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, Oct 11 2015 *)
CROSSREFS
Cf. A000796.
Sequence in context: A236182 A164280 A232001 * A250281 A283547 A297686
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Feb 20 2011
EXTENSIONS
One more term (a(12)) from Harvey P. Dale, Oct 11 2015
STATUS
approved