The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A036571 Binary packing of Connell sequence (shifted once right). 2
0, 1, 3, 11, 27, 91, 347, 859, 2907, 11099, 43867, 109403, 371547, 1420123, 5614427, 22391643, 55946075, 190163803, 727034715, 2874518363, 11464452955, 45824191323, 114543668059, 389421575003 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Binary representation of n has 1's at positions specified by Connell sequence (A001614).
LINKS
FORMULA
a(0)=0, a(n) = a(n-1) + 2^((2*n - floor((1/2)*(1 + sqrt(8*n - 7)))) - 1).
EXAMPLE
347=101011011 in binary, with 1's at positions 1,2,4,5,7,9.
PROG
(Python)
from itertools import count, islice
from math import isqrt
def A036571_gen(): # generator of terms
c = 0
for n in count(1):
yield c
c += 1<<(m:=n<<1)-(k:=isqrt(m))-int((m<<2)>(k<<2)*(k+1)+1)-1
A036571_list = list(islice(A036571_gen(), 25)) # Chai Wah Wu, Jul 26 2022
CROSSREFS
Sequence in context: A289842 A077776 A113836 * A003060 A136983 A210611
KEYWORD
nonn
AUTHOR
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 May 15 21:53 EDT 2024. Contains 372549 sequences. (Running on oeis4.)