login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Consider a number n with m decimal digits. The sequence lists the numbers n having the suffix of length m-1 in the middle of the decimal expansion of n^2.
1

%I #4 May 31 2014 00:54:07

%S 10,20,28,30,100,200,300,302,304,306,308,511,839,864,1000,1100,1500,

%T 1600,2000,2100,2438,2500,2600,3000,3002,3004,3006,3008,3100,5099,

%U 7046,8020,8073,9082,10000,20000,30000,30002,30004,30006,30008,30604,35000,36000

%N Consider a number n with m decimal digits. The sequence lists the numbers n having the suffix of length m-1 in the middle of the decimal expansion of n^2.

%e 511 is in the sequence because 511^2 = 261121

%e and the suffix 11 is in the middle of the decimal expansion of 261121.

%t lst={};Do[a=IntegerDigits[n^2];b=Length[a];l=IntegerLength[n]-1;c=IntegerLength[Mod[n,10^l]];If[Mod[n,10^l]==0,c=1];If[EvenQ[b-c]&&FromDigits[Take[a,{(b-c)/2+1,(b+c)/2}]]==Mod[n,10^l],AppendTo[lst,n]],{n,10,10^6}];lst

%Y Cf. A000290, A242942.

%K nonn,base

%O 1,1

%A _Michel Lagneau_, May 28 2014