%I #8 Feb 06 2015 11:46:29
%S 1,2,4,5,7,22,43,131,394
%N Numbers n such that n and n^2 written in base 3 are zero-free.
%C No more terms < 3^20. - _Joshua Zucker_, Jun 05 2006
%e n: 1, 2, 4, 5, 7, 22, 43, 131, 394
%e n^2: 1, 4, 16, 25, 49, 484, 1849, 17161, 155236
%e n written in base 3: 1, 2, 11, 12, 21, 211, 1121, 11212, 112121
%e n^2 written in base 3: 1,11,121,221,1211,122221,2112111,212112121,21212221111
%t Select[Range[500],DigitCount[#,3,0]==DigitCount[#^2,3,0]==0&] (* _Harvey P. Dale_, Feb 06 2015 *)
%o (PARI) isok(n) = vecmin(digits(n, 3)) && vecmin(digits(n^2, 3)); \\ _Michel Marcus_, Oct 10 2013
%Y Subsequence of A032924.
%K base,more,nonn
%O 1,2
%A _Zak Seidov_, May 28 2006