OFFSET
1,3
COMMENTS
From Farideh Firoozbakht, Dec 24 2014: (Start)
1. If n is in the sequence then 10*n is in the sequence.
2. All repdigit numbers with digits 1, 2, 3 and 5 are in the sequence. (End)
LINKS
M. F. Hasler, Table of n, a(n) for n = 1..1000
EXAMPLE
91 is in the list because 9^2=81 and 1^2=1 are substrings of 91^2=8281.
MAPLE
for i from 0 to 9 do
Sq[sprintf("%d", i)]:= sprintf("%d", i^2)
od:
f:= proc(n)
uses StringTools;
local L, T;
L:= convert(Explode(sprintf("%d", n)), set);
T:= sprintf("%d", n^2);
andmap(t -> Search(Sq[t], T) <> 0, L);
end proc:
select(f, [$1..1000]); # Robert Israel, Dec 24 2014
PROG
(PARI) is(n)={!#setminus(setminus(apply(t->t^2, d=Set(digits(n))), Set(digits(n2=n^2))), Set(vector(#Str(n2)-1, i, n2\10^(i-1)%100)))} \\ M. F. Hasler, Dec 24 2014
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Claudio Meller, Mar 01 2010
EXTENSIONS
Initial term a(1)=0 added by M. F. Hasler, Dec 25 2014
STATUS
approved