login
A078681
Start with n; iterate the process x -> ceiling(3x/2) until reach a prime. Sequence gives number of steps to reach a prime or 0 if no prime is ever reached.
1
1, 1, 1, 53, 5, 52, 1, 4, 51, 2, 1, 3, 39, 50, 1, 162, 3, 2, 1, 38, 49, 4, 2, 161, 50, 2, 1, 52, 4, 37, 1, 48, 3, 13, 1, 160, 9, 49, 1, 8, 42, 51, 18, 3, 36, 8, 1, 47, 3, 2, 12, 35, 27, 159, 1, 8, 48, 2, 1, 7, 4, 41, 50, 16, 17, 2, 1, 35, 7, 13, 1, 46, 11, 2, 1, 3, 11, 34, 2, 26, 158, 7, 6, 7
OFFSET
1,4
PROG
(PARI) a(n)=if(n<0, 0, s=n; c=1; while(isprime(ceil(3*s/2))==0, s=ceil(3*s/2); c++); c)
CROSSREFS
Cf. A050412.
Sequence in context: A367821 A051320 A232126 * A143294 A143428 A143385
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Dec 17 2002
STATUS
approved