login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A283876 Number of partitions of n into distinct twin primes (A001097). 5
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,17
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 0..10000
Eric Weisstein's World of Mathematics, Twin Primes
FORMULA
G.f.: Product_{k>=1} (1 + x^A001097(k)).
EXAMPLE
a(29) = 4 because we have [29], [19, 7, 3], [17, 7, 5] and [13, 11, 5].
MATHEMATICA
nmax = 95; CoefficientList[Series[Product[1 + Boole[PrimeQ[k] && (PrimeQ[k - 2] || PrimeQ[k + 2])] x^k, {k, 1, nmax}], {x, 0, nmax}], x]
PROG
(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)
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
(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
CROSSREFS
Sequence in context: A360821 A155124 A138033 * A365663 A067754 A194824
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Mar 17 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)