OFFSET
1,1
COMMENTS
If n is in this sequence then so is 3n. - Charlie Neder, Feb 25 2019
LINKS
Charlie Neder, Table of n, a(n) for n = 1..49
PROG
(PARI) is1(n, R=divrem(3^logint(n, 3), n), S=0)={while(R[1]!=1&&!bittest(S, R[2]), S+=1<<R[2]; R=divrem(R[2]*3, n)); R[1]!=1||R[2]==0}
is2(n)={while(n, if(n%3>1, return(0)); n\=3); 1; }
for(n = 1, 1000000, if(is1(n), if(is2(n), , print(n)))) \\ Charlie Neder, Feb 26 2019, from programs for A121153 and A005836
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Feb 22 2010
EXTENSIONS
Data corrected by Charlie Neder, Feb 25 2019
STATUS
approved