Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A087808
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A087808 a(0) = 0; a(2n) = 2a(n), a(2n+1) = a(n) + 1. +0
5
0, 1, 2, 2, 4, 3, 4, 3, 8, 5, 6, 4, 8, 5, 6, 4, 16, 9, 10, 6, 12, 7, 8, 5, 16, 9, 10, 6, 12, 7, 8, 5, 32, 17, 18, 10, 20, 11, 12, 7, 24, 13, 14, 8, 16, 9, 10, 6, 32, 17, 18, 10, 20, 11, 12, 7, 24, 13, 14, 8, 16, 9, 10, 6, 64, 33, 34, 18, 36, 19, 20, 11, 40, 21, 22, 12 (list; graph; listen)
OFFSET

0,3

LINKS

N. J. A. Sloane and J. A. Sellers, On non-squashing partitions, Discrete Math., 294 (2005), 259-274.

FORMULA

a(n) = A135533(n)+1-2^(A000523(n)+1-A000120(n)). - D. E. Knuth, Mar 01 2008

MAPLE

S := 2; f := proc(n) global S; option remember; if n=0 then RETURN(0); fi; if n mod 2 = 0 then RETURN(S*f(n/2)); else f((n-1)/2)+1; fi; end;

PROGRAM

(PARI) a(n)=if(n<1, 0, if(n%2==0, 2*a(n/2), a((n-1)/2)+1))

CROSSREFS

A048678(k) is where k appears first in the sequence.

Cf. A004718, A080100, A000120, A090639.

This is Guy Steele's sequence GS(5, 4) (see A135416).

Sequence in context: A128248 A083742 A107331 this_sequence A094950 A087874 A166267

Adjacent sequences: A087805 A087806 A087807 this_sequence A087809 A087810 A087811

KEYWORD

nonn,easy

AUTHOR

Ralf Stephan (ralf(AT)ark.in-berlin.de), Oct 14 2003

page 1

Search completed in 0.002 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 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research