

A246009


Length of Collatz cycles '3*n + 1' of prime numbers.


1



2, 8, 6, 17, 15, 10, 13, 21, 16, 19, 107, 22, 110, 30, 105, 12, 33, 20, 28, 103, 116, 36, 111, 31, 119, 26, 88, 101, 114, 13, 47, 29, 91, 42, 24, 16, 37, 24, 68, 32, 32, 19, 45, 120, 27, 120, 40, 71, 14, 35, 84, 53, 22, 66, 123, 79, 30, 43, 17, 43, 61, 118, 38, 87, 131, 38, 25, 113, 126, 33, 126, 51, 46, 20, 59
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

Define a Collatz cycle C(prime(n)) = {c(z+1) = c(z)/2 if c(z) mod 2 = 0, otherwise c(z+1) = 3*c(z) + 1}, z >= 1, c(1) = prime(n), n >= 1}; then the length of C(prime(n)) depends only on the starting point c(1) if C ends with c(z) = 1. The length of C(prime(n)) is z, so a(n) = z.
The longest C(prime(n)) out of 10^5 prime numbers is C(prime(96648)) = C(1252663) with a(96648) = 510.
Until now C is not proved mathematically. So if the ending point c(z) is not equal to 1 then C(prime(n)) is not a 'true' Collatz cycle or does not exist.


LINKS

Freimut Marschner, Table of n, a(n) for n = 1..100000


FORMULA

a(n) = z where {c(z+1) = c(z)/2 if c(z) mod 2 = 0, otherwise c(z+1) = 3*c(z) + 1}, z >= 1, c(1) = prime(n), n >= 1}, a(n) = A006577(prime(n)) + 1 = A070975(n) + 1.


EXAMPLE

a(1) = {c(1) = prime(1) = 2, 2 mod 2 = 0, c(2) = 2/2 = 1, z=2} = 2;
a(3) = {c(1) = prime(3) = 5, 5 mod 2 = 1, c(2) = 3*5 + 1 = 16; 16 mod 2 = 0, c(3) = 16/2 = 8; 8 mod 2 = 0, c(4) = 8/2 = 4; 4 mod 2 = 0, c(5) = 4/2 = 2; 2 mod 2 = 0, c(6) = 2/2 = 1, z=6} = 6.


PROG

(PARI) a(n)=n=prime(n); A=List; while(n != 1, listput(A, n); if(n%2==0, n=n/2, n=3*n+1)); listput(A, 1); return(#Vec(A)) \\ Edward Jiang, Sep 06 2014


CROSSREFS

A006577 (Number of halving and tripling steps to reach 1 in '3x+1' problem), A070975 (Number of steps to reach 1 in '3x+1' (or Collatz) problem starting with prime(n)).
Sequence in context: A019186 A019187 A019243 * A100871 A111860 A278160
Adjacent sequences: A246006 A246007 A246008 * A246010 A246011 A246012


KEYWORD

nonn


AUTHOR

Freimut Marschner, Aug 12 2014


STATUS

approved



