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.

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

This page as a plain text file.
%I A369788 #13 Feb 01 2024 20:20:36
%S A369788 1,2,2,3,3,3,5,5,8,11,17,27,38,66,85,121,152,185,216,249,285,325,363,
%T A369788 406,449,499,549,601,654,709,765,829,894,963,1032,1107,1182,1261,1342,
%U A369788 1426,1512,1602,1692,1788,1884,1983,2082,2188,2299,2413,2527,2644,2763,2884,3009
%N A369788 Number of different coefficient values in expansion of Product_{k=1..n} (1+x^prime(k)).
%o A369788 (PARI) a(n) = #Set(Vec(prod(k=1, n, 1+x^prime(k))));
%o A369788 (Python)
%o A369788 from collections import Counter
%o A369788 from sympy import prime
%o A369788 def A369788(n):
%o A369788     c = {0:1}
%o A369788     for k in range(1,n+1):
%o A369788         m, d = prime(k), Counter(c)
%o A369788         for j in c:
%o A369788             d[j+m] += c[j]
%o A369788         c = d
%o A369788     return len(set(c.values()))+int(max(c)+1>len(c)) # _Chai Wah Wu_, Feb 01 2024
%Y A369788 Cf. A000040, A000586, A007504, A369789.
%K A369788 nonn
%O A369788 0,2
%A A369788 _Seiichi Manyama_, Feb 01 2024