OFFSET
1,1
COMMENTS
k can only begin with 1, 2 or 3 and k mod 10 can only equal 1, 2 or 5. - Robert G. Wilson v, Apr 13 2015
Heuristics suggest that this sequence should be infinite and the sequence with 4 in place of 5 should be finite. The latter sequence contains no terms up to 10^30. - Charles R Greathouse IV, Mar 20 2022
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..2000 (n = 1..75 from Robert G. Wilson v).
MATHEMATICA
fQ[n_] := Block[{c = DigitCount@ n}, And[Plus @@ Take[c, {6, 10}] == 0, c[[1]] > 0, c[[5]] > 0]]; Select[Range@ 100000, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 12 2015 *)
fQ[n_] := Block[{id1 = Union@ IntegerDigits[ n], id2 = Union@ IntegerDigits[ n^2]}, Min[id1] == Min[id2] == 1 && Max[id1] == Max[id2] == 5]; k = 1; lst = {}; While[k < 10^7, If[ fQ@ k, AppendTo[lst, k]]; k++; If[ fQ@ k, AppendTo[lst, k]]; k += 3; If[ fQ@ k, AppendTo[lst, k]]; k += 6]; lst (* Robert G. Wilson v, Apr 13 2015 *)
PROG
(PARI) is(n) = vecmin(digits(n))==1 && vecmin(digits(n^2))==1 && vecmax(digits(n))==5 && vecmax(digits(n^2))==5
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Felix Fröhlich, Apr 12 2015
STATUS
approved