login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A121480 Take b(0)=n, for i>0 if b(i-1) is odd prime then b(i)=(b(i-1)+1)/2 otherwise b(i)=b(i-1)+1. For all n sequence b(i) ends with 2. The sequence gives a(n) = a number of steps from n to 2, a(n)=i when b(i)=2. 0
2, 1, 0, 1, 3, 2, 5, 4, 9, 8, 7, 6, 6, 5, 12, 11, 10, 9, 9, 8, 10, 9, 8, 7, 17, 16, 15, 14, 13, 12, 12, 11, 14, 13, 12, 11, 10, 9, 13, 12, 11, 10, 10, 9, 21, 20, 19, 18, 20, 19, 18, 17, 16, 15, 18, 17, 16, 15, 14, 13, 13, 12, 18, 17, 16, 15, 14, 13, 14, 13, 12, 11, 11, 10, 17, 16, 15 (list; graph; refs; listen; history; internal format)
OFFSET

0,1

EXAMPLE

a(8)=9 because b(0)=8, b(1)=9, b(2)=10, 11, 6, 7, 4, 5, 3, b(9)=2;

a(10)=7 because b(0)=10, b(1)=11, 6, 7, 4, 5, 3, b(7)=2, etc

MATHEMATICA

b=c=1; re={{0, 2}, {1, 1}, {2, 0}}; Do[i=0; a=n; While[a!=2, i++; If[PrimeQ[a], a=(a+c)/2, a=a+b]]; AppendTo[re, i], {n, 3, 100}]; re

CROSSREFS

Sequence in context: A078806 A173438 A103493 * A082601 A077593 A119337

Adjacent sequences:  A121477 A121478 A121479 * A121481 A121482 A121483

KEYWORD

nonn

AUTHOR

Zak Seidov (zakseidov(AT)yahoo.com), Aug 02 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 23:53 EST 2012. Contains 205689 sequences.