OFFSET
1,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
MATHEMATICA
okQ[n_]:=MemberQ[Partition[NestWhileList[If[EvenQ[#], #/2, #+1]&, 3^n, #!=1&], 5, 1], {7, 8, 4, 2, 1}]; Select[Range[250], okQ] (* Harvey P. Dale, Aug 22 2011 *)
PROG
(PARI) xnp3(n, p) = { for(x=1, n, p3 = 3^x; while(p3>1, if(p3%2==0, p3/=2, p3 = p3*p+1; ); if(p3==7, print1(x" ")) ) ) }
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Mar 23 2003
STATUS
approved