login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A081879 Number of steps for convergence (to 1 or 3) for the process in A081878. 2
0, 1, 0, 2, 4, 1, 6, 3, 6, 5, 8, 2, 5, 7, 5, 4, 7, 7, 10, 6, 10, 9, 7, 3, 7, 6, 9, 8, 6, 6, 9, 5, 9, 8, 9, 8, 8, 11, 8, 7, 11, 11, 9, 10, 9, 8, 9, 4, 9, 8, 8, 7, 10, 10, 10, 9, 8, 7, 11, 7, 7, 10, 7, 6, 11, 10, 11, 9, 11, 10, 10, 9, 13, 9, 13, 12, 10, 9, 13, 8, 13, 12, 11, 12, 11, 10, 12, 11, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
EXAMPLE
For n = 33 we have 34,17,20,10,5,8,4,2,1 = 9 steps.
PROG
(PARI) countprp3(n) = { for(x=1, n, c=0; p1 = x; while(p1>1, if(p1%2==0, p1/=2, if(isprime(p1), p1+=3, p1 = p1+1; )); if(p1==3, break); c++; ); print1(c" ") )
(MIT Scheme) (define (A081879 n) (cond ((or (= 1 n) (= 3 n)) 0) ((even? n) (1+ (A081879 (/ n 2)))) ((isprime? n) (1+ (A081879 (+ n 3)))) (else (1+ (A081879 (1+ n))))))
CROSSREFS
Sequence in context: A360555 A249146 A225679 * A066248 A065164 A138124
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Apr 12 2003
EXTENSIONS
Edited by Antti Karttunen and Jud McCranie, Jun 03 2003
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 07:11 EDT 2024. Contains 371905 sequences. (Running on oeis4.)