A080799 Number of divide by 2 and add 1 operations required to reach ...,7,8,4,2,1 when started at n.
6, 5, 8, 7, 7, 6, 10, 9, 9, 8, 9, 8, 8, 7, 12, 11, 11, 10, 11, 10, 10, 9, 11, 10, 10, 9, 10, 9, 9, 8, 14, 13, 13, 12, 13, 12, 12, 11, 13, 12, 12, 11, 12, 11, 11, 10, 13, 12, 12, 11, 12, 11, 11, 10, 12, 11, 11, 10, 11, 10, 10, 9, 16, 15, 15, 14, 15, 14, 14, 13, 15, 14, 14, 13, 14, 13, 13
Offset: 1
Links
- Cino Hilliard, The x+1 conjecture
Programs
-
PARI
xpcount2(n,p) = { for(x=1,n, p1 = x; f=0; ct=0; while(p1>1, if(p1%2==0,p1/=2; ct++,p1 = p1*p+1; ct++); if(p1==7, p2=7; if(p2%2==0,p2/=2,p2 = p2*p+1); if(p2 ==8 && p1 ==7,f=1) ); ); if(f,print1(ct" ")) ) }
Formula
a(n) = A023416(n+1) + floor(log_2(n+1)) + 4. - Ralf Stephan, Mar 03 2004
Comments