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 21-30 of 38 results. Next

A341975 Number of partitions of n into 4 distinct primes (counting 1 as a prime).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 2, 0, 2, 1, 3, 2, 4, 2, 4, 3, 5, 4, 5, 3, 5, 6, 7, 6, 6, 7, 8, 9, 9, 10, 7, 10, 9, 12, 10, 12, 9, 15, 12, 16, 13, 18, 12, 20, 14, 22, 16, 23, 13, 27, 16, 29, 19, 30, 14, 33, 19, 36, 21, 35, 15, 43, 23, 43, 23, 43, 18, 52, 26, 51, 26, 52, 21, 64, 29, 58, 28, 64
Offset: 11

Views

Author

Ilya Gutkovskiy, Feb 24 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; series(`if`(n=0, 1,
         `if`(i<0, 0, (p-> `if`(p>n, 0, x*b(n-p, i-1)))(
         `if`(i=0, 1, ithprime(i)))+b(n, i-1))), x, 5)
        end:
    a:= n-> coeff(b(n, numtheory[pi](n)), x, 4):
    seq(a(n), n=11..88);  # Alois P. Heinz, Feb 24 2021
  • Mathematica
    b[n_, i_] := b[n, i] = Series[If[n == 0, 1,
         If[i < 0, 0, Function[p, If[p > n, 0, x*b[n - p, i - 1]]][
         If[i == 0, 1, Prime[i]]] + b[n, i - 1]]], {x, 0, 5}];
    a[n_] := Coefficient[b[n, PrimePi[n]], x, 4];
    Table[a[n], {n, 11, 100}] (* Jean-François Alcover, Jul 13 2021, after Alois P. Heinz *)

A341976 Number of partitions of n into 5 distinct primes (counting 1 as a prime).

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 2, 0, 2, 1, 3, 1, 4, 0, 3, 2, 6, 2, 6, 2, 7, 5, 9, 4, 10, 5, 10, 8, 12, 7, 12, 8, 15, 12, 16, 12, 18, 14, 20, 17, 22, 18, 23, 20, 27, 26, 29, 27, 30, 30, 33, 36, 36, 36, 35, 41, 43, 48, 43, 49, 43, 56, 52, 61, 51, 64, 52, 73, 64, 77, 58, 82, 64, 93
Offset: 18

Views

Author

Ilya Gutkovskiy, Feb 24 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; series(`if`(n=0, 1,
         `if`(i<0, 0, (p-> `if`(p>n, 0, x*b(n-p, i-1)))(
         `if`(i=0, 1, ithprime(i)))+b(n, i-1))), x, 6)
        end:
    a:= n-> coeff(b(n, numtheory[pi](n)), x, 5):
    seq(a(n), n=18..91);  # Alois P. Heinz, Feb 24 2021
  • Mathematica
    b[n_, i_] := b[n, i] = Series[If[n == 0, 1,
         If[i < 0, 0, Function[p, If[p > n, 0, x*b[n - p, i - 1]]][
         If[i == 0, 1, Prime[i]]] + b[n, i - 1]]], {x, 0, 6}];
    a[n_] := Coefficient[b[n, PrimePi[n]], x, 5];
    Table[a[n], {n, 18, 100}] (* Jean-François Alcover, Jul 13 2021, after Alois P. Heinz *)

A379303 Number of strict integer partitions of n with a unique composite part.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 2, 3, 3, 6, 6, 8, 10, 10, 13, 15, 17, 20, 22, 24, 28, 31, 36, 40, 44, 50, 55, 62, 70, 75, 83, 89, 97, 108, 115, 128, 136, 146, 161, 172, 188, 203, 215, 233, 249, 269, 291, 309, 331, 353, 376, 405, 433, 459, 490, 518, 554, 592, 629, 670, 705
Offset: 0

Views

Author

Gus Wiseman, Dec 25 2024

Keywords

Examples

			The a(4) = 1 through a(11) = 8 partitions:
  (4)  (4,1)  (6)    (4,3)    (8)      (9)      (10)       (6,5)
              (4,2)  (6,1)    (6,2)    (5,4)    (8,2)      (7,4)
                     (4,2,1)  (4,3,1)  (6,3)    (9,1)      (8,3)
                                       (8,1)    (5,4,1)    (9,2)
                                       (4,3,2)  (6,3,1)    (10,1)
                                       (6,2,1)  (4,3,2,1)  (5,4,2)
                                                           (6,3,2)
                                                           (8,2,1)
		

Crossrefs

If no parts are composite we have A036497, non-strict A034891 (ranks A302540).
If all parts are composite we have A204389, non-strict A023895 (ranks A320629).
The non-strict version is A379302, ranks A379301 (positions of 1 in A379300).
For a unique prime we have A379305, non-strict A379304 (ranks A331915).
A000040 lists the prime numbers, differences A001223.
A000041 counts integer partitions, strict A000009.
A002808 lists the composite numbers, nonprimes A018252.
A066247 is the characteristic function for the composite numbers.
A377033 gives k-th differences of composite numbers, see A073445, A377034-A377037.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&Count[#,_?CompositeQ]==1&]],{n,0,30}]

A379306 Number of squarefree prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Dec 25 2024

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 39 are {2,6}, so a(39) = 2.
The prime indices of 70 are {1,3,4}, so a(70) = 2.
The prime indices of 98 are {1,4,4}, so a(98) = 1.
The prime indices of 294 are {1,2,4,4}, a(294) = 2.
The prime indices of 1911 are {2,4,4,6}, so a(1911) = 2.
The prime indices of 2548 are {1,1,4,4,6}, so a(2548) = 3.
		

Crossrefs

Positions of first appearances are A000079.
Positions of zero are A379307, counted by A114374 (strict A256012).
Positions of one are A379316, counted by A379308 (strict A379309).
A000040 lists the primes, differences A001223.
A005117 lists the squarefree numbers, differences A076259.
A008966 is the characteristic function for the squarefree numbers.
A013929 lists the nonsquarefree numbers, differences A078147.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798, counted by A001222.
A061398 counts squarefree numbers between primes, zeros A068360.
A377038 gives k-th differences of squarefree numbers.
Other counts of prime indices:
- A087436 postpositive, see A038550.
- A330944 nonprime, see A000586, A000607, A076610, A330945.
- A379310 nonsquarefree, see A302478.
- A379311 old prime, see A204389, A320629, A379312-A379315.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Select[prix[n],SquareFreeQ]],{n,100}]

Formula

Totally additive with a(prime(k)) = A008966(k).

A379317 Positive integers with a unique even prime index.

Original entry on oeis.org

3, 6, 7, 12, 13, 14, 15, 19, 24, 26, 28, 29, 30, 33, 35, 37, 38, 43, 48, 51, 52, 53, 56, 58, 60, 61, 65, 66, 69, 70, 71, 74, 75, 76, 77, 79, 86, 89, 93, 95, 96, 101, 102, 104, 106, 107, 112, 113, 116, 119, 120, 122, 123, 130, 131, 132, 138, 139, 140, 141, 142
Offset: 1

Views

Author

Gus Wiseman, Dec 29 2024

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The terms together with their prime indices begin:
   3: {2}
   6: {1,2}
   7: {4}
  12: {1,1,2}
  13: {6}
  14: {1,4}
  15: {2,3}
  19: {8}
  24: {1,1,1,2}
  26: {1,6}
  28: {1,1,4}
  29: {10}
  30: {1,2,3}
  33: {2,5}
  35: {3,4}
  37: {12}
  38: {1,8}
  43: {14}
  48: {1,1,1,1,2}
		

Crossrefs

Partitions of this type are counted by A038348 (strict A096911).
For all even parts we have A066207, counted by A035363 (strict A000700).
For no even parts we have A066208, counted by A000009 (strict A035457).
Positions of 1 in A257992.
A000040 lists the primes, differences A001223.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798, counted by A001222.
Other counts of prime indices:
- A330944 nonprime, see A000586, A000607, A076610, A330945.
- A379311 old prime, see A204389, A320629, A379312-A379315.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],Length[Select[prix[#],EvenQ]]==1&]

A341978 Number of partitions of n into 7 distinct primes (counting 1 as a prime).

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 2, 0, 4, 0, 2, 1, 6, 1, 7, 0, 5, 2, 8, 1, 11, 1, 10, 4, 15, 3, 18, 3, 17, 7, 22, 6, 28, 6, 25, 11, 35, 11, 40, 11, 38, 19, 50, 18, 56, 18, 54, 30, 70, 28, 74, 30, 78, 45, 92, 40, 100, 46, 104, 63, 123, 60, 133, 69, 140, 88, 157, 86, 173
Offset: 42

Views

Author

Ilya Gutkovskiy, Feb 24 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; series(`if`(n=0, 1,
         `if`(i<0, 0, (p-> `if`(p>n, 0, x*b(n-p, i-1)))(
         `if`(i=0, 1, ithprime(i)))+b(n, i-1))), x, 8)
        end:
    a:= n-> coeff(b(n, numtheory[pi](n)), x, 7):
    seq(a(n), n=42..114);  # Alois P. Heinz, Feb 24 2021
  • Mathematica
    b[n_, i_] := b[n, i] = Series[If[n == 0, 1,
         If[i < 0, 0, Function[p, If[p > n, 0, x*b[n - p, i - 1]]][
         If[i == 0, 1, Prime[i]]] + b[n, i - 1]]], {x, 0, 8}];
    a[n_] := Coefficient[b[n, PrimePi[n]], x, 7];
    Table[a[n], {n, 42, 114}] (* Jean-François Alcover, Feb 24 2022, after Alois P. Heinz *)

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

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Jan 22 2018

Keywords

Comments

The difference between the number of partitions of n into an even number of distinct prime parts (including 1) and the number of partitions of n into an odd number of distinct prime parts (including 1).
Convolution inverse of A034891.

Crossrefs

Cf. A000586, A000607, A034891, A036497, A046675 (partial sums).

Programs

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

Formula

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

A339382 Number of partitions of n into an even number of distinct primes (counting 1 as a prime).

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 3, 2, 3, 3, 4, 4, 4, 4, 6, 5, 5, 5, 6, 6, 7, 7, 9, 8, 9, 8, 11, 10, 11, 12, 14, 12, 15, 14, 17, 16, 17, 17, 22, 20, 22, 21, 25, 24, 28, 27, 31, 30, 33, 31, 39, 36, 40, 40, 46, 42, 49, 47, 54, 53, 58, 55, 67, 63, 70, 68
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 02 2020

Keywords

Examples

			a(16) = 3 because we have [13, 3], [11, 5] and [7, 5, 3, 1].
		

Crossrefs

Programs

  • Maple
    s:= proc(n) option remember;
          `if`(n<1, n+1, ithprime(n)+s(n-1))
        end:
    b:= proc(n, i, t) option remember; (p-> `if`(n=0, t,
          `if`(n>s(i), 0, b(n, i-1, t)+ `if`(p>n, 0,
           b(n-p, i-1, 1-t)))))(`if`(i<1, 1, ithprime(i)))
        end:
    a:= n-> b(n, numtheory[pi](n), 1):
    seq(a(n), n=0..100);  # Alois P. Heinz, Dec 02 2020
  • Mathematica
    nmax = 75; CoefficientList[Series[(1/2) ((1 + x) Product[(1 + x^Prime[k]), {k, 1, nmax}] + (1 - x) Product[(1 - x^Prime[k]), {k, 1, nmax}]), {x, 0, nmax}], x]

Formula

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

A339383 Number of partitions of n into an odd number of distinct primes (counting 1 as a prime).

Original entry on oeis.org

0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 3, 3, 4, 3, 4, 4, 5, 4, 5, 6, 6, 5, 7, 6, 8, 7, 8, 9, 10, 9, 12, 11, 12, 11, 14, 14, 16, 15, 17, 17, 20, 17, 21, 22, 24, 22, 27, 25, 30, 28, 31, 31, 36, 33, 40, 39, 42, 40, 47, 46, 53, 49, 55, 54, 63, 58, 68, 67, 73
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 02 2020

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    s:= proc(n) option remember;
          `if`(n<1, n+1, ithprime(n)+s(n-1))
        end:
    b:= proc(n, i, t) option remember; (p-> `if`(n=0, t,
          `if`(n>s(i), 0, b(n, i-1, t)+ `if`(p>n, 0,
           b(n-p, i-1, 1-t)))))(`if`(i<1, 1, ithprime(i)))
        end:
    a:= n-> b(n, numtheory[pi](n), 0):
    seq(a(n), n=0..100);  # Alois P. Heinz, Dec 02 2020
  • Mathematica
    nmax = 75; CoefficientList[Series[(1/2) ((1 + x) Product[(1 + x^Prime[k]), {k, 1, nmax}] - (1 - x) Product[(1 - x^Prime[k]), {k, 1, nmax}]), {x, 0, nmax}], x]

Formula

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

A341979 Number of partitions of n into 8 distinct primes (counting 1 as a prime).

Original entry on oeis.org

1, 0, 1, 0, 0, 0, 2, 0, 1, 0, 1, 0, 4, 0, 3, 0, 3, 1, 7, 0, 6, 1, 6, 1, 11, 0, 11, 2, 11, 3, 19, 1, 18, 3, 18, 5, 30, 4, 28, 6, 30, 10, 45, 6, 40, 11, 46, 16, 63, 11, 60, 19, 69, 25, 88, 18, 86, 32, 97, 36, 121, 32, 123, 47, 131, 55, 164, 49, 164, 69, 181, 80
Offset: 59

Views

Author

Ilya Gutkovskiy, Feb 24 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; series(`if`(n=0, 1,
         `if`(i<0, 0, (p-> `if`(p>n, 0, x*b(n-p, i-1)))(
         `if`(i=0, 1, ithprime(i)))+b(n, i-1))), x, 9)
        end:
    a:= n-> coeff(b(n, numtheory[pi](n)), x, 8):
    seq(a(n), n=59..130);  # Alois P. Heinz, Feb 24 2021
  • Mathematica
    b[n_, i_] := b[n, i] = Series[If[n == 0, 1,
         If[i < 0, 0, Function[p, If[p > n, 0, x*b[n - p, i - 1]]][
         If[i == 0, 1, Prime[i]]] + b[n, i - 1]]], {x, 0, 9}];
    a[n_] := Coefficient[b[n, PrimePi[n]], x, 8];
    Table[a[n], {n, 59, 130}] (* Jean-François Alcover, Feb 24 2022, after Alois P. Heinz *)
Previous Showing 21-30 of 38 results. Next