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-10 of 20 results. Next

A010051 Characteristic function of primes: 1 if n is prime, else 0.

Original entry on oeis.org

0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0
Offset: 1

Views

Author

Keywords

Comments

The following sequences all have the same parity (with an extra zero term at the start of a(n)): a(n), A061007, A035026, A069754, A071574. - Jeremy Gardiner, Aug 09 2002
Hardy and Wright prove that the real number 0.011010100010... is irrational. See Nasehpour link. - Michel Marcus, Jun 21 2018
The spectral components (excluding the zero frequency) of the Fourier transform of the partial sequences {a(j)} with j=1..n and n an even number, exhibit a remarkable symmetry with respect to the central frequency component at position 1 + n/4. See the Fourier spectrum of the first 2^20 terms in Links, Comments in A289777, and Conjectures in A001223 of Sep 01 2019. It also appears that the symmetry grows with n. - Andres Cicuttin, Aug 23 2020

References

  • J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 3.
  • V. Brun, Über das Goldbachsche Gesetz und die Anzahl der Primzahlpaare, Arch. Mat. Natur. B, 34, no. 8, 1915.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Oxford University Press, London, 1975.
  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 65.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 132.

Crossrefs

Cf. A051006 (constant 0.4146825... (base 10) = 0.01101010001010001010... (base 2)), A001221 (inverse Moebius transform), A143519, A156660, A156659, A156657, A059500, A053176, A059456, A072762.
First differences of A000720, so A000720 gives partial sums.
Column k=1 of A117278.
Characteristic function of A000040.
Cf. A008683.

Programs

  • Haskell
    import Data.List (unfoldr)
    a010051 :: Integer -> Int
    a010051 n = a010051_list !! (fromInteger n-1)
    a010051_list = unfoldr ch (1, a000040_list) where
       ch (i, ps'@(p:ps)) = Just (fromEnum (i == p),
                                  (i + 1, if i == p then ps else ps'))
    -- Reinhard Zumkeller, Apr 17 2012, Sep 15 2011
    
  • Magma
    s:=[]; for n in [1..100] do if IsPrime(n) then s:=Append(s,1); else s:=Append(s,0); end if; end for; s;
    
  • Magma
    [IsPrime(n) select 1 else 0: n in [1..100]];  // Bruno Berselli, Mar 02 2011
    
  • Maple
    A010051:= n -> if isprime(n) then 1 else 0 fi;
  • Mathematica
    Table[ If[ PrimeQ[n], 1, 0], {n, 105}] (* Robert G. Wilson v, Jan 15 2005 *)
    Table[Boole[PrimeQ[n]], {n, 105}] (* Alonso del Arte, Aug 09 2011 *)
    Table[PrimePi[n] - PrimePi[n-1], {n,50}] (* G. C. Greubel, Jan 05 2017 *)
  • PARI
    a(n)=isprime(n) \\ Charles R Greathouse IV, Apr 16 2011
    
  • Python
    from sympy import isprime
    def A010051(n): return int(isprime(n)) # Chai Wah Wu, Jan 20 2022

Formula

a(n) = floor(cos(Pi*((n-1)! + 1)/n)^2) for n >= 2. - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Nov 07 2002
Let M(n) be the n X n matrix m(i, j) = 0 if n divides ij + 1, m(i, j) = 1 otherwise; then for n > 0 a(n) = -det(M(n)). - Benoit Cloitre, Jan 17 2003
n >= 2, a(n) = floor(phi(n)/(n - 1)) = floor(A000010(n)/(n - 1)). - Benoit Cloitre, Apr 11 2003
a(n) = Sum_{d|gcd(n, A034386(n))} mu(d). [Brun]
a(m*n) = a(m)*0^(n - 1) + a(n)*0^(m - 1). - Reinhard Zumkeller, Nov 25 2004
a(n) = 1 if n has no divisors other than 1 and n, and 0 otherwise. - Jon Perry, Jul 02 2005
Dirichlet generating function: Sum_{n >= 1} a(n)/n^s = primezeta(s), where primezeta is the prime zeta function. - Franklin T. Adams-Watters, Sep 11 2005
a(n) = (n-1)!^2 mod n. - Franz Vrabec, Jun 24 2006
a(n) = A047886(n, 1). - Reinhard Zumkeller, Apr 15 2008
Equals A051731 (the inverse Möbius transform) * A143519. - Gary W. Adamson, Aug 22 2008
a(n) = A051731((n + 1)! + 1, n) from Wilson's theorem: n is prime if and only if (n + 1)! is congruent to -1 mod n. - N-E. Fahssi, Jan 20 2009, Jan 29 2009
a(n) = A166260/A001477. - Mats Granvik, Oct 10 2009
a(n) = 0^A070824, where 0^0=1. - Mats Granvik, Gary W. Adamson, Feb 21 2010
It appears that a(n) = (H(n)*H(n + 1)) mod n, where H(n) = n!*Sum_{k=1..n} 1/k = A000254(n). - Gary Detlefs, Sep 12 2010
Dirichlet generating function: log( Sum_{n >= 1} 1/(A112624(n)*n^s) ). - Mats Granvik, Apr 13 2011
a(n) = A100995(n) - sqrt(A100995(n)*A193056(n)). - Mats Granvik, Jul 15 2011
a(n) * (2 - n mod 4) = A151763(n). - Reinhard Zumkeller, Oct 06 2011
(n - 1)*a(n) = ( (2*n + 1)!! * Sum_{k=1..n}(1/(2*k + 1))) mod n, n > 2. - Gary Detlefs, Oct 07 2011
For n > 1, a(n) = floor(1/A001222(n)). - Enrique Pérez Herrero, Feb 23 2012
a(n) = mu(n) * Sum_{d|n} mu(d)*omega(d), where mu is A008683 and omega A001222 or A001221 indistinctly. - Enrique Pérez Herrero, Jun 06 2012
a(n) = A003418(n+1)/A003418(n) - A217863(n+1)/A217863(n) = A014963(n) - A072211(n). - Eric Desbiaux, Nov 25 2012
For n > 1, a(n) = floor(A014963(n)/n). - Eric Desbiaux, Jan 08 2013
a(n) = ((abs(n-2))! mod n) mod 2. - Timothy Hopper, May 25 2015
a(n) = abs(F(n)) - abs(F(n)-1/2) - abs(F(n)-1) + abs(f(n)-3/2), where F(n) = Sum_{m=2..n+1} (abs(1 - (n mod m)) - abs(1/2 - (n mod m)) + 1/2), n > 0. F(n) = 1 if n is prime, > 1 otherwise, except F(1) = 0. a(n) = 1 if F(n) = 1, 0 otherwise. - Timothy Hopper, Jun 16 2015
For n > 4, a(n) = (n-2)! mod n. - Thomas Ordowski, Jul 24 2016
From Ilya Gutkovskiy, Jul 24 2016: (Start)
G.f.: A(x) = Sum_{n>=1} x^A000040(n) = B(x)*(1 - x), where B(x) is the g.f. for A000720.
a(n) = floor(2/A000005(n)), for n>1. (End)
a(n) = pi(n) - pi(n-1) = A000720(n) - A000720(n-1), for n>=1. - G. C. Greubel, Jan 05 2017
Decimal expansion of Sum_{k>=1} (1/10)^prime(k) = 9 * Sum_{k>=1} pi(k)/10^(k+1), where pi(k) = A000720(k). - Amiram Eldar, Aug 11 2020
a(n) = 1 - ceiling((2/n) * Sum_{k=2..floor(sqrt(n))} floor(n/k)-floor((n-1)/k)), n>1. - Gary Detlefs, Sep 08 2023
a(n) = Sum_{d|n} mu(d)*omega(n/d), where mu = A008683 and omega = A001221. - Ridouane Oudra, Apr 12 2025
a(n) = 0 if (n^2 - 3*n + 2) * A000203(n) - 8 * A002127(n) > 0 else 1 (n>2, see Craig link). - Bill McEachen, Jul 04 2025

A061358 Number of ways of writing n = p+q with p, q primes and p >= q.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 2, 1, 2, 0, 2, 1, 2, 1, 3, 0, 3, 1, 3, 0, 2, 0, 3, 1, 2, 1, 4, 0, 4, 0, 2, 1, 3, 0, 4, 1, 3, 1, 4, 0, 5, 1, 4, 0, 3, 0, 5, 1, 3, 0, 4, 0, 6, 1, 3, 1, 5, 0, 6, 0, 2, 1, 5, 0, 6, 1, 5, 1, 5, 0, 7, 0, 4, 1, 5, 0, 8, 1, 5, 0, 4, 0, 9, 1, 4, 0, 5, 0, 7, 0, 3, 1, 6, 0, 8, 1, 5, 1
Offset: 0

Views

Author

Amarnath Murthy, Apr 28 2001

Keywords

Comments

For an odd number n, a(n) = 0 if n-2 is not a prime, otherwise a(n) = 1.
For n > 1, a(2n) is at least 1, according to Goldbach's conjecture.
a(A014092(n)) = 0; a(A014091(n)) > 0; a(A067187(n)) = 1. - Reinhard Zumkeller, Nov 22 2004
Number of partitions of n into two primes.
Number of unordered ways of writing n as the sum of two primes.
a(2*n) = A068307(2*n+2). - Reinhard Zumkeller, Aug 08 2009
4*a(n) is the total number of divisors of all primes p and q such that n = p+q and p >= q. - Wesley Ivan Hurt, Mar 05 2016
Indices where a(n) = 0 correspond to A164376 UNION A025584. - Bill McEachen, Jan 31 2024

Examples

			a(22) = 3 because 22 can be written as 3+19, 5+17 and 11+11.
		

Crossrefs

Programs

  • Magma
    [#RestrictedPartitions(n,2,{p:p in PrimesUpTo(1000)}):n in [0..100] ] // Marius A. Burtea, Jan 19 2019
  • Maple
    g:=sum(sum(x^(ithprime(i)+ithprime(j)),i=1..j),j=1..30): gser:=series(g,x=0,110): seq(coeff(gser,x,n),n=0..105); # Emeric Deutsch, Apr 03 2006
  • Mathematica
    a[n_] := Length[Select[n - Prime[Range[PrimePi[n/2]]], PrimeQ]]; Table[a[n], {n, 0, 100}] (* Paul Abbott, Jan 11 2005 *)
    With[{nn=110},CoefficientList[Series[Sum[x^(Prime[i]+Prime[j]),{j,nn},{i,j}],{x,0,nn}],x]] (* Harvey P. Dale, Aug 17 2017 *)
    Table[Count[IntegerPartitions[n,{2}],?(AllTrue[#,PrimeQ]&)],{n,0,110}] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale, Jul 03 2021 *)
  • PARI
    a(n)=my(s);forprime(q=2,n\2,s+=isprime(n-q));s \\ Charles R Greathouse IV, Mar 21 2013
    
  • Python
    from sympy import primerange, isprime, floor
    def a(n):
        s=0
        for q in primerange(2, n//2 + 1): s+=isprime(n - q)
        return s
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 30 2017
    

Formula

G.f.: Sum_{j>0} Sum_{i=1..j} x^(p(i)+p(j)), where p(k) is the k-th prime. - Emeric Deutsch, Apr 03 2006
A065577(n) = a(10^n).
From Wesley Ivan Hurt, Jan 04 2013: (Start)
a(n) = Sum_{i=1..floor(n/2)} A010051(i) * A010051(n-i).
a(n) = Sum_{i=1..floor(n/2)} floor((A010051(i) + A010051(n-i))/2). (End)
a(n) + A062610(n) + A062602(n) = A004526(n). - R. J. Mathar, Sep 10 2021
a(n) = Sum_{k=floor((n-1)^2/4)+1..floor(n^2/4)} c(A339399(2k-1)) * c(A339399(2k)), where c = A010051. - Wesley Ivan Hurt, Jan 19 2022

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), May 15 2001
Comments edited by Zak Seidov, May 28 2014

A068307 From Goldbach problem: number of decompositions of n into a sum of three primes.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 1, 2, 1, 2, 2, 2, 1, 3, 2, 4, 2, 3, 2, 5, 2, 5, 3, 5, 3, 7, 3, 7, 2, 6, 3, 9, 2, 8, 4, 9, 4, 10, 2, 11, 3, 10, 4, 12, 3, 13, 4, 12, 5, 15, 4, 16, 3, 14, 5, 17, 3, 16, 4, 16, 6, 19, 3, 21, 5, 20, 6, 20, 2, 22, 5, 21, 6, 22, 5, 28, 5, 24, 7
Offset: 1

Views

Author

Naohiro Nomoto, Feb 24 2002

Keywords

Comments

For even n > 2, a(n) = A061358(n-2). - Reinhard Zumkeller, Aug 08 2009
Vinogradov proved that every sufficiently large odd number is the sum of three primes. - T. D. Noe, Mar 27 2013
The two Helfgott papers show that every odd number greater than 5 is the sum of three primes (this is the Odd Goldbach Conjecture). - T. D. Noe, May 14 2013, N. J. A. Sloane, May 18 2013

Examples

			a(6) = 1 because 6 = 2+2+2,
a(9) = 2 because 9 = 2+2+5 = 3+3+3,
a(15) = 3 because 15 = 2+2+11 = 3+5+7 = 5+5+5,
a(17) = 4 because 17 = 2+2+13 = 3+3+11 = 3+7+7 = 5+5+7.
- _Zak Seidov_, Jun 29 2017
		

Crossrefs

First occurrence: A139321. Records: A139322.
Column k=3 of A117278.

Programs

Formula

a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} A010051(i) * A010051(k) * A010051(n-i-k). - Wesley Ivan Hurt, Mar 26 2019
a(n) = [x^n y^3] Product_{k>=1} 1/(1 - y*x^prime(k)). - Ilya Gutkovskiy, Apr 18 2019

Extensions

More terms from Vladeta Jovovic, Mar 10 2002

A219180 Number T(n,k) of partitions of n into k distinct prime parts; triangle T(n,k), n>=0, read by rows.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Nov 13 2012

Keywords

Comments

T(n,k) is defined for all n>=0 and k>=0. The triangle contains only elements with 0 <= k <= A024936(n). T(n,k) = 0 for k > A024936(n). Three rows are empty because there are no partitions of n into distinct prime parts for n in {1,4,6}.

Examples

			T(0,0) = 1: [], the empty partition.
T(2,1) = 1: [2].
T(5,1) = 1: [5], T(5,2) = 1: [2,3].
T(16,2) = 2: [5,11], [3,13].
Triangle T(n,k) begins:
  1;
  ;
  0, 1;
  0, 1;
  ;
  0, 1, 1;
  ;
  0, 1, 1;
  0, 0, 1;
  0, 0, 1;
  0, 0, 1, 1;
  0, 1;
  0, 0, 1, 1;
  ...
		

Crossrefs

Row lengths are 1 + A024936(n).
Row sums give: A000586.
Last elements of rows give: A219181.
Row maxima give: A219182.
Least n with T(n,k) > 0 is A007504(k).

Programs

  • Maple
    b:= proc(n, i) option remember;
          `if`(n=0, [1], `if`(i<1, [], zip((x, y)->x+y, b(n, i-1),
           [0, `if`(ithprime(i)>n, [], b(n-ithprime(i), i-1))[]], 0)))
        end:
    T:= proc(n) local l; l:= b(n, numtheory[pi](n));
           while nops(l)>0 and l[-1]=0 do l:= subsop(-1=NULL, l) od; l[]
        end:
    seq(T(n), n=0..50);
  • Mathematica
    nn=20;a=Table[Prime[n],{n,1,nn}];CoefficientList[Series[Product[1+y x^a[[i]],{i,1,nn}],{x,0,nn}],{x,y}]//Grid  (* Geoffrey Critzer, Nov 21 2012 *)
    zip[f_, x_List, y_List, z_] := With[{m = Max[Length[x], Length[y]]}, f[PadRight[x, m, z], PadRight[y, m, z]]]; b[n_, i_] := b[n, i] = If[n == 0, {1}, If[i<1, {}, zip[Plus, b[n, i-1], Join[{0}, If[Prime[i] > n, {}, b[n-Prime[i], i-1]]], 0]]]; T[n_] := Module[{l}, l = b[n, PrimePi[n]]; While[Length[l]>0 && l[[-1]] == 0, l = ReplacePart[l, -1 -> Sequence[]]]; l]; Table[T[n], {n, 0, 50}] // Flatten (* Jean-François Alcover, Jan 29 2014, after Alois P. Heinz *)
  • PARI
    T(n)={ Vec(prod(k=1, n, 1 + isprime(k)*y*x^k + O(x*x^n))) }
    { my(t=T(20)); for(n=1, #t, print(if(t[n]!=0, Vecrev(t[n]), []))) } \\ Andrew Howroyd, Dec 22 2017

Formula

G.f. of column k: Sum_{0
T(n,k) = [x^n*y^k] Product_{i>=1} (1+x^prime(i)*y).

A259201 Number of partitions of n into ten primes.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 4, 5, 7, 8, 9, 11, 11, 14, 16, 18, 20, 25, 24, 31, 33, 38, 39, 48, 47, 59, 59, 69, 69, 87, 80, 102, 98, 118, 114, 143, 131, 168, 154, 191, 179, 227, 200, 261, 236, 297, 268, 344, 300, 396, 345, 442, 390, 509, 431, 576, 493, 641, 551, 729
Offset: 20

Author

Doug Bell, Jun 20 2015

Keywords

Examples

			a(23) = 2 because there are 2 partitions of 23 into ten primes: [2,2,2,2,2,2,2,2,2,5] and [2,2,2,2,2,2,2,3,3,3].
		

Crossrefs

Column k=10 of A117278.
Number of partitions of n into r primes for r = 1-9: A010051, A061358, A068307, A259194, A259195, A259196, A259197, A259198, A259200.

Programs

  • Magma
    [#RestrictedPartitions(k,10,Set(PrimesUpTo(1000))):k in [20..80]] ; // Marius A. Burtea, Jul 13 2019

Formula

a(n) = [x^n y^10] Product_{k>=1} 1/(1 - y*x^prime(k)). - Ilya Gutkovskiy, Apr 18 2019
a(n) = Sum_{r=1..floor(n/10)} Sum_{q=r..floor((n-r)/9)} Sum_{p=q..floor((n-q-r)/8)} Sum_{o=p..floor((n-p-q-r)/7)} Sum_{m=o..floor((n-o-p-q-r)/6)} Sum_{l=m..floor((n-m-o-p-q-r)/5)} Sum_{k=l..floor((n-l-m-o-p-q-r)/4)} Sum_{j=k..floor((n-k-l-m-o-p-q-r)/3)} Sum_{i=j..floor((n-j-k-l-m-o-p-q-r)/2)} A010051(r) * A010051(q) * A010051(p) * A010051(o) * A010051(m) * A010051(l) * A010051(k) * A010051(j) * A010051(i) * A010051(n-i-j-k-l-m-o-p-q-r). - Wesley Ivan Hurt, Jul 13 2019

A259200 Number of partitions of n into nine primes.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 4, 5, 7, 7, 9, 10, 11, 12, 16, 16, 20, 21, 24, 26, 33, 31, 39, 39, 47, 46, 59, 53, 69, 65, 80, 77, 98, 85, 114, 104, 131, 118, 154, 133, 179, 155, 200, 177, 236, 196, 268, 227, 300, 256
Offset: 18

Author

Doug Bell, Jun 20 2015

Keywords

Examples

			a(23) = 3 because there are 3 partitions of 23 into nine primes: [2,2,2,2,2,2,2,2,7], [2,2,2,2,2,2,3,3,5] and [2,2,2,2,3,3,3,3,3].
		

Crossrefs

Column k=9 of A117278.
Number of partitions of n into r primes for r = 1..10: A010051, A061358, A068307, A259194, A259195, A259196, A259197, A259198, this sequence, A259201.
Cf. A000040.

Programs

  • Magma
    [#RestrictedPartitions(k,9,Set(PrimesUpTo(1000))):k in [18..70]] ; // Marius A. Burtea, Jul 13 2019
  • Maple
    N:= 100: # to get a(0) to a(N)
    Primes:= select(isprime,[$1..N]):
    np:= nops(Primes):
    for j from 0 to np do g[0,j]:= 1 od:
    for n from 1 to 9 do
      g[n,0]:= 0:
      for j from 1 to np do
         g[n,j]:= convert(series(add(g[k,j-1]
              *x^((n-k)*Primes[j]),k=0..n),x,N+1),polynom)
      od
    od:
    seq(coeff(g[9,np],x,i),i=18..N) # Robert Israel, Jun 21 2015
  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Length[#]==9&&AllTrue[ #, PrimeQ]&]], {n,18,70}] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 31 2016 *)
  • PARI
    a(n) = {nb = 0; forpart(p=n, if (#p && (#select(x->isprime(x), Vec(p)) == #p), nb+=1), , [9,9]); nb;} \\ Michel Marcus, Jun 21 2015
    

Formula

a(n) = [x^n y^9] Product_{k>=1} 1/(1 - y*x^prime(k)). - Ilya Gutkovskiy, Apr 18 2019
a(n) = Sum_{q=1..floor(n/9)} Sum_{p=q..floor((n-q)/8)} Sum_{o=p..floor((n-p-q)/7)} Sum_{m=o..floor((n-o-p-q)/6)} Sum_{l=m..floor((n-m-o-p-q)/5)} Sum_{k=l..floor((n-l-m-o-p-q)/4)} Sum_{j=k..floor((n-k-l-m-o-p-q)/3)} Sum_{i=j..floor((n-j-k-l-m-o-p-q)/2)} c(q) * c(p) * c(o) * c(m) * c(l) * c(k) * c(j) * c(i) * c(n-i-j-k-l-m-o-p-q), where c = A010051. - Wesley Ivan Hurt, Jul 13 2019

A259196 Number of partitions of n into six primes.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 3, 4, 5, 6, 6, 8, 7, 10, 10, 12, 11, 16, 12, 19, 17, 22, 18, 26, 20, 31, 24, 33, 27, 42, 29, 47, 35, 51, 38, 60, 41, 68, 47, 73, 53, 86, 54, 95, 64, 103, 70, 116, 73, 131, 81, 137, 89, 156, 92, 171, 103, 180, 112, 202, 117, 223, 127, 232
Offset: 12

Author

Doug Bell, Jun 20 2015

Keywords

Examples

			a(17) = 3 because there are 3 partitions of 17 into six primes: [2,2,2,2,2,7], [2,2,2,3,3,5] and [2,3,3,3,3,3].
		

Crossrefs

Column k=6 of A117278.
Number of partitions of n into r primes for r = 1-10: A010051, A061358, A068307, A259194, A259195, this sequence, A259197, A259198, A259200, A259201.
Cf. A000040.

Programs

Formula

a(n) = Sum_{m=1..floor(n/6)} Sum_{l=m..floor((n-m)/5)} Sum_{k=l..floor((n-l-m)/4)} Sum_{j=k..floor((n-k-l-m)/3)} Sum_{i=j..floor((n-j-k-l-m)/2)} A010051(i) * A010051(j) * A010051(k) * A010051(l) * A010051(m) * A010051(n-i-j-k-l-m). - Wesley Ivan Hurt, Apr 17 2019
a(n) = [x^n y^6] Product_{k>=1} 1/(1 - y*x^prime(k)). - Ilya Gutkovskiy, Apr 18 2019

A259197 Number of partitions of n into seven primes.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 4, 4, 6, 6, 8, 8, 9, 10, 14, 12, 16, 16, 19, 19, 26, 22, 30, 26, 34, 31, 43, 33, 48, 42, 56, 47, 66, 51, 77, 60, 84, 68, 99, 73, 112, 86, 123, 95, 143, 103, 162, 116, 174, 131, 200, 137, 220, 156, 241, 171, 270, 180, 300, 202, 322, 223, 359
Offset: 14

Author

Doug Bell, Jun 20 2015

Keywords

Examples

			a(17) = 2 because there are 2 partitions of 17 into seven primes: [2,2,2,2,2,2,5] and [2,2,2,2,3,3,3].
		

Crossrefs

Column k=7 of A117278.
Number of partitions of n into r primes for r = 1-10: A010051, A061358, A068307, A259194, A259195, A259196, this sequence, A259198, A259200, A259201.
Cf. A000040.

Programs

  • Mathematica
    Table[Length@IntegerPartitions[n, {7}, Prime@Range@100], {n, 14, 100}] (* Robert Price, Apr 25 2025 *)

Formula

a(n) = Sum_{o=1..floor(n/7)} Sum_{m=o..floor((n-o)/6)} Sum_{l=m..floor((n-m-o)/5)} Sum_{k=l..floor((n-l-m-o)/4)} Sum_{j=k..floor((n-k-l-m-o)/3)} Sum_{i=j..floor((n-j-k-l-m-o)/2)} A010051(i) * A010051(j) * A010051(k) * A010051(l) * A010051(m) * A010051(o) * A010051(n-i-j-k-l-m-o). - Wesley Ivan Hurt, Apr 17 2019
a(n) = [x^n y^7] Product_{k>=1} 1/(1 - y*x^prime(k)). - Ilya Gutkovskiy, Apr 18 2019

A259198 Number of partitions of n into eight primes.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 4, 5, 6, 7, 8, 10, 9, 12, 14, 16, 16, 21, 19, 26, 26, 31, 30, 39, 34, 46, 43, 53, 48, 65, 56, 77, 66, 85, 77, 104, 84, 118, 99, 133, 112, 155, 123, 177, 143, 196, 162, 227, 174, 256, 200, 282, 220, 318, 241, 360, 270, 389, 300, 442, 322
Offset: 16

Author

Doug Bell, Jun 20 2015

Keywords

Examples

			a(20) = 2 because there are 2 partitions of 20 into eight primes: [2,2,2,2,2,2,3,5] and [2,2,2,2,3,3,3,3].
		

Crossrefs

Column k=8 of A117278.
Number of partitions of n into r primes for r = 1-10: A010051, A061358, A068307, A259194, A259195, A259196, A259197, this sequence, A259200, A259201.
Cf. A000040.

Programs

  • Mathematica
    Table[Length@IntegerPartitions[n, {8}, Prime@Range@100], {n, 16, 100}] (* Robert Price, Apr 25 2025 *)

Formula

a(n) = Sum_{p=1..floor(n/8)} Sum_{o=p..floor((n-p)/7)} Sum_{m=o..floor((n-o-p)/6)} Sum_{l=m..floor((n-m-o-p)/5)} Sum_{k=l..floor((n-l-m-o-p)/4)} Sum_{j=k..floor((n-k-l-m-o-p)/3)} Sum_{i=j..floor((n-j-k-l-m-o-p)/2)} A010051(i) * A010051(j) * A010051(k) * A010051(l) * A010051(m) * A010051(o) * A010051(p) * A010051(n-i-j-k-l-m-o-p). - Wesley Ivan Hurt, Apr 17 2019
a(n) = [x^n y^8] Product_{k>=1} 1/(1 - y*x^prime(k)). - Ilya Gutkovskiy, Apr 18 2019
a(n) = A326455(n)/n for n > 0. - Wesley Ivan Hurt, Jul 06 2019

A259194 Number of partitions of n into four primes.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 2, 3, 3, 4, 4, 6, 3, 6, 5, 7, 5, 9, 5, 11, 7, 11, 7, 13, 6, 14, 9, 15, 8, 18, 9, 21, 10, 19, 11, 24, 10, 26, 12, 26, 13, 30, 12, 34, 15, 33, 16, 38, 14, 41, 17, 41, 16, 45, 16, 50, 19, 47, 21, 56, 20, 61, 20, 57
Offset: 0

Author

Doug Bell, Jun 20 2015

Keywords

Examples

			a(17) = 3 because 17 can be written as the sum of four primes in exactly three ways: 2+2+2+11, 2+3+5+7 and 2+5+5+5.
		

Crossrefs

Column k=4 of A117278.
Number of partitions of n into r primes for r = 1..10: A010051, A061358, A068307, this sequence, A259195, A259196, A259197, A259198, A259200, A259201.
Cf. A000040.

Programs

Formula

a(n) = Sum_{k=1..floor(n/4)} Sum_{j=k..floor((n-k)/3)} Sum_{i=j..floor((n-j-k)/2)} A010051(i) * A010051(j) * A010051(k) * A010051(n-i-j-k). - Wesley Ivan Hurt, Apr 17 2019
a(n) = [x^n y^4] Product_{k>=1} 1/(1 - y*x^prime(k)). - Ilya Gutkovskiy, Apr 18 2019
Showing 1-10 of 20 results. Next