OFFSET
1,3
LINKS
Danny Rorabaugh, Table of n, a(n) for n = 1..10000
EXAMPLE
116 is in the list because 116 and 116^2 = 13456 do not use the digits 7, 8 or 9.
182 is not in the list because it uses the digit 8 (even though 182^2 = 33124 would be fine).
253 is not in the list because 253^2 = 6409 uses the digit 9.
MATHEMATICA
Select[Range@ 256, Total@ Take[DigitCount[#], {7, 9}] == 0 && Total@ Take[DigitCount[#^2], {7, 9}] == 0 &] (* Michael De Vlieger, Apr 17 2015 *)
PROG
(PARI) isok(n) = ((vecmax(digits(n)) <= 6) && (vecmax(digits(n^2)) <= 6)) || (n==0); \\ Michel Marcus, Feb 02 2016
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Danny Rorabaugh, Apr 15 2015
STATUS
approved