OFFSET
1,1
COMMENTS
Elements are squares of integers in (sqrt(41), sqrt(50)) * sqrt(10)^k without the leading 4 elements for nonnegative k. - David A. Corneth, May 20 2016
LINKS
Nathan Fox, Table of n, a(n) for n = 1..10000
EXAMPLE
84 is a member because 484 = 22^2 is a square.
0 is not a member because 40 is not a square.
sqrt(410) < 21 AND 22 < sqrt(500) < 23 so 21^2 = 441 and 22^2 = 484 give 41 and 84 respectively.
64 < sqrt(4100) < 65 AND 70 < sqrt(5000) < 71 so 65^2 = 4225, 66^2 = 4356, ..., 70^2 = 4900 give 225, 356, ..., 900 respectively. - David A. Corneth, May 20 2016
MAPLE
t1:=[];
for k from 1 to 30000 do
if issqr(k+4*10^length(k)) then t1:=[op(t1), k]; fi;
od;
t1;
MATHEMATICA
Select[Range[45000], IntegerQ[Sqrt[4 10^IntegerLength[#] + #]] &] (* Vincenzo Librandi, Feb 20 2020 *)
DeleteCases[(FromDigits[Drop[IntegerDigits[#], 1]]) & /@ Select[Range[3, 500]^2, IntegerDigits[#][[1]] == 4 && IntegerDigits[#][[2]] != 0 &], 0] (* Alonso del Arte, Feb 20 2020 *)
PROG
(PARI) a(n) = {my(k=1, t=0); while(n>k, n-=k; t++; k=floor(sqrt(50)*sqrt(10^t))- ceil(sqrt(41)*sqrt(10^t))+1); (ceil(sqrt(41)*sqrt(10^t))+n-1)^2%(40*10^t)} \\ David A. Corneth, May 20 2016
(Magma) [n: n in [1..50000 ] | IsSquare(Seqint(Intseq(n) cat Intseq(4)))]; // Vincenzo Librandi, Feb 20 2020
(Scala) (3 to 500).map(n => n * n).filter(n => n.toString.startsWith("4") && !n.toString.startsWith("40")).map(n => Integer.parseInt(n.toString.substring(1))) // Alonso del Arte, Feb 20 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved