

A173899


Nonnegative integers n with the property that the square of each digit of n is a substring of n^2.


1



0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 20, 21, 22, 30, 31, 33, 40, 41, 50, 55, 60, 70, 80, 90, 91, 100, 101, 102, 103, 104, 105, 110, 111, 112, 113, 115, 120, 121, 122, 130, 133, 142, 159, 191, 200, 201, 202, 203, 205, 210, 211, 220, 221, 222, 223, 233, 291, 300
(list;
graph;
refs;
listen;
history;
text;
internal format)



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^(i1)%100)))} \\ M. F. Hasler, Dec 24 2014


CROSSREFS

Sequence in context: A106039 A151767 A213517 * A108897 A023767 A023794
Adjacent sequences: A173896 A173897 A173898 * A173900 A173901 A173902


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



