login
First n-digit square in the digits of the golden ratio.
0

%I #12 Sep 15 2017 23:14:42

%S 1,16,484,576,12544,389376,3154176,31203396,31203396,32035600,

%T 59993644096

%N First n-digit square in the digits of the golden ratio.

%C Squares are allowed to have prefix 0 (see example).

%e a(4) = 576 is the first square that occurs in the sequence of the 4 decimal digits ...0576... with the index 48 in A001622.

%p Digits := 10000: p0 := evalf((1+sqrt(5))/2):for d from 1 to 20 do: id:=0:for

%p i from 0 to 50000 while(id=0) do :q0:=trunc(p0*10^(i+d-1)): x:= irem(q0,10^d):

%p if sqrt(x)=floor(sqrt(x)) then printf(`%d, `,x):id:=1: else fi:od:od:

%Y Cf. A001622.

%K nonn,base

%O 1,2

%A _Michel Lagneau_, Feb 20 2011