OFFSET
1,2
COMMENTS
The number of terms less than 10^k: 1, 2, 3, 4, 5, 6, 19, 410, 8083, ... . - Robert G. Wilson v, Jan 06 2012
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..11523 (first 300 terms from David Applegate)
EXAMPLE
In 3648169, for 3 we can see 9, for 6 we can see 36, for 4 we can see 16, for 8 we can see 64, for 1 we can see 1 and for 9 we can see 81.
MATHEMATICA
fQ[n_] := (id = IntegerDigits@ n; Union[id][[1]] != 0 && Sort[ StringPosition[ ToString[n], ToString[#]] & /@ Evaluate[ id^2]][[1]] != {}); k = 0; lst = {}; While[k < 2*10^7, If[fQ@k, AppendTo[lst, k]; Print@ k]; k++] (* Robert G. Wilson v, Jan 06 2012 *)
PROG
For C++ program, see the Applegate link in A135463.
(Python)
sq = {d:str(int(d)**2) for d in "123456789"}
def ok(n): return "0" not in (s:=str(n)) and all(sq[d] in s for d in set(s))
print([k for k in range(10**7) if ok(k)]) # Michael S. Branicky, May 05 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Zak Seidov and N. J. A. Sloane, Feb 03 2008
EXTENSIONS
a(9) onwards computed by David Applegate, Feb 03 2008
STATUS
approved