login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A249896 a(n+1) is next smallest square not divisible by 10 beginning with a(n), initial term is 6. 5

%I #18 Nov 25 2020 14:45:44

%S 6,64,64009,6400960036,640096003602877347904,

%T 640096003602877347904912233550482787380625,

%U 6400960036028773479049122335504827873806251020537411455326101704116338781035920283225

%N a(n+1) is next smallest square not divisible by 10 beginning with a(n), initial term is 6.

%C a(11) has 1374 digits, a(12) has 2749, a(13) has 5499, a(14) has 10998. - _Robert Israel_, Nov 25 2020

%H Robert Israel, <a href="/A249896/b249896.txt">Table of n, a(n) for n = 1..10</a>

%H Robert Israel, <a href="/A249896/a249896.txt">Table of n, a(n) for n = 1..14</a>

%p R:= 6: x:= 6: s:= 2:

%p for iter from 1 while length(x) < 1000 do

%p for d from 1 do

%p if d::even then sp:= 1+ 10^(d/2)*s

%p else

%p sp:= ceil(sqrt(10^d*x));

%p if sp mod 10 = 0 then sp:=sp+1; fi

%p fi;

%p if sp^2 < (x+1)*10^d then

%p x:= sp^2; s:= sp; R:= R, x; break

%p fi

%p od;

%p od:

%p R; # _Robert Israel_, Nov 25 2020

%o (PARI) a(n)=k=n; s=1; while(s<5*10^7, if(s%10, if(s^2\(10^(#Str(s^2)-#Str(k)))==k, print1(s^2, ", "); k=s^2)); s++)

%o a(7)

%o (Python)

%o def f(x):

%o ..print(x, end=', ')

%o ..n = x

%o ..s = 1

%o ..while s < 10**7:

%o ....if s % 10:

%o ......S = str(s**2)

%o ......if S.startswith(str(n)):

%o ........print(s**2, end=', ')

%o ........n = s**2

%o ....s += 1

%o f(7)

%Y Cf. A048559, A048561.

%K nonn,base

%O 1,1

%A _Derek Orr_, Nov 08 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 09:19 EDT 2024. Contains 371782 sequences. (Running on oeis4.)