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.

Previous Showing 41-50 of 106 results. Next

A223893 Number of partitions of n into at most three distinct primes.

Original entry on oeis.org

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

Views

Author

Frank M Jackson, Mar 28 2013

Keywords

Comments

The sequence shows a stronger version of the Goldbach conjecture that for n > 6, n has partitions with at most three distinct primes.

Examples

			a(21)=3 as 21 = 2+19 = 3+5+13 = 3+7+11.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Length@Select[IntegerPartitions[n, 3, Prime@Range@PrimePi@n],
    Sort@#==Union@# &]; Array[a, 100] (* Giovanni Resta, Mar 29 2013 *)

A001823 Central factorial numbers: column 2 in triangle A008956.

Original entry on oeis.org

0, 9, 259, 1974, 8778, 28743, 77077, 179452, 375972, 725781, 1312311, 2249170, 3686670, 5818995, 8892009, 13211704, 19153288, 27170913, 37808043, 51708462, 69627922, 92446431, 121181181, 157000116, 201236140, 255401965, 321205599, 400566474, 495632214
Offset: 1

Views

Author

Keywords

References

  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 217.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A bisection of A181888.
Column 2 in triangle A008956.

Programs

  • Maple
    A001823:=-(9+196*z+350*z**2+84*z**3+z**4)/(z-1)**7; # conjectured (correctly) by Simon Plouffe in his 1992 dissertation
  • Mathematica
    Table[1/90*n*(n - 1)*(2*n + 1)*(2*n - 1)*(2*n - 3)*(10*n + 7), {n, 40}] (* Stefan Steinerberger, Apr 15 2006 *)
    LinearRecurrence[{7,-21,35,-35,21,-7,1}, {0,9,259,1974,8778,28743,77077},30] (* Harvey P. Dale, Jun 09 2013 *)

Formula

a(n) = n*(n-1)*(2*n+1)*(2*n-1)*(2*n-3)*(10*n+7)/90.
If we replace n with n-1/2 in this formula we get 16*A000586(n).
G.f.: z*(9+196*z+350*z**2+84*z**3+z**4)/(1-z)^7.
a(1)=0, a(2)=9, a(3)=259, a(4)=1974, a(5)=8778, a(6)=28743, a(7)=77077, a(n)=7*a(n-1)-21*a(n-2)+35*a(n-3)-35*a(n-4)+21*a(n-5)-7*a(n-6)+a(n-7). - Harvey P. Dale, Jun 09 2013

Extensions

More terms from Stefan Steinerberger, Apr 15 2006

A112022 Number of partitions of n into distinct Chen primes.

Original entry on oeis.org

1, 0, 1, 1, 0, 2, 0, 2, 1, 1, 2, 1, 2, 2, 2, 2, 3, 2, 4, 3, 4, 4, 4, 5, 5, 5, 6, 5, 6, 7, 6, 9, 7, 9, 9, 9, 11, 11, 11, 13, 12, 14, 15, 14, 17, 15, 17, 19, 18, 21, 21, 21, 24, 24, 26, 28, 27, 30, 30, 32, 35, 34, 37, 37, 39, 41, 43, 45, 46, 48, 51, 53, 56, 58, 59, 61, 64, 66, 70, 71, 73
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 26 2005

Keywords

Comments

a(n) = A000586(n) for n <= 42.

Crossrefs

Programs

  • Mathematica
    terms = 81;
    gf = Times @@ (1 + x^SequencePosition[ PrimeOmega[ Range[terms]], {1, _, 1|2}][[All, 1]]) + O[x]^terms;
    CoefficientList[gf, x] (* Jean-François Alcover, Jul 02 2018 *)
  • PARI
    P=1+O(x^1001); forprime(p=2,1e3,if(bigomega(p+2)<3,P*=1+x^p)); Vec(P) \\ Charles R Greathouse IV, May 13 2013

Formula

G.f.: Product_{k>=1} (1 + x^A109611(k)). - Andrew Howroyd, Dec 28 2017

A137793 Number of partitions of n into distinct parts with no prime gaps in their factorization.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 5, 6, 8, 9, 11, 14, 16, 19, 23, 27, 31, 38, 43, 50, 58, 66, 76, 88, 100, 113, 130, 146, 165, 188, 211, 237, 267, 298, 334, 375, 417, 464, 517, 573, 636, 706, 781, 862, 954, 1050, 1157, 1276, 1401, 1539, 1689, 1851, 2027, 2222, 2427
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 11 2008

Keywords

Examples

			a(16)=A000009(16)-#{14+2,10+6,10+5+1,10+4+2,10+3+2+1}=32-5=27.
		

Crossrefs

A209402 Number of partitions of n into distinct primes except the prime factors of n.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 2, 4, 3, 2, 3, 1, 2, 6, 3, 8, 4, 2, 5, 3, 5, 10, 4, 3, 5, 13, 4, 14, 7, 4, 7, 18, 9, 12, 9, 6, 9, 25, 11, 10, 10, 9, 14, 34, 10, 38, 16, 11, 24, 14, 13, 49, 20, 18, 12, 60, 25, 66, 31, 17, 28
Offset: 0

Views

Author

Alois P. Heinz, Mar 22 2012

Keywords

Comments

a(n) = 0 for n in {1, 2, 3, 4, 6, 11}, a(n) = 1 for n in {0, 5, 7, 8, 9, 10, 12, 13, 14, 15, 17, 21, 27}, a(n) = 2 for n in {16, 18, 19, 20, 22, 25, 28, 33}, a(n) = 3 for n in {24, 26, 30, 35, 39}, a(n) = 4 for n in {23, 32, 38, 42, 45}. The smallest n such that a(n) = 0, 1, 2, ... is 1, 0, 16, 24, 23, 34, 29, 44, 31, 48, 37, 54, 49, 41, 43, ... . Missing values are in {15, 19, 21, 22, 26, 33, 35, 36, 37, 39, 42, ... }.

Examples

			a(5) = 1: [2,3].
a(7) = 1: [2,5].
a(16) = 2: [3,13], [5,11].
a(23) = 4: [3,7,13], [2,3,5,13], [5,7,11], [2,3,7,11].
a(24) = 3: [5,19], [7,17], [11,13].
a(29) = 6: [3,7,19], [2,3,5,19], [5,7,17], [2,3,7,17], [5,11,13], [2,3,11,13].
a(34) = 5: [3,31], [5,29], [11,23], [3,5,7,19], [3,7,11,13].
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) option remember; local b, l, f;
          b:= proc(h, j) option remember;
                `if`(h=0, 1, `if`(j<1, 0,
                `if`(l[j]>h, 0, b(h-l[j], j-1)) +b(h, j-1)))
              end; forget(b);
          f:= factorset(n);
          l:= sort([({ithprime(i)$i=1..pi(n)} minus f)[]]);
          b(n, nops(l))
        end:
    seq(a(n), n=0..300);
  • Mathematica
    a[n_] := a[n] = Module[{b, l, f}, b[h_, j_] := b[h, j] = If[h == 0, 1, If[j < 1, 0, If[l[[j]] > h, 0, b[h - l[[j]], j-1]] + b[h, j-1]]]; f = FactorInteger[n][[All, 1]]; l = Sort[Union[Array[Prime, PrimePi[n]] ~Complement~ f]]; b[n, Length[l]]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Mar 27 2017, translated from Maple *)

Formula

a(p) = A000586(p)-1 for any prime p.

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)).

A316154 Number of integer partitions of prime(n) into a prime number of prime parts.

Original entry on oeis.org

0, 0, 1, 2, 3, 5, 9, 12, 19, 39, 50, 93, 136, 166, 239, 409, 682, 814, 1314, 1774, 2081, 3231, 4272, 6475, 11077, 14270, 16265, 20810, 23621, 30031, 68251, 85326, 118917, 132815, 226097, 251301, 342448, 463940, 565844, 759873, 1015302, 1117708, 1787452, 1961624
Offset: 1

Views

Author

Gus Wiseman, Jun 25 2018

Keywords

Examples

			The a(7) = 9 partitions of 17 into a prime number of prime parts: (13,2,2), (11,3,3), (7,7,3), (7,5,5), (7,3,3,2,2), (5,5,3,2,2), (5,3,3,3,3), (5,2,2,2,2,2,2), (3,3,3,2,2,2,2).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, p, c) option remember; `if`(n=0 or p=2,
          `if`(n::even and isprime(c+n/2), 1, 0),
          `if`(p>n, 0, b(n-p, p, c+1))+b(n, prevprime(p), c))
        end:
    a:= n-> b(ithprime(n)$2, 0):
    seq(a(n), n=1..50);  # Alois P. Heinz, Jun 26 2018
  • Mathematica
    Table[Length[Select[IntegerPartitions[Prime[n]],And[PrimeQ[Length[#]],And@@PrimeQ/@#]&]],{n,20}]
    (* Second program: *)
    b[n_, p_, c_] := b[n, p, c] = If[n == 0 || p == 2, If[EvenQ[n] && PrimeQ[c + n/2], 1, 0], If[p>n, 0, b[n - p, p, c + 1]] + b[n, NextPrime[p, -1], c]];
    a[n_] := b[Prime[n], Prime[n], 0];
    Array[a, 50] (* Jean-François Alcover, May 20 2021, after Alois P. Heinz *)
  • PARI
    seq(n)={my(p=vector(n,k,prime(k))); my(v=Vec(1/prod(k=1, n, 1 - x^p[k]*y + O(x*x^p[n])))); vector(n, k, sum(i=1, k, polcoeff(v[1+p[k]], p[i])))} \\ Andrew Howroyd, Jun 26 2018

Formula

a(n) = A085755(A000040(n)). - Alois P. Heinz, Jun 26 2018

Extensions

Terms a(21) and beyond from Andrew Howroyd, Jun 26 2018

A316185 Number of strict integer partitions of the n-th prime into a prime number of prime parts.

Original entry on oeis.org

0, 0, 1, 1, 0, 1, 0, 2, 2, 3, 5, 5, 6, 8, 10, 13, 18, 20, 26, 32, 34, 45, 54, 66, 90, 106, 117, 135, 142, 165, 269, 311, 375, 398, 546, 579, 689, 823, 938, 1107, 1301, 1352, 1790, 1850, 2078, 2153, 2878, 3811, 4241, 4338, 4828, 5495, 5637, 7076, 8000, 9032
Offset: 1

Views

Author

Gus Wiseman, Jun 25 2018

Keywords

Examples

			The a(14) = 8 partitions of 43 into a prime number of distinct prime parts: (41,2), (31,7,5), (29,11,3), (23,17,3), (23,13,7), (19,17,7), (19,13,11), (17,11,7,5,3).
		

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember; `if`(n=0, 0,
         `if`(isprime(n), n, h(n-1)))
        end:
    b:= proc(n, i, c) option remember; `if`(n=0,
          `if`(isprime(c), 1, 0), `if`(i<2, 0, b(n, h(i-1), c)+
          `if`(i>n, 0, b(n-i, h(min(n-i, i-1)), c+1))))
        end:
    a:= n-> b(ithprime(n)$2, 0):
    seq(a(n), n=1..56);  # Alois P. Heinz, May 26 2021
  • Mathematica
    Table[Length[Select[IntegerPartitions[Prime[n]],And[UnsameQ@@#,PrimeQ[Length[#]],And@@PrimeQ/@#]&]],{n,10}]
    (* Second program: *)
    h[n_] := h[n] = If[n == 0, 0, If[PrimeQ[n], n, h[n - 1]]];
    b[n_, i_, c_] := b[n, i, c] = If[n == 0,
         If[PrimeQ[c], 1, 0], If[i < 2, 0, b[n, h[i - 1], c] +
         If[i > n, 0, b[n - i, h[Min[n - i, i - 1]], c + 1]]]];
    a[n_] := b[Prime[n], Prime[n], 0];
    Array[a, 56] (* Jean-François Alcover, Jun 11 2021, after Alois P. Heinz *)
  • PARI
    seq(n)={my(p=vector(n, k, prime(k))); my(v=Vec(prod(k=1, n, 1 + x^p[k]*y + O(x*x^p[n])))); vector(n, k, sum(i=1, k, polcoeff(v[1+p[k]], p[i])))} \\ Andrew Howroyd, Jun 26 2018

Formula

a(n) = A045450(A000040(n)).

Extensions

More terms from Alois P. Heinz, Jun 26 2018

A083290 Number of partitions of n into distinct parts which are coprime to n and which are also pairwise relatively prime.

Original entry on oeis.org

1, 0, 1, 1, 2, 1, 3, 2, 3, 2, 7, 2, 9, 3, 4, 5, 16, 3, 20, 4, 8, 7, 31, 5, 22, 9, 18, 9, 54, 4, 68, 16, 21, 16, 28, 11, 112, 20, 32, 18, 144, 9, 173, 22, 33, 40, 221, 19, 139, 25, 71, 43, 327, 25, 117, 47, 103, 80, 475, 18, 568, 90, 98, 122, 191, 29, 805, 93, 197, 44
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 23 2003

Keywords

Comments

a(n) <= A036998(n); see A082415 for numbers m with a(m) = A036998(m).

Examples

			a(7) = 3 since 7 = 3+4 = 2+5 = 1+6; 7 = 1+2+4 does not count (A036998(7)=4).
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = If[n == 1, 1, Module[{ip}, ip = IntegerPartitions[n, All, Select[Range[n - 1], CoprimeQ[#, n] &]]; Length@Select[ip, Sort[#] == Union[#] && AllTrue[Subsets[#, {2}], CoprimeQ @@ # &] &]]];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 80}] (* Jean-François Alcover, Dec 12 2021 *)
  • PARI
    a(n)={local(Cache=Map()); my(recurse(r,p,k)=my(hk=[r,p,k],z); if(!mapisdefined(Cache,hk,&z), z=if(k==0, r==0, self()(r,p,k-1) + if(gcd(p,k)==1, self()(r-k, p*k, min(r-k,k-1)))); mapput(Cache, hk, z)); z); recurse(n,n,n)} \\ Andrew Howroyd, Apr 20 2021

Extensions

Terms a(31) and beyond from Andrew Howroyd, Apr 20 2021

A280245 Expansion of Product_{k>=1} (1 + x^prime(k))^2.

Original entry on oeis.org

1, 0, 2, 2, 1, 6, 1, 8, 6, 6, 14, 6, 18, 14, 18, 24, 23, 30, 35, 38, 46, 54, 55, 74, 72, 90, 100, 106, 128, 136, 152, 178, 185, 216, 238, 252, 302, 308, 359, 390, 420, 478, 512, 564, 628, 668, 745, 810, 871, 974, 1035, 1140, 1238, 1336, 1459, 1586, 1700, 1868, 1993, 2168, 2354, 2512, 2751, 2930, 3177, 3418, 3677, 3960
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 29 2016

Keywords

Comments

Number of partitions of n into distinct prime parts, with 2 types of each part.
Self-convolution of A000586. - Ilya Gutkovskiy, Jan 19 2018

Examples

			a(5) = 6 because we have [5], [5'], [3, 2], [3', 2], [3, 2'], [3', 2'].
		

Crossrefs

Programs

  • Mathematica
    nmax = 67; CoefficientList[Series[Product[(1 + x^Prime[k])^2, {k, 1, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Product_{k>=1} (1 + x^prime(k))^2.
log(a(n)) ~ 2*Pi*sqrt(n/(3*log(n/2))). - Vaclav Kotesovec, Jan 12 2021
Previous Showing 41-50 of 106 results. Next