Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A029931
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A029931 If 2n = Sum 2^e_i, a(n) = Sum e_i. +0
12
0, 1, 2, 3, 3, 4, 5, 6, 4, 5, 6, 7, 7, 8, 9, 10, 5, 6, 7, 8, 8, 9, 10, 11, 9, 10, 11, 12, 12, 13, 14, 15, 6, 7, 8, 9, 9, 10, 11, 12, 10, 11, 12, 13, 13, 14, 15, 16, 11, 12, 13, 14, 14, 15, 16, 17, 15, 16, 17, 18, 18, 19, 20, 21, 7, 8, 9, 10, 10, 11, 12, 13, 11, 12, 13, 14, 14, 15, 16 (list; graph; listen)
OFFSET

0,3

COMMENT

Write n in base 2, n = sum b(i)*2^(i-1), then a(n) = sum b(i)*i - Benoit Cloitre (benoit7848c(AT)orange.fr), Jun 09 2002

May be regarded as a triangular array read by rows, giving weighted sum of compositions in standard order. The standard order of compositions is given by A066099. - Franklin T. Adams-Watters (FrankTAW(AT)Netscape.net), Nov 06 2006

LINKS

T. D. Noe, Table of n, a(n) for n=0..1023

J.-P. Allouche and J. Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197, ex. 10.

FORMULA

a(n) =a(n-2^L(n))+L(n)+1 [where L(n)=floor[log_2(n)]=A000523(n)] = sum of digits of A048794 [at least for n<512] - Henry Bottomley (se16(AT)btinternet.com), Mar 09 2001

a(1)=0, a(2n) = a(n)+e1(n), a(2n+1) = a(2n)+1, where e1(n) = A000120(n). a(n) = log2(A029930(n)). - Ralf Stephan, Jun 19 2003

G.f. 1/(1-x) * sum(k>=0, (k+1)*x^2^k/(1+x^2^k)). - Ralf Stephan (ralf(AT)ark.in-berlin.de), Jun 23 2003

EXAMPLE

14 = 8+4+2 so a(7) = 3+2+1 = 6.

Composition number 11 is 2,1,1; 1*2+2*1+3*1 = 7, so a(11) = 7.

The triangle starts:

0

1

2 3

3 4 5 6

PROGRAM

(PARI) for(n=0, 100, l=length(binary(n)); print1(sum(i=1, l, component(binary(n), i)*(l-i+1)), ", "))

CROSSREFS

Cf. A059867, A073642.

Other sequences that are built by replacing 2^k in the binary representation with other numbers: A089625 (primes), A059590 (factorials), A022290 (Fibonacci).

Cf. A066099, A070939, A124757, A011782 (row lengths), A001793 (row sums).

Sequence in context: A114539 A156562 A007998 this_sequence A022290 A103827 A094182

Adjacent sequences: A029928 A029929 A029930 this_sequence A029932 A029933 A029934

KEYWORD

nonn,easy,nice,tabf

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com).

EXTENSIONS

More terms from Erich Friedman (erich.friedman(AT)stetson.edu).

page 1

Search completed in 0.003 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 24 19:42 EST 2009. Contains 167435 sequences.


AT&T Labs Research