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 A317420 #14 Aug 02 2018 11:54:02 %S A317420 0,1,1,2,3,2,2,3,2,5,5,5,9,6,6,5,2,4,3,3,8,8,8,8,5,8,7,9,6,5,4,6,5,5, %T A317420 7,11,8,7,8,7,13,10,15,16,16,18,14,9,15,15,11,14,11,12,13,14,12,17,16, %U A317420 18,18,14,16,15,18,14,17,14,16,17,15,17,18,17,18 %N A317420 a(n) = number of k with 1 <= k <= n-1 such that a(k) AND a(n-k) = a(k) (where AND denotes the bitwise AND operator). %C A317420 This sequence was inspired by A055224. %C A317420 See also A317419, A317441, A317443 and A317585 for similar sequences; these sequences can be defined as a(n) = Sum_{k=1..n-1} [P(a(k), a(n-k))] for some predicate P in two variables (where [] is an Iverson bracket). %H A317420 Rémy Sigrist, <a href="/A317420/b317420.txt">Table of n, a(n) for n = 1..10000</a> %e A317420 For n = 4: %e A317420 - a(1) AND a(3) = 0 AND 1 = 0 = a(1), %e A317420 - a(2) AND a(2) = 1 AND 1 = 1 = a(2), %e A317420 - a(3) AND a(1) = 1 AND 0 = 0 <> a(3), %e A317420 - hence a(4) = 2. %o A317420 (PARI) a = vector(75); for (n=1, #a, a[n] = sum(k=1, n-1, bitand(a[k], a[n-k])==a[k]); print1 (a[n] ", ")) %Y A317420 Cf. A055224, A317419, A317441, A317443, A317585. %K A317420 nonn,base %O A317420 1,4 %A A317420 _Rémy Sigrist_, Jul 27 2018