|
| |
|
|
A057526
|
|
Number of applications of f to reduce n to 1, where f(k) is the integer among k/2,(k-1)/4, (k+1)/4.
|
|
6
| |
|
|
0, 1, 1, 2, 1, 2, 2, 3, 2, 2, 2, 3, 2, 3, 3, 4, 3, 3, 2, 3, 2, 3, 3, 4, 3, 3, 3, 4, 3, 4, 4, 5, 4, 4, 3, 4, 3, 3, 3, 4, 3, 3, 3, 4, 3, 4, 4, 5, 4, 4, 3, 4, 3, 4, 4, 5, 4, 4, 4, 5, 4, 5, 5, 6, 5, 5, 4, 5, 4, 4, 4, 5, 4, 4, 3, 4, 3, 4, 4, 5, 4, 4, 3, 4, 3, 4, 4, 5, 4, 4, 4
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 1,4
|
|
|
COMMENTS
| Also the number of zeros in the symmetric signed digit expansion of n with q=2 (i.e. the representation of n in the (-1,0,1)_2 number system). - Ralf Stephan (ralf(AT)ark.in-berlin.de), Jun 30 2003
Also the degree of the Stern polynomial B[n,t]. The Stern polynomials B[n,t] are defined by B[0,t]=0, B[1,t]=1, B[2n,t]=tB[n,t], B[2n+1,t]=B[n+1,t]+B[n,t] for n>=1 (see S. Klavzar et al. and A125184). - Emeric Deutsch (deutsch(AT)duke.poly.edu), Dec 04 2006
In this sequence, n occurs exactly 3^n times. - T. D. Noe, Mar 01 2011
|
|
|
REFERENCES
| C. Heuberger and H. Prodinger, On minimal expansions in redundant number systems: Algorithms and quantitative analysis, Computing 66(2001), 377-393.
S. Klavzar, U. Milutinovic and C. Petr, Stern polynomials, Adv. Appl. Math. 39 (2007) 86-95.
|
|
|
LINKS
| T. D. Noe, Table of n, a(n) for n = 1..10000
|
|
|
FORMULA
| a(1)=0, a(2n)=a(n)+1, a(4n-1)=a(n)+1, a(4n+1)=a(n)+1 for n>=1 (Klavzar et al. Proposition 12). - Emeric Deutsch (deutsch(AT)duke.poly.edu), Dec 04 2006
a(1)=0, a(2n)=a(n)+1, a(4n+1)=a(2n), a(4n+3)=a(2n+2) for n>=1 (Klavzar et al. Corollary 13). - Emeric Deutsch (deutsch(AT)duke.poly.edu), Dec 04 2006
|
|
|
EXAMPLE
| a(34)=4, which counts these reductions: 34->17->4->2->1.
|
|
|
MAPLE
| a:=proc(n) if n=1 then 0 elif n mod 2=0 then a(n/2)+1 elif n mod 4=1 then a((n-1)/2) else a((n+1)/2) fi end: seq(a(n), n=2..91); - Emeric Deutsch (deutsch(AT)duke.poly.edu), Dec 04 2006
|
|
|
PROG
| ep(r, n)=local(t); t=n/2^(r+2):floor(t+5/6)-floor(t+4/6)-floor(t+2/6)+floor(t+1/6):for(n=1, 100, p=0:for(r=0, floor(log2(3*n))-1, if(ep(r, n)==0, p=p+1)): if(1, print1(p", ")))
|
|
|
CROSSREFS
| Cf. A125184.
Sequence in context: A109129 A188550 A064122 * A033265 A096004 A193495
Adjacent sequences: A057523 A057524 A057525 * A057527 A057528 A057529
|
|
|
KEYWORD
| nonn
|
|
|
AUTHOR
| Clark Kimberling (ck6(AT)evansville.edu), Sep 03 2000
|
|
|
EXTENSIONS
| 0 prepended by T. D. Noe (noe(AT)sspectra.com), Feb 28 2011
|
| |
|
|