login
A355784
a(n) is the number of distinct primes of the form k*(n-k)+n where 1 <= k < n.
2
0, 1, 1, 1, 1, 1, 3, 1, 3, 2, 2, 2, 2, 2, 4, 3, 4, 1, 9, 1, 5, 5, 3, 2, 6, 3, 5, 3, 8, 4, 10, 3, 5, 5, 5, 5, 13, 1, 6, 6, 6, 6, 10, 5, 8, 4, 14, 3, 13, 4, 10, 9, 5, 5, 11, 4, 12, 5, 12, 4, 11, 4, 6, 11, 13, 4, 11, 6, 15, 12, 8, 4, 8, 5, 10, 8, 10, 3, 27, 7, 11, 15, 5, 9, 20, 7, 20, 6, 16, 5, 23
OFFSET
1,7
LINKS
EXAMPLE
a(7) = 3 because there are 3 such primes:
1*6 + 7 = 13,
2*5 + 7 = 17,
3*4 + 7 = 19.
MAPLE
f:= proc(n) local k;
nops(select(isprime, [seq(k*(n-k)+n, k=1..floor(n/2))]))
end proc:
map(f, [$1..100]);
PROG
(PARI) a(n) = vecsum(apply(isprime, Set(vector(n-1, k, k*(n-k)+n)))); \\ Michel Marcus, Jul 18 2022
CROSSREFS
Cf. A355785.
Sequence in context: A357059 A326420 A171899 * A213885 A347739 A352931
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jul 16 2022
STATUS
approved