OFFSET
0,2
PROG
(PARI) a(n) = #Set(Vec(prod(k=1, n, (1+x^prime(k))^2)));
(Python)
from collections import Counter
from sympy import prime
def A369789(n):
c = {0:1}
for k in range(1, n+1):
m, d = prime(k), Counter(c)
for j in c:
a = c[j]
d[j+m] += a<<1
d[j+(m<<1)] += a
c = d
return len(set(c.values()))+int(max(c)+1>len(c)) # Chai Wah Wu, Feb 01 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Feb 01 2024
STATUS
approved