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

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A350802 a(n) is the sum of the numbers k < n such that a(k) AND n = a(k) (where AND denotes the bitwise AND operator). 3
 0, 0, 1, 3, 1, 7, 1, 21, 1, 21, 1, 34, 1, 43, 1, 65, 1, 73, 1, 94, 1, 127, 1, 157, 1, 157, 1, 186, 1, 227, 1, 265, 1, 273, 12, 287, 1, 309, 12, 328, 1, 349, 12, 376, 115, 463, 126, 495, 1, 397, 12, 411, 1, 465, 12, 484, 1, 505, 12, 532, 277, 797, 288, 829, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 COMMENTS The definition is recursive: a(n) depends on prior terms (a(0), ..., a(n-1)); a(0) = a(1) = 0 correspond to empty sums. LINKS Rémy Sigrist, Table of n, a(n) for n = 0..10000 EXAMPLE The first terms, alongside the corresponding k's, are: n a(n) k's -- ---- ------------------------- 0 0 {} 1 0 {0} 2 1 {0, 1} 3 3 {0, 1, 2} 4 1 {0, 1} 5 7 {0, 1, 2, 4} 6 1 {0, 1} 7 21 {0, 1, 2, 3, 4, 5, 6} 8 1 {0, 1} 9 21 {0, 1, 2, 4, 6, 8} 10 1 {0, 1} 11 34 {0, 1, 2, 3, 4, 6, 8, 10} 12 1 {0, 1} MAPLE a:= proc(n) option remember; add( `if`(Bits[And](n, a(j))=a(j), j, 0), j=0..n-1) end: seq(a(n), n=0..80); # Alois P. Heinz, Feb 28 2022 PROG (PARI) for (n=1, #a=vector(65), print1 (a[n]=sum(k=1, n-1, if (bitand(a[k], n-1)==a[k], k-1, 0))", ")) CROSSREFS Cf. A350677, A351887. Sequence in context: A290422 A352402 A278954 * A331884 A146430 A146281 Adjacent sequences: A350799 A350800 A350801 * A350803 A350804 A350805 KEYWORD base,nonn AUTHOR Rémy Sigrist, Feb 25 2022 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.

Last modified December 7 14:54 EST 2023. Contains 367657 sequences. (Running on oeis4.)