|
Search: id:A007814
|
|
|
| A007814 |
|
Exponent of highest power of 2 dividing n (the binary carry sequence). |
|
+0 147
|
|
| 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0
(list; graph; listen)
|
|
|
OFFSET
|
1,4
|
|
|
COMMENT
|
This sequence is an exception to my usual rule that when every other term of a sequence is 0 then those 0's should be omitted. In this case we would get A001511. - njas
To construct the sequence: start with 0,1, concatenate to get 0,1,0,1. Add + 1 to last term gives 0,1,0,2. Concatenate those 4 terms to get 0,1,0,2,0,1,0,2. Add + 1 to last term etc. - Benoit Cloitre (benoit7848c(AT)orange.fr), Mar 06 2003
a(n) = A091090(n-1) + A036987(n-1) - 1.
Fixed point of the morphism 0->01, 1->02, 2->03, 3->04, ..., n->0(n+1), ..., starting from a(1) = 0. - DELEHAM Philippe (kolotoko(AT)wanadoo.fr), Mar 15 2004
a(n) is also the number of times to repeat a step on an even number in the hailstone sequence referenced in the Collatz conjecture. - Alex T. Flood (whiteangelsgrace(AT)gmail.com), Sep 22 2006
Let F(n) be the n-th Fermat number (A000215). Then F(a(r-1)) divides F(n)+2^k for r=mod(k,2^n) and r != 1. - T. D. Noe (noe(AT)sspectra.com), Jul 12 2007
|
|
REFERENCES
|
K. Atanassov, On the 37-th and the 38-th Smarandache Problems, Notes on Number Theory and Discrete Mathematics, Sophia, Bulgaria, Vol. 5 (1999), No. 2, 83-85.
K. Atanassov, On Some of Smarandache's Problems, American Research Press, 1999, 16-21.
F. Smarandache, Only Problems, not Solutions!, Xiquan Publ., Phoenix-Chicago, 1993.
P. M. B. Vitanyi, An optimal simulation of counter machines, SIAM J. Comput, 14:1(1985), 1-33.
|
|
LINKS
|
T. D. Noe, Table of n, a(n) for n=1..10000
K. Atanassov, On Some of Smarandache's Problems
M. Hassani, Equations and inequalities involving v_p(n!), J. Inequ. Pure Appl. Math. 6 (2005) vol. 2, #29
M. L. Perez et al., eds., Smarandache Notions Journal
F. Smarandache, Only Problems, Not Solutions!.
R. Stephan, Some divide-and-conquer sequences ...
R. Stephan, Table of generating functions
Eric Weisstein's World of Mathematics, Link to a section of The World of Mathematics.
Eric Weisstein's World of Mathematics, Link to a section of The World of Mathematics.
Eric Weisstein's World of Mathematics, Binary
|
|
FORMULA
|
a(n) = if n is odd then 0 else 1 + a(n/2). - Reinhard Zumkeller (reinhard.zumkeller(AT)lhsystems.com), Aug 11 2001
Sum(k=1, n, a(k))=n-A000120(n) - Benoit Cloitre (benoit7848c(AT)orange.fr), Oct 19 2002
G.f.: A(x) = Sum(k=1, infinity, x^(2^k)/(1-x^(2^k))). - Ralf Stephan (ralf(AT)ark.in-berlin.de), Apr 10 2002
The sequence is invariant under the following two transformations: increment every element by one (1, 2, 1, 3, 1, 2, 1, 4, ..), put a zero in front and between adjacent elements (0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, ..). The intermediate result is A001511. - Ralf Hinze (ralf(AT)informatik.uni-bonn.de), Aug 26 2003
G.f. A(x) satisfies A(x) = A(x^2) + x^2/(1-x^2). A(x) = B(x^2) = B(x) - x/(1-x), where B(x) is the g.f. for A001151. - Frank Adams-Watters (FrankTAW(AT)Netscape.net), Feb 09 2006
Totally additive with a(p) = 1 if p = 2, 0 otherwise.
Dirichlet g.f.: zeta(s)/(2^s-1). - Ralf Stephan, Jun 17 2007
|
|
EXAMPLE
|
2^3 divides 24, so a(24)=3.
|
|
MAPLE
|
ord:=proc(n) local i, j; if n=0 then RETURN(0); fi; i:=0; j:=n; while j mod 2 <> 1 do i:=i+1; j:=j/2; od: i; end;
|
|
MATHEMATICA
|
p=2; Array[ If[ Mod[ #, p ]==0, Select[ FactorInteger[ # ], Function[ q, q[ [ 1 ] ]==p ], 1 ][ [ 1, 2 ] ], 0 ]&, 96 ]
DigitCount[BitXor[x, x - 1], 2, 1] - 1; a different version based on the same concept: Floor[Log[2, BitXor[x, x - 1]]] (from Jaume Simon Gispert (jaume(AT)nuem.com), Aug 29 2004)
Nest[ Flatten[ # /. a_Integer -> {0, a + 1}] &, {1}, 7] (from Robert G. Wilson v (rgwv(at)rgwv.com), Jan 24 2006)
|
|
PROGRAM
|
(PARI) a(n)=valuation(n, 2)
|
|
CROSSREFS
|
A053398(1, n)
a(n) = A001511[n]-1, column/row 1 of table A050602. Cf. A006519, A001511.
a(2n)=A050603(2n).
First differences of A011371. Bisection of A050605 and |A088705|.
Cf. A122840, A122841, A007949, A112765.
See A050603 and A136480 for a(n)+a(n+1).
This is Guy Steele's sequence GS(1,4) (see A135416).
Adjacent sequences: A007811 A007812 A007813 this_sequence A007815 A007816 A007817
Sequence in context: A103775 A093057 A065334 this_sequence A083280 A060689 A053119
|
|
KEYWORD
|
nonn,nice,easy
|
|
AUTHOR
|
John Tromp (tromp(AT)math.uwaterloo.ca)
|
|
|
Search completed in 0.004 seconds
|