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.

Showing 1-5 of 5 results.

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

Original entry on oeis.org

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
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 17 2017

Keywords

Examples

			a(29) = 4 because we have [29], [19, 7, 3], [17, 7, 5] and [13, 11, 5].
		

Crossrefs

Programs

  • 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]
  • 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

Formula

G.f.: Product_{k>=1} (1 + x^A001097(k)).

A299196 Number of partitions of n into distinct parts that are lesser of twin primes (A001359).

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 2, 0, 1, 2, 0, 1, 1, 0, 1, 1, 0, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 0, 1, 2, 1, 1, 2, 2, 2, 2, 1, 2, 2, 0, 2, 1, 0, 2, 1, 1, 3, 2, 1, 3, 2, 2, 2, 0, 2, 2, 0, 1, 2, 2, 2, 2, 3, 3, 3
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 04 2018

Keywords

Comments

For n > 0 let b(n) be the inverse Euler transform of a(n). It appears that, if p is the lesser of twin primes, then b(p) = 1 and b(2*p) = -1; otherwise b(n) = 0. - Georg Fischer, Aug 15 2020

Examples

			a(46) = 2 because we have [41, 5] and [29, 17].
		

Crossrefs

Programs

  • Maple
    P:= select(isprime,{seq(i,i=3..201,2)}):
    TP:= P intersect map(`-`,P,2):
    G:= mul(1+x^p,p=TP):
    seq(coeff(G,x,i),i=0..200); # Robert Israel, Dec 15 2024
  • Mathematica
    nmax = 105; CoefficientList[Series[Product[1 + Boole[PrimeQ[k] && PrimeQ[k + 2]] x^k, {k, 1, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Product_{k>=1} (1 + x^A001359(k)).

A299197 Number of partitions of n into distinct parts that are greater of twin primes (A006512).

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 2, 2, 0, 0, 0, 1, 1, 2, 1, 0, 0, 0, 2, 2, 1, 0, 0, 0, 2, 2, 2, 0, 0, 1, 1, 3, 1, 1, 0, 0, 2, 3, 2, 0, 0, 1, 2, 3, 2, 1, 0, 0, 2, 3, 3, 0, 0, 0, 1, 4, 3, 1, 0, 0, 2, 3, 3, 2, 0, 0, 1, 4, 4
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 04 2018

Keywords

Examples

			a(31) = 2 because we have [31] and [19, 7, 5].
		

Crossrefs

Programs

  • Mathematica
    nmax = 105; CoefficientList[Series[Product[1 + Boole[PrimeQ[k] && PrimeQ[k - 2]] x^k, {k, 1, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Product_{k>=1} (1 + x^A006512(k)).

A320279 Number of partitions of 2*n into parts that are the average of twin prime pairs (A014574).

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 3, 1, 3, 4, 3, 4, 7, 4, 7, 10, 7, 10, 15, 10, 15, 21, 15, 21, 29, 21, 29, 39, 29, 39, 53, 39, 53, 68, 53, 68, 91, 68, 91, 114, 91, 114, 148, 114, 148, 184, 148, 184, 232, 184, 232, 287, 232, 287, 355, 287, 355, 434, 355, 434, 531, 434, 531, 641, 531, 641
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 25 2018

Keywords

Examples

			a(10) = 3 because we have [12, 4, 4], [6, 6, 4, 4] and [4, 4, 4, 4, 4].
		

Crossrefs

Programs

  • Mathematica
    nmax = 65; Table[CoefficientList[Series[Product[1/(1 - Boole[PrimeQ[k + 1] && PrimeQ[k - 1]] x^k), {k, 1, 2 nmax}], {x, 0, 2 nmax}], x][[n]], {n, 1, 2 nmax + 1, 2}]

Formula

a(n) = [x^(2*n)] Product_{k>=1} 1/(1 - x^A014574(k)).

A332033 Number of compositions (ordered partitions) of n into distinct twin primes.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 1, 2, 0, 2, 1, 2, 1, 2, 6, 4, 1, 4, 7, 4, 12, 4, 12, 6, 12, 26, 18, 26, 19, 4, 19, 52, 18, 52, 24, 54, 24, 74, 144, 98, 25, 76, 145, 100, 258, 102, 150, 104, 156, 124, 396, 146, 282, 148, 396, 890, 510, 890, 403, 198, 403, 940, 636, 988, 642
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 05 2020

Keywords

Examples

			a(15) = 6 because we have [7, 5, 3], [7, 3, 5], [5, 7, 3], [5, 3, 7], [3, 7, 5] and [3, 5, 7].
		

Crossrefs

Showing 1-5 of 5 results.