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.

A283876 Number of partitions of n into distinct twin primes (A001097).

This page as a plain text file.
%I A283876 #10 Feb 16 2025 08:33:43
%S A283876 1,0,0,1,0,1,0,1,1,0,1,1,1,1,1,1,2,1,2,2,2,2,2,2,3,2,2,3,2,4,2,4,4,3,
%T A283876 4,4,5,4,4,5,5,5,5,6,6,5,7,6,8,7,7,9,7,9,8,9,9,9,9,11,11,11,12,11,14,
%U A283876 12,13,14,14,13,15,15,17,16,16,19,17,20,19,21,21,21,21,23,23,23,23,24,26,25,28,28,30,29,30,32
%N A283876 Number of partitions of n into distinct twin primes (A001097).
%H A283876 Charles R Greathouse IV, <a href="/A283876/b283876.txt">Table of n, a(n) for n = 0..10000</a>
%H A283876 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/TwinPrimes.html">Twin Primes</a>
%H A283876 <a href="/index/Par#partN">Index entries for related partition-counting sequences</a>
%F A283876 G.f.: Product_{k>=1} (1 + x^A001097(k)).
%e A283876 a(29) = 4 because we have [29], [19, 7, 3], [17, 7, 5] and [13, 11, 5].
%t A283876 nmax = 95; CoefficientList[Series[Product[1 + Boole[PrimeQ[k] && (PrimeQ[k - 2] || PrimeQ[k + 2])] x^k, {k, 1, nmax}], {x, 0, nmax}], x]
%o A283876 (PARI) listA001097(lim)=my(v=List([3]),p=5); forprime(q=7,lim, if(q-p==2, listput(v,p); listput(v,q)); p=q); if(p+2>lim && isprime(p+2), listput(v,p)); Vec(v)
%o A283876 first(n)=my(v=listA001097(n),x=O('x^(n+1))+'x); Vec(prod(i=1,#v, 1+x^v[i]))[1..n+1] \\ _Charles R Greathouse IV_, Mar 17 2017
%o A283876 (PARI) Vec(prod(k=1, 95, (1 + (isprime(k) && (isprime(k - 2) || isprime(k + 2)))*x^k)) + O(x^96)) \\ _Indranil Ghosh_, Mar 17 2017
%Y A283876 Cf. A000586, A001097, A077608, A129363, A283875.
%K A283876 nonn
%O A283876 0,17
%A A283876 _Ilya Gutkovskiy_, Mar 17 2017