OFFSET
1,2
COMMENTS
The first condition is added to avoid trivial solutions of the form a(k)*3^m, whose square, written in base 3, would just have 0's appended w.r.t. a(k)^2, and thus always have the digits 1 and 0.
An infinite subset of solutions is given by { 3^m+2; m>1 } U { 2*3^m+1; m>1 }.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..200
MATHEMATICA
Select[Range[10000], Mod[#, 3]!=0&&Max[IntegerDigits[#^2, 3]]<2&] (* Harvey P. Dale, May 17 2018 *)
PROG
(PARI) b=3; for(n=1, 9999, n%b||next; vecmax(digits(n^2, b))>1||print1(n", "))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, May 02 2015
STATUS
approved