OFFSET
1,1
COMMENTS
When a(n) is not zero, a(n) is even if p=1 (mod 6); a(n) is odd if p=5 (mod 6). If we let q=(p*2^k-1)/3 be a prime generated by p for some k>0, then the first prime number after q in the Collatz iteration of q is p. When k=1, q is less than p. The primes, other than 3, for which a(n)=0 are in A177331.
MATHEMATICA
Table[p=Prime[n]; If[p==3, k=0, k=1; While[q=(p*2^k-1)/3; k<10000 && !PrimeQ[q], k++ ]]; k, {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, May 08 2010
STATUS
approved