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!)
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

%I #2 Mar 30 2012 17:26:21

%S 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,

%T 12,12,11,14,13,12,11,10,9,13,12,11,10,10,9,21,20,19,18,20,19,18,17,

%U 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

%N 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.

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

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

%t 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

%K nonn

%O 0,1

%A _Zak Seidov_, Aug 02 2006

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 25 06:49 EDT 2024. Contains 371964 sequences. (Running on oeis4.)