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!)
A242942 Consider a number n with m decimal digits. The sequence lists the numbers n having the prefix of length m-1 in the middle of the decimal expansion of n^2. 1
23, 25, 27, 405, 441, 505, 605, 705, 760, 805, 905, 1005, 2005, 2434, 3005, 37600, 61613, 62500, 67947, 128891, 132715, 156255, 5654702, 6375451, 9256309, 9376000, 17135260, 379188333, 382287618, 393413185, 486327938, 492143192, 524552424, 668002006, 734491215, 824207645, 906250000, 930590837, 964940231 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
441 is in the sequence because 441^2 = 194481 and the prefix 44 is in the middle of the decimal expansion of 194481.
MATHEMATICA
lst={}; Do[a=IntegerDigits[n^2]; b=Length[a]; c=IntegerLength[(n-Mod[n, 10])/10]; If[EvenQ[b-c]&&FromDigits[Take[a, {(b-c)/2+1, (b+c)/2}]]==(n-Mod[n, 10])/10, AppendTo[lst, n]], {n, 23, 5*10^6}]; lst
PROG
(PARI) ok(n)={my(t=n^2, d=logint(n, 10), b=(1+logint(t, 10)-d)/2 ); d>0 && frac(b)==0 && t\10^b%10^d==n\10}
{ for(n=1, 10^6, if(ok(n), print1(n, ", "))) } \\ Andrew Howroyd, Mar 02 2020
CROSSREFS
Sequence in context: A263315 A240913 A095251 * A054865 A054795 A305469
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, May 28 2014
EXTENSIONS
Terms a(23) and beyond from Andrew Howroyd, Mar 02 2020
STATUS
approved

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 23 14:49 EDT 2024. Contains 371914 sequences. (Running on oeis4.)