OFFSET
1,3
COMMENTS
No additional terms up to 50000. - Harvey P. Dale, Nov 15 2011
No additional terms up to 100000. - Michel Marcus, Oct 16 2019
EXAMPLE
3^133 = 2865014852390475710679572105323242035759805416923029389510561523.
MAPLE
q:= n-> (s-> andmap(i-> s[i]<>s[i+1], [$1..length(s)-1]))(""||(3^n)):
select(q, [$0..200])[]; # Alois P. Heinz, Mar 07 2024
MATHEMATICA
Select[Range[0, 500], !MemberQ[Differences[IntegerDigits[3^#]], 0]&] (* Harvey P. Dale, Nov 15 2011 *)
PROG
(PARI) isok(n) = {my(d = digits(3^n), c = d[1]); for (i=2, #d, if (d[i] == c, return (0)); c = d[i]; ); return (1); } \\ Michel Marcus, Oct 16 2019
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Patrick De Geest, Sep 15 1999
STATUS
approved