cp's OEIS Frontend

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.

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).

Original entry on oeis.org

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, 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, 18, 18, 14, 16, 15, 18, 14, 17, 14, 16, 17, 15, 17, 18, 17, 18
Offset: 1

Views

Author

Rémy Sigrist, Jul 27 2018

Keywords

Comments

This sequence was inspired by A055224.
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).

Examples

			For n = 4:
- a(1) AND a(3) = 0 AND 1 = 0 = a(1),
- a(2) AND a(2) = 1 AND 1 = 1 = a(2),
- a(3) AND a(1) = 1 AND 0 = 0 <> a(3),
- hence a(4) = 2.
		

Crossrefs

Programs

  • 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] ", "))