The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A277946 Squares whose largest decimal digit is 2. 13

%I #39 Sep 08 2022 08:46:17

%S 121,10201,12100,22201,1002001,1020100,1022121,1210000,1212201,

%T 2220100,100020001,100200100,100220121,102010000,102212100,121000000,

%U 121022001,121220100,210221001,222010000,10000200001,10002000100,10002200121,10020010000,10020210201

%N Squares whose largest decimal digit is 2.

%C A subsequence of A000290.

%C From _Robert Israel_, Nov 14 2016: (Start)

%C If n is a term, then so is 100*n.

%C The first term with an even number of digits is a(36) = 100021020121.

%C The first term with an even number of digits that is not of the form a(36)*100^k has at least 24 digits.

%C (End)

%H Chai Wah Wu, <a href="/A277946/b277946.txt">Table of n, a(n) for n = 1..10000</a> (terms n = 1..50 from Colin Barker, terms n = 51..474 from Robert Israel.

%F a(n) = A277959(n)^2. Intersection of A000290 and A277964. - _M. F. Hasler_, Nov 15 2017

%p res:= NULL: B:= [1,2]:

%p for m from 1 to 10 do

%p for q in B do

%p for x from ceil(sqrt(10^m*q)) to floor(sqrt(10^m*q + 2/9*(10^m-1))) do

%p if max(convert(x^2,base,10)) = 2 then res:= res, x^2 fi

%p od od:

%p for q in B do

%p for x from ceil(sqrt(10^(m+1)*q)) to floor(sqrt(10^(m+1)*q + 2/9*(10^(m+1)-1))) do

%p if max(convert(x^2,base,10)) = 2 then res:= res, x^2 fi

%p od od:

%p if m < 10 then B:= map(t -> (10*t,10*t+1,10*t+2),B) fi;

%p od:

%p res; # _Robert Israel_, Nov 14 2016

%t fQ[n_] := Union[ IntegerDigits[ n^2]][[-1]] == 2; Select[ Range@100500, fQ]^2 (* _Robert G. Wilson v_, Nov 06 2016 *)

%o (PARI) L=List(); for(n=1, 10000, if(vecmax(digits(n^2))==2, listput(L, n^2))); Vec(L)

%o \\ See A277959 for more efficient code. - _M. F. Hasler_, Nov 16 2017

%o (Magma) [n^2: n in [1..1000000] | Maximum(Intseq(n^2)) eq 2]; // _Vincenzo Librandi_, Nov 06 2016

%Y Cf. A000290, A277947, A277948, A277959.

%K nonn,base

%O 1,1

%A _Colin Barker_, Nov 05 2016

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 21 07:02 EDT 2024. Contains 372729 sequences. (Running on oeis4.)