|
|
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
|
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
|
|
|
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:
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|