<no subject>

N. J. A. Sloane njas at research.att.com
Mon Apr 26 23:02:31 CEST 2004


Henry asked:

>Can anyone interpret the sequece below?
>
>1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2
>1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 7 1 2 1 3 1 2 1 4 1 2 1 3
>1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2
>...

One way is to look it up in the OEIS, where one will find
an entry with 54 lines. This is one of the oldest sequences in the database:

%I A001511 M0127 N0051
%S A001511 1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,6,1,2,1,
%T A001511 3,1,2,1,4,1,2,1,3,1,2,1,5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,7,1,2,1,3,1,2,
%U A001511 1,4,1,2,1,3,1,2,1,5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,6,1,2,1,3,1,2,1,4,1
%N A001511 2^a(n) divides 2n. Or, a(n) = 2-adic valuation of 2n.
%C A001511 Number of steps to reach an integer starting with (n+1)/2 and using th
e map x -> x*ceiling(x) (cf. A073524).
%C A001511 a(n) = number of disk to be moved at n-th step of optimal solution to 
Tower of Hanoi problem (comment from Andreas M. Hinz (hinz(AT)appl-math.tu-muench
en.de)).
%C A001511 Shows which bit to flip when creating the binary reflected Gray code (
bits are numbered from the right, offset is 1) This is basically equivalent to Hi
nz's comment. - Adam Kertesz (adamkertesz(AT)worldnet.att.net), Jul 28 2001
%C A001511 a(n) is the number of digits that must be counted from right to left t
o reach the first 1 in the binary representation of n. For example, a(12)=3 digit
s must be counted from right to left to reach the first 1 in 1100, the binary rep
resentation of 12. - anon, May 17 2002
%C A001511 a(n) is the Hamming distance between n and n-1 (in binary). This is eq
uivalent to Kertesz's comments above. - Tak-Shing Chan (chan12(AT)alumni.usc.edu)
, Feb 25 2003
%C A001511 Let S(0) = {1}, S(n) = {S(n-1), S(n-1)-{x}, x+1} where x = last term o
f S(n-1); sequence gives S(infinity). - Benoit Cloitre (abcloitre(AT)wanadoo.fr),
 Jun 14 2003
%C A001511 The sum of all terms up to and including the first occurrence of m is 
2^m-1. - Donald Sampson (marsquo(AT)hotmail.com), Dec 01 2003
%C A001511 m appears every 2^m terms starting with the 2^(m-1)th term. - Donald S
ampson (marsquo(AT)hotmail.com), Dec 08 2003
%C A001511 Sequence read mod 4 gives A092412. - DELEHAM Philippe (kolotoko(AT)lag
oon.nc), Mar 28 2004
%D A001511 J.-P. Allouche and J. Shallit, The ring of k-regular sequences, Theore
tical Computer Sci., 98 (1992), 163-197.
%D A001511 F. Q. Gouvea, p-Adic Numbers, Springer-Verlag, 1993; see p. 23.
%D A001511 Flajolet, P.; Raoult, J.-C.; Vuillemin, J.; The number of registers re
quired for evaluating arithmetic expressions. Theoret. Comput. Sci. 9 (1979), no.
 1, 99-125.
%D A001511 A. M. Hinz, The Tower of Hanoi, in Algebras and combinatorics (Hong Ko
ng, 1997), 277-289, Springer, Singapore, 1999.
%D A001511 Problem 636, Math. Mag., 40 (1967), 164-165.
%H A001511 J.-P. Allouche and J. Shallit, <a href="http://www.math.uwaterloo.ca/~
shallit/Papers/as0.ps">The ring of k-regular sequences</a>, Theoretical Computer 
Sci., 98 (1992), 163-197.
%H A001511 J. Britton, <a href="http://ccins.camosun.bc.ca/~jbritton/jbhanoi.htm"
>Tower of Hanoi Solution</a>
%H A001511 J. C. Lagarias and N. J. A. Sloane, Approximate squaring (<a href="htt
p://www.research.att.com/~njas/doc/apsq.pdf">pdf</a>, <a href="http://www.researc
h.att.com/~njas/doc/apsq.ps">ps</a>), preprint, 2003.
%H A001511 R. Stephan, <a href="http://arXiv.org/abs/math.CO/0307027">Divide-and-
conquer generating functions. I. Elementary sequences</a>
%H A001511 R. Stephan, <a href="http://www.research.att.com/~njas/sequences/somed
cgf.html">Some divide-and-conquer sequences ...</a>
%H A001511 R. Stephan, <a href="http://www.research.att.com/~njas/sequences/dcgft
able.ps">Table of generating functions</a>
%H A001511 E. W. Weisstein, <a href="http://mathworld.wolfram.com/BinaryCarrySequ
ence.html">Link to a section of The World of Mathematics.</a>
%H A001511 E. W. Weisstein, <a href="http://mathworld.wolfram.com/RulerFunction.h
tml">Link to a section of The World of Mathematics.</a>
%H A001511 E. W. Weisstein, <a href="http://mathworld.wolfram.com/TowersofHanoi.h
tml">Link to a section of The World of Mathematics.</a>
%H A001511 <a href="http://www.research.att.com/~njas/sequences/Sindx_Bi.html#bin
ary">Index entries for sequences related to binary expansion of n</a>
%F A001511 a(2n+1) = 1; a(2n) = 1 + a(n). - DELEHAM Philippe (kolotoko(AT)lagoon.
nc), Dec 08 2003
%F A001511 a(n)=2-A000120(n)+A000120(n-1), n >= 1 - from Daniele Parisse (daniele
.parisse(AT)m.dasa.de).
%F A001511 a(n) = 1+ lg(abs(A003188(n)-A003188(n-1))), where lg is the base-2 log
arithm.
%F A001511 Multiplicative with a(p^e) = e+1 if p = 2; 1 if p > 2. - David W. Wils
on (davidwwilson(AT)comcast.net), Aug 01 2001.
%F A001511 For any real x > 1/2: lim N ->inf (1/N)*sum(n=1, N, x^(-a(n)))= 1/(2x-
1); also lim N ->inf (1/N)*Sum(n=1, N, 1/a(n))=ln(2). - Benoit Cloitre (abcloitre
(AT)wanadoo.fr), Nov 16 2001
%F A001511 s(n) = sum(k=1,n,a(k)) is asymptotic to 2*n since s(n)=2n-A000120(n). 
- Benoit Cloitre (abcloitre(AT)wanadoo.fr), Aug 31 2002
%F A001511 For any n>=0, for any m>=1, a(2^m*n+2^(m-1)) = m. - Benoit Cloitre, No
v 24 2002
%F A001511 a(n) = sum_{d divides n and d is odd} mu(d)*tau(n/d). - Vladeta Jovovi
c (vladeta(AT)Eunet.yu), Dec 04 2002
%F A001511 G.f.: A(x) = sum_{k=0..infinity} x^(2^k)/(1-x^(2^k)). - Ralf Stephan (
ralf(AT)ark.in-berlin.de), Dec 24 2002
%F A001511 a(1) = 1; for n > 1, a(n) = a(n-1)+(-1)^n*a(floor(n/2)). - Vladeta Jov
ovic (vladeta(AT)Eunet.yu), Apr 25 2003
%F A001511 Sum(k = 1 through n) a(k) = 2n - number of 1's in binary representatio
n of n. - Gary W. Adamson (qntmpkt(AT)yahoo.com), Jun 15 2003
%F A001511 A fixed point of the mapping 1->12; 2->13; 3->14; 4->15; 5->16; .... -
 DELEHAM Philippe (kolotoko(AT)lagoon.nc), Dec 13 2003
%F A001511 Product_{k>0}(1+x^k)^a(k) is g.f. for A000041(). - Vladeta Jovovic (vl
adeta(AT)Eunet.yu), Mar 26 2004
%e A001511 For example, 2^1|2, 2^2|4, 2^1|6, 2^3|8, 2^1|10, 2^2|12, ... giving th
e initial terms 1, 2, 1, 3, 1, 2, ...
%p A001511 A001511 := n->2-wt(n)+wt(n-1); # where wt is defined in A000120
%o A001511 (PARI) a(n)=sum(k=0,floor(log(n)/log(2)),floor(n/2^k)-floor((n-1)/2^k)
) (from R. Stephan)
%Y A001511 a(n) = A007814[ n ]+1, column 1 of table A050600. Cf. A018238. Sequenc
e read mod 2 gives A035263.
%Y A001511 From Marc LeBrun: A005187(n) = SUM a(k), k <= n.
%Y A001511 Cf. A003188, A065176, A050603, A007814, A007949.
%Y A001511 Cf. A005187.
%Y A001511 Sequence is bisection of A007814, A050603, A050604, A067029, A089309.
%Y A001511 Cf. A085058, A089080.
%K A001511 mult,nonn,nice,easy
%O A001511 1,2
%A A001511 njas

njas





More information about the SeqFan mailing list