This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A350677 #28 Mar 01 2022 14:51:17 %S A350677 0,0,1,1,6,1,11,1,22,13,18,1,39,11,29,1,88,5,70,1,82,1,84,1,158,23, %T A350677 124,1,134,1,163,1,428,151,272,73,328,117,315,87,452,185,307,97,258, %U A350677 109,228,35,444,171,331,77,378,81,265,37,345,135,251,41,238,45,194 %N A350677 a(n) is the sum of the numbers k < n such that a(k) AND n = 0 (where AND denotes the bitwise AND operator). %C A350677 The definition is recursive: a(n) depends on prior terms (a(0), ..., a(n-1)); a(0) = a(1) = 0 correspond to empty sums. %H A350677 Rémy Sigrist, <a href="/A350677/b350677.txt">Table of n, a(n) for n = 0..10000</a> %e A350677 The first terms, alongside the corresponding k's, are: %e A350677 n a(n) k's %e A350677 -- ---- -------------------------- %e A350677 0 0 {} %e A350677 1 0 {0} %e A350677 2 1 {0, 1} %e A350677 3 1 {0, 1} %e A350677 4 6 {0, 1, 2, 3} %e A350677 5 1 {0, 1} %e A350677 6 11 {0, 1, 2, 3, 5} %e A350677 7 1 {0, 1} %e A350677 8 22 {0, 1, 2, 3, 4, 5, 7} %e A350677 9 13 {0, 1, 4, 8} %e A350677 10 18 {0, 1, 2, 3, 5, 7} %e A350677 11 1 {0, 1} %e A350677 12 39 {0, 1, 2, 3, 5, 7, 10, 11} %p A350677 a:= proc(n) option remember; add( %p A350677 `if`(Bits[And](n, a(j))=0, j, 0), j=0..n-1) %p A350677 end: %p A350677 seq(a(n), n=0..80); # _Alois P. Heinz_, Feb 28 2022 %o A350677 (PARI) for (n=1, #a=vector(63), print1 (a[n]=sum(k=1, n-1, if (bitand(a[k], n-1)==0, k-1, 0))", ")) %Y A350677 Cf. A350802, A351886. %K A350677 base,nonn %O A350677 0,5 %A A350677 _Rémy Sigrist_, Feb 25 2022