OFFSET
0,3
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..8192
EXAMPLE
The first terms, alongside the corresponding k's, are:
n a(n) k's
-- ---- ------------------------
0 0 None
1 0 None
2 3 0, 1, 2
3 4 0, 1, 2, 3
4 2 1, 3
5 6 0, 1, 2, 3, 4, 5
6 3 1, 3, 5
7 8 0, 1, 2, 3, 4, 5, 6, 7
8 2 3, 5
9 4 2, 3, 4, 5
10 3 1, 3, 9
11 8 0, 1, 2, 3, 8, 9, 10, 11
12 3 1, 5, 9
13 8 0, 1, 4, 5, 8, 9, 12, 13
14 0 None
15 0 None
PROG
(PARI) a(n) = sum(k = 0, n, isprime(bitor(n, k)))
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Rémy Sigrist, Aug 17 2024
STATUS
approved