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.

A369789 Number of different coefficient values in expansion of Product_{k=1..n} (1+x^prime(k))^2.

This page as a plain text file.
%I A369789 #12 Feb 01 2024 16:50:33
%S A369789 1,3,4,5,10,20,29,47,69,92,122,153,190,231,274,321,374,433,494,561,
%T A369789 632,705,784,867,956,1053,1154,1257,1364,1473,1586,1713,1844,1981,
%U A369789 2120,2269,2420,2577,2740,2907,3080,3259,3440,3631,3824,4021,4220,4431,4654,4881,5110
%N A369789 Number of different coefficient values in expansion of Product_{k=1..n} (1+x^prime(k))^2.
%o A369789 (PARI) a(n) = #Set(Vec(prod(k=1, n, (1+x^prime(k))^2)));
%o A369789 (Python)
%o A369789 from collections import Counter
%o A369789 from sympy import prime
%o A369789 def A369789(n):
%o A369789     c = {0:1}
%o A369789     for k in range(1,n+1):
%o A369789         m, d = prime(k), Counter(c)
%o A369789         for j in c:
%o A369789             a = c[j]
%o A369789             d[j+m] += a<<1
%o A369789             d[j+(m<<1)] += a
%o A369789         c = d
%o A369789     return len(set(c.values()))+int(max(c)+1>len(c)) # _Chai Wah Wu_, Feb 01 2024
%Y A369789 Cf. A280245, A369788.
%K A369789 nonn
%O A369789 0,2
%A A369789 _Seiichi Manyama_, Feb 01 2024