login
This site is supported by donations 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

Table of n, a(n) for n=1..89.

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

Cf. A081878, A006577.

Sequence in context: A096907 A249146 A225679 * A066248 A065164 A138124

Adjacent sequences:  A081876 A081877 A081878 * A081880 A081881 A081882

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 25 06:26 EDT 2019. Contains 324347 sequences. (Running on oeis4.)