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!)
A030676 Smallest nontrivial extension of n-th palindrome which is a square. 2

%I #8 Aug 12 2018 16:13:10

%S 16,25,36,49,529,64,729,81,900,1156,225,3364,441,55225,66049,7744,

%T 8836,99225,101124,111556,12100,131044,14161,15129,16129,17161,181476,

%U 191844,2025,212521,22201,232324,242064,25281,26244,27225

%N Smallest nontrivial extension of n-th palindrome which is a square.

%H Robert Israel, <a href="/A030676/b030676.txt">Table of n, a(n) for n = 1..10000</a>

%p revdigs:= proc(n)

%p local L, nL, i;

%p L:= convert(n, base, 10);

%p add(L[-i]*10^(i-1), i=1..nops(L));

%p end:

%p g:= proc(d) local m,x,y;

%p if d::even then

%p m:= d/2;

%p seq(x*10^m+revdigs(x),x=10^(m-1)..10^m-1)

%p else

%p m:= (d-1)/2;

%p seq(seq(x*10^(m+1)+y*10^m+revdigs(x),y=0..9),x=10^(m-1)..10^m-1)

%p fi

%p end proc:

%p g(1):= $1..9:

%p f:= proc(x) local d,y;

%p for d from 1 do

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

%p if y < (x+1)*10^d then return y fi

%p od;

%p end proc:

%p map(f, [g(1),g(2),g(3)]); # _Robert Israel_, Aug 12 2018

%Y Cf. A030677.

%K nonn,base,look

%O 1,1

%A _Patrick De Geest_

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 May 10 18:31 EDT 2024. Contains 372388 sequences. (Running on oeis4.)