Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A081879
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A081879 Number of steps for convergence (to 1 or 3) for the process in A081878. +0
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; listen)
OFFSET

1,4

EXAMPLE

For n = 33 we have 34,17,20,10,5,8,4,2,1 = 9 steps

PROGRAM

(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: A095247 A007734 A096907 this_sequence A066248 A065164 A138124

Adjacent sequences: A081876 A081877 A081878 this_sequence A081880 A081881 A081882

KEYWORD

easy,nonn

AUTHOR

Cino Hilliard (hillcino368(AT)gmail.com), Apr 12 2003

EXTENSIONS

Edited by Antti Karttunen (his-firstname.his-surname(AT)iki.fi) and Jud McCranie (j.mccranie(AT)comcast.net), Jun 03, 2003

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified July 26 13:41 EDT 2008. Contains 142293 sequences.


AT&T Labs Research