login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A135533 Guy Steele's sequence GS(4,6) (see A135416). 7
1, 2, 3, 3, 5, 4, 7, 4, 7, 6, 11, 5, 9, 8, 15, 5, 9, 8, 15, 7, 13, 12, 23, 6, 11, 10, 19, 9, 17, 16, 31, 6, 11, 10, 19, 9, 17, 16, 31, 8, 15, 14, 27, 13, 25, 24, 47, 7, 13, 12, 23, 11, 21, 20, 39, 10, 19, 18, 35, 17, 33, 32, 63, 7, 13, 12, 23, 11, 21, 20, 39, 10, 19, 18, 35, 17, 33, 32, 63 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
From Don Knuth, Mar 01 2008: (Start)
a(n) = Sum_{k=0..A000523(n)} 2^A000120(n mod 2^k).
a(n) = 1 + A000523(n) * 2^A000120(n) - A135586(n). (End)
MAPLE
GS(4, 6, 200); [see A135416].
MATHEMATICA
i = 4; j = 6; Clear[a]; a[1] = 1; a[n_?EvenQ] := a[n] = {0, 1, a[n/2], a[n/2]+1, 2*a[n/2], 2*a[n/2]+1}[[i]]; a[n_?OddQ] := a[n] = {0, 1, a[(n-1)/2], a[(n-1)/2]+1, 2*a[(n-1)/2], 2*a[(n-1)/2]+1}[[j]]; Array[a, 79] (* Jean-François Alcover, Sep 12 2013 *)
PROG
(PARI) a(n)=if(n<4, return(n)); (1+n%2)*a(n\2) + 1 \\ Charles R Greathouse IV, Oct 17 2016
CROSSREFS
Cf. A135416.
Sequence in context: A143089 A275314 A161857 * A296075 A318678 A119674
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, based on a message from Guy Steele and Don Knuth, Mar 01 2008
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 02:23 EDT 2024. Contains 371264 sequences. (Running on oeis4.)