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 64 results. Next

A355306 Number of partitions of n in which the number of prime parts is not equal to the number of nonprime parts.

Original entry on oeis.org

0, 1, 2, 2, 4, 7, 8, 13, 19, 25, 38, 48, 65, 91, 120, 153, 209, 264, 343, 443, 563, 713, 912, 1133, 1428, 1789, 2217, 2746, 3406, 4178, 5139, 6296, 7670, 9344, 11360, 13732, 16612, 20038, 24078, 28915, 34660, 41402, 49439, 58887, 69983, 83088, 98476, 116436, 137589, 162244, 191018
Offset: 0

Views

Author

Omar E. Pol, Jun 28 2022

Keywords

Examples

			For n = 6 the partitions of 6 in which the number of prime parts is not equal to the number of nonprime parts are [6], [3, 3], [2, 2, 2], [3, 2, 1], [4, 1, 1], [3, 1, 1, 1], [2, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], there are eight of these partitions so a(6) = 8.
		

Crossrefs

Programs

  • Mathematica
    Array[Count[IntegerPartitions[#], ?(#1 - #2 != #2 & @@ {Length[#], Count[#, ?PrimeQ]} &)] &, 51, 0] (* Michael De Vlieger, Jul 15 2022 *)
  • PARI
    a(n) = my(nb=0); forpart(p=n, if (#select(x->!isprime(x), Vec(p)) != #p/2, nb++)); nb; \\ Michel Marcus, Jun 30 2022
  • Python
    from sympy import isprime
    from sympy.utilities.iterables import partitions
    def c(p): return 2*sum(p[i] for i in p if isprime(i)) != sum(p.values())
    def a(n): return sum(1 for p in partitions(n) if c(p))
    print([a(n) for n in range(51)]) # Michael S. Branicky, Jun 28 2022
    

Formula

a(n) = A000041(n) - A155515(n).
a(n) = A355158(n) + A355225(n).

A132381 Number of partitions of n with exactly one prime number.

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 9, 12, 15, 22, 28, 38, 46, 62, 77, 98, 117, 152, 183, 230, 275, 344, 408, 504, 592, 726, 856, 1038, 1212, 1469, 1712, 2048, 2380, 2839, 3288, 3901, 4500, 5313, 6127, 7193, 8254, 9671, 11081, 12909, 14764, 17153, 19566, 22658, 25786, 29762
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 10 2007

Keywords

Examples

			a(10) = #{8+2, 7+1+1+1, 6+3+1, 6+2+2, 6+2+1+1, 5+5, 5+4+1, 5+1+1+1+1+1, 4+4+2, 4+3+3, 4+3+1+1+1, 4+2+2+2, 4+2+2+1+1, 4+2+1+1+1+1, 3+3+3+1, 3+3+1+1+1+1, 3+1+1+1+1+1+1+1, 2+2+2+2+2, 2+2+2+2+1+1, 2+2+2+1+1+1+1, 2+2+1+1+1+1+1+1, 2+1+1+1+1+1+1+1+1} = 22.
		

Crossrefs

Cf. A002095.
Column k=1 of A274517.

Programs

  • Maple
    b:= proc(n, i) option remember; local j; if n=0 then [1, 0] elif i<1
          then [0$2] else b(n, i-1); for j to n/i do zip((x, y)->x+y, %,
          [`if`(isprime(i), 0, NULL), b(n-i*j, i-1)[]], 0) od; %[1..2] fi
        end:
    a:= n-> b(n$2)[2]:
    seq(a(n), n=1..60);  # Alois P. Heinz, May 29 2013
  • Mathematica
    zip = With[{m = Max[Length[#1], Length[#2]]}, PadRight[#1, m] + PadRight[#2, m]]&; b[n_, i_] := b[n, i] = Module[{j, pc}, Which[n == 0, {1, 0}, i<1, {0, 0}, True, pc = b[n, i-1]; For[j = 1, j <= n/i, j++, pc = zip[pc, Join[{If[PrimeQ[i], 0, Nothing]}, b[n-i*j, i-1]]] ]; pc[[1 ;; 2]] ]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Feb 12 2017, after Alois P. Heinz *)

A236019 Smallest number having at least n partitions that contain at least n primes.

Original entry on oeis.org

0, 2, 5, 8, 10, 13, 15, 17, 20, 22, 24, 26, 28, 31, 33, 35, 37, 39, 41, 43, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130
Offset: 0

Views

Author

J. Stauduhar, Jan 18 2014

Keywords

Examples

			a(4) = 10: [2,2,2,2,1,1], [2,2,2,2,2], [3,2,2,2,1], [3,3,2,2].
		

Crossrefs

Cf. A000041, A002095, A235945, A236444 (complement).

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, `if`(t=0, 1, 0),
         `if`(i<1, 0, b(n, i-1, t) +`if`(i>n, 0,
          b(n-i, i, t -`if`(t>0 and isprime(i), 1, 0)))))
        end:
    a:= proc(n) option remember; local k;
          for k from a(n-1) while b(k, k, n)Alois P. Heinz, Jan 18 2014
  • Mathematica
    $RecursionLimit = 1000; b[n_, i_, t_] := b[n, i, t] = If[n == 0, If[t == 0, 1, 0], If[i<1, 0, b[n, i-1, t] + If[i>n, 0, b[n-i, i, t - If[t>0 && PrimeQ[i], 1, 0]]]]]; a[n_] := a[n] = Module[{k}, For[k = a[n-1], b[k, k, n] < n, k++]; k]; a[0] = 0; Table[a[n], {n, 0, 61}] (* Jean-François Alcover, Jan 27 2014, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Jan 18 2014

A274517 Number T(n,k) of integer partitions of n with exactly k distinct primes.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 3, 2, 4, 1, 3, 7, 1, 3, 9, 3, 5, 12, 5, 6, 15, 9, 8, 22, 11, 1, 8, 28, 19, 1, 12, 38, 24, 3, 13, 46, 38, 4, 17, 62, 48, 8, 19, 77, 68, 12, 26, 98, 87, 20, 28, 117, 127, 24, 1, 37, 152, 154, 41, 1, 40, 183, 210, 55, 2, 52, 230, 260, 82, 3
Offset: 0

Views

Author

Geoffrey Critzer, Jun 25 2016

Keywords

Comments

Row lengths increase by 1 at row A007504(n).
Columns k=0-1 give: A002095, A132381.
Row sums give: A000041.

Examples

			T(6,1) = 7 because we have: 5+1, 4+2, 3+3, 3+1+1+1, 2+2+2, 2+2+1+1, 2+1+1+1+1+1.
Triangle T(n,k) begins:
  1;
  1;
  1,  1;
  1,  2;
  2,  3;
  2,  4,  1;
  3,  7,  1;
  3,  9,  3;
  5, 12,  5;
  6, 15,  9;
  8, 22, 11, 1;
  ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; expand(
          `if`(n=0, 1, `if`(i<1, 0, add(b(n-i*j, i-1)*
          `if`(j>0 and isprime(i), x, 1), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2)):
    seq(T(n), n=0..30);  # Alois P. Heinz, Jun 26 2016
  • Mathematica
    nn = 20; Map[Select[#, # > 0 &] &, CoefficientList[Series[Product[
          1/(1 - z^k), {k,Select[Range[1000], PrimeQ[#] == False &]}] Product[
          u/(1 - z^j) - u + 1, {j, Table[Prime[n], {n, 1, nn}]}], {z, 0,
         nn}], {z, u}]] // Grid

Formula

G.f.: Product_{k>=1} (1 - x^prime(k))/(1 - x^k)*(y/(1-x^prime(k)) - y + 1).

A280285 Number of partitions of n into odd composite numbers (A071904).

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 2, 0, 0, 2, 0, 0, 2, 1, 1, 3, 0, 0, 3, 1, 0, 4, 1, 1, 5, 1, 0, 5, 2, 2, 6, 2, 1, 8, 3, 1, 8, 3, 2, 11, 3, 2, 12, 5, 4, 13, 5, 3, 16, 8, 4, 18, 7, 6, 22, 9, 7, 24, 12, 9, 28, 12, 9, 33, 18, 11, 36, 18, 14, 45, 22, 16, 48, 26, 22, 54, 29, 23, 66, 38
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 31 2016

Keywords

Examples

			a(36) = 3 because we have [27, 9], [21, 15] and [9, 9, 9, 9].
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, add(add(
          `if`(d>1 and d::odd and not isprime(d), d, 0),
           d=numtheory[divisors](j))*a(n-j), j=1..n)/n)
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Dec 31 2016
  • Mathematica
    nmax = 100; CoefficientList[Series[(1 - x)/(1 - x^2) Product[(1 - x^(2 k)) (1 - x^Prime[k])/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x]

Formula

G.f.: ((1 - x)/(1 - x^2))*Product_{k>=1} (1 - x^(2*k))*(1 - x^prime(k))/(1 - x^k).

A302234 Expansion of Product_{k>=1} (1 - x^k)/(1 - x^prime(k)).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Apr 03 2018

Keywords

Comments

The difference between the number of partitions of n into an even number of distinct nonprime parts and the number of partitions of n into an odd number of distinct nonprime parts.
Convolution of the sequences A000607 and A010815.

Crossrefs

Programs

  • Mathematica
    nmax = 80; CoefficientList[Series[Product[(1 - x^k)/(1 - x^Prime[k]), {k, 1, nmax}], {x, 0, nmax}], x]
    nmax = 80; CoefficientList[Series[Product[(1 - Boole[!PrimeQ[k]] x^k), {k, 1, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Product_{k>=1} (1 - x^A018252(k)).

A322546 Numbers k such that every integer partition of k contains a 1 or a prime power.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 17, 19, 23
Offset: 1

Views

Author

Gus Wiseman, Dec 14 2018

Keywords

Examples

			24 does not belong to the sequence because there are integer partitions of 24 containing no 1's or prime powers, namely: (24), (18,6), (14,10), (12,12), (12,6,6), (6,6,6,6).
		

Crossrefs

Programs

  • Mathematica
    nn=100;
    ser=Product[If[n==1||PrimePowerQ[n],1,1/(1-x^n)],{n,nn}];
    Join@@Position[CoefficientList[Series[ser,{x,0,nn}],x],0]-1

A322547 Numbers k such that every integer partition of k contains a 1, a squarefree number, or a prime power.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23, 25, 26, 27, 29, 31, 33, 34, 35, 37, 39, 41, 43, 47, 49, 51, 53, 55, 59, 61, 67, 71, 79
Offset: 1

Views

Author

Gus Wiseman, Dec 14 2018

Keywords

Examples

			48 does not belong to the sequence because there are integer partitions of 48 containing no 1's, squarefree numbers, or prime powers, namely: (48), (36,12), (28,20), (24,24), (24,12,12), (18,18,12), (12,12,12,12).
		

Crossrefs

Programs

  • Mathematica
    nn=100;
    ser=Product[If[PrimePowerQ[n]||SquareFreeQ[n],1,1/(1-x^n)],{n,nn}];
    Join@@Position[CoefficientList[Series[ser,{x,0,nn}],x],0]-1

A341460 Number of partitions of n into 10 nonprime parts.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 6, 6, 7, 9, 10, 12, 15, 17, 20, 24, 28, 32, 38, 44, 51, 60, 68, 79, 92, 104, 122, 139, 157, 181, 208, 234, 270, 304, 347, 391, 445, 499, 569, 636, 724, 805, 913, 1015, 1150, 1274, 1440, 1592, 1796, 1980, 2231, 2455
Offset: 10

Views

Author

Ilya Gutkovskiy, Feb 12 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0,
          `if`(t=0, 1, 0), `if`(i<1 or t<1, 0, b(n, i-1, t)+
          `if`(isprime(i), 0, b(n-i, min(n-i, i), t-1))))
        end:
    a:= n-> b(n$2, 10):
    seq(a(n), n=10..69);  # Alois P. Heinz, Feb 12 2021
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[n == 0,
         If[t == 0, 1, 0], If[i < 1 || t < 1, 0, b[n, i - 1, t] +
         If[PrimeQ[i], 0, b[n - i, Min[n - i, i], t - 1], 0]]];
    a[n_] := b[n, n, 10];
    Table[a[n], {n, 10, 69}] (* Jean-François Alcover, Feb 28 2022, after Alois P. Heinz *)
    Table[Count[IntegerPartitions[n,{10}],?(NoneTrue[#,PrimeQ]&)],{n,10,70}] (* _Harvey P. Dale, Sep 01 2024 *)

A347663 Number of partitions of n into at most 5 nonprime parts.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 6, 5, 8, 8, 10, 10, 15, 14, 20, 19, 25, 25, 33, 30, 43, 42, 53, 52, 68, 64, 84, 80, 102, 100, 126, 119, 154, 148, 181, 177, 219, 209, 261, 251, 304, 299, 359, 344, 420, 408, 484, 475, 564, 546, 648, 632, 739, 728, 849, 825, 968
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 10 2021

Keywords

Crossrefs

Previous Showing 41-50 of 64 results. Next