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 31-40 of 59 results. Next

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

A212721 Triangle read by rows: n-th row gives distinct products of partitions of n (A000041).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 16, 18, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 24, 27, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 14 2012

Keywords

Comments

A034891(n) = length of n-th row;
A000792(n) = largest term of n-th row;
for n>5: A007918(n) = smallest number <= A000792(n) not occurring in n-th row.

Examples

			A000041(6)=11, the 11 partitions and their products of 6:
   1: (1,1,1,1,1,1)   ->   1 * 1 * 1 * 1 * 1 * 1 = 1
   2: (1,1,1,1,2)     ->   1 * 1 * 1 * 1 * 2     = 2
   3: (1,1,1,3)       ->   1 * 1 * 1 * 3         = 3
   4: (1,1,2,2)       ->   1 * 1 * 2 * 2         = 4
   5: (1,1,4)         ->   1 * 1 * 4             = 4
   6: (1,2,3)         ->   1 * 2 * 3             = 6
   7: (1,5)           ->   1 * 5                 = 5
   8: (2,2,2)         ->   2 * 2 * 2             = 8
   9: (2,4)           ->   2 * 4                 = 8
  10: (3,3)           ->   3 * 3                 = 9
  11: (6)             ->                           6,
sorted and duplicates removed: T(6,1..8)=[1,2,3,4,5,6,8,9], A034891(6)=8.
The triangle begins:
   0 |  [1]
   1 |  [1]
   2 |  [1,2]
   3 |  [1,2,3]
   4 |  [1,2,3,4]
   5 |  [1,2,3,4,5,6]
   6 |  [1,2,3,4,5,6,8,9]
   7 |  [1,2,3,4,5,6,7,8,9,10,12]
   8 |  [1,2,3,4,5,6,7,8,9,10,12,15,16,18]
   9 |  [1,2,3,4,5,6,7,8,9,10,12,14,15,16,18,20,24,27]
  10 |  [1,2,3,4,5,6,7,8,9,10,12,14,15,16,18,20,21,24,25,27,30,32,36].
		

Crossrefs

Programs

  • Haskell
    import Data.List (nub, sort)
    a212721 n k = a212721_row n !! (k-1)
    a212721_row = nub . sort . (map product) . ps 1 where
       ps x 0 = [[]]
       ps x y = [t:ts | t <- [x..y], ts <- ps t (y - t)]
    a212721_tabf = map a212721_row [0..]
    
  • Mathematica
    row[n_] := Union[Times @@@ IntegerPartitions[n]];
    Table[row[n], {n, 0, 10}] (* Jean-François Alcover, Jun 29 2019 *)
  • Sage
    [sorted(list(set([mul(p) for p in Partitions(n)]))) for n in range(11)] # Peter Luschny, Dec 13 2015

A159685 Maximal product of distinct primes whose sum is <= n.

Original entry on oeis.org

1, 2, 3, 3, 6, 6, 10, 15, 15, 30, 30, 42, 42, 70, 105, 105, 210, 210, 210, 210, 330, 330, 462, 462, 770, 1155, 1155, 2310, 2310, 2730, 2730, 2730, 2730, 4290, 4290, 6006, 6006, 10010, 15015, 15015, 30030, 30030, 30030, 30030, 39270, 39270, 46410, 46410
Offset: 1

Views

Author

Wouter Meeussen, Apr 19 2009, May 02 2009

Keywords

Comments

Equivalently, largest value of the LCM of the partitions of n into primes.
Equivalently, maximal number of times a permutation of length n, with prime cycle lengths, can operate on itself before returning to the initial permutation.
If the requirement that primes are distinct is dropped, this becomes A000792. - Charles R Greathouse IV, Jul 10 2012

Examples

			A permutation of length 10 can have prime cycle lengths of 2+3+5; so when repeatedly applied to itself, can produce at most 2*3*5 different permutations.
The products of distinct primes whose sum is <= 10 are 1 (the empty product), 2, 3, 5, 7, 2*3=6, 2*5=10, 2*7=14, 3*5=15, 3*7=21, and 2*3*5=30. The maximum is 30, so a(10) = 30. - _Jonathan Sondow_, Jul 06 2012
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n,i) option remember; local p; p:= ithprime(max(i,1));
          `if`(n=0, 1, `if`(i<1, 0,
           max(b(n, i-1), `if`(p>n, 0, b(n-p, i-1)*p))))
        end:
    a:= proc(n) option remember;
         `if`(n=0, 1, max(b(n, pi(n)), a(n-1)))
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 04 2012
  • Mathematica
    temp=Series[Times @@ (1/(1-q[ # ] x^#)& /@ Prepend[Prime /@ Range[24],1]),{x,0,Prime[24]}]; Table[Max[List @@ Expand[Coefficient[temp,x^n]]/. q[a_]^_ ->q[a] /.q->Identity],{n,64}]
    (* Second program: *)
    b[n_, i_] := b[n, i] = Module[{p = Prime[Max[i, 1]]}, If[n == 0, 1, If[i < 1, 0, Max[b[n, i-1], If[p > n, 0, b[n-p, i-1]*p]]]]]; a[n_] := a[n] = If[n == 0, 1, Max[b[n, PrimePi[n]], a[n-1]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Nov 05 2013, translated from Alois P. Heinz's Maple program *)

Formula

a(n) <= A002809(n) and A008475(a(n)) <= n (see (1.2) and (1.4) in Deléglise-Nicolas 2012). - Jonathan Sondow, Jul 04 2012.

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

Original entry on oeis.org

1, 0, 1, 1, 3, 2, 5, 4, 9, 7, 14, 11, 22, 18, 33, 27, 48, 40, 69, 58, 97, 82, 134, 114, 183, 157, 246, 212, 327, 284, 431, 376, 562, 493, 728, 640, 934, 825, 1191, 1056, 1508, 1341, 1899, 1694, 2377, 2126, 2960, 2654, 3668, 3297, 4523, 4075, 5554, 5015, 6792, 6145
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 02 2020

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; (p->
          `if`(n=0, t, `if`(i<0, 0, b(n, i-1, t)+
          `if`(p>n, 0, b(n-p, i, 1-t)))))(`if`(i<1, 1, ithprime(i)))
        end:
    a:= n-> b(n, numtheory[pi](n), 1):
    seq(a(n), n=0..60);  # Alois P. Heinz, Dec 02 2020
  • Mathematica
    nmax = 55; CoefficientList[Series[(1/2) ((1/(1 - x)) Product[1/(1 - x^Prime[k]), {k, 1, nmax}] + (1/(1 + x)) Product[1/(1 + x^Prime[k]), {k, 1, nmax}]), {x, 0, nmax}], x]
    Table[Count[(Boole[PrimeQ/@(IntegerPartitions[n]/.(1->2))]),?(EvenQ[Length[#]] && FreeQ[ #,0]&)],{n,0,60}] (* _Harvey P. Dale, Aug 20 2024 *)

Formula

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

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

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 3, 7, 5, 11, 9, 18, 14, 27, 22, 40, 33, 58, 48, 82, 69, 114, 97, 157, 134, 212, 183, 284, 246, 376, 327, 493, 431, 640, 562, 825, 728, 1056, 934, 1341, 1191, 1694, 1508, 2126, 1899, 2654, 2377, 3297, 2960, 4075, 3668, 5015, 4523, 6145, 5554, 7499
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 02 2020

Keywords

Examples

			a(6) = 3 because we have [3, 2, 1], [2, 2, 2] and [2, 1, 1, 1, 1].
		

Crossrefs

Programs

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

Formula

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

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

A341719 Number of partitions of n into 9 primes (counting 1 as a prime).

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 7, 7, 11, 11, 16, 15, 23, 21, 30, 27, 39, 35, 51, 44, 63, 54, 78, 67, 97, 81, 116, 96, 139, 115, 166, 133, 194, 155, 227, 180, 265, 206, 305, 236, 351, 271, 403, 305, 460, 346, 522, 391, 592, 438, 668, 489, 751, 551, 844, 608, 942, 674, 1050, 750
Offset: 9

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)))(
         `if`(i=0, 1, ithprime(i)))+b(n, i-1))), x, 10)
        end:
    a:= n-> coeff(b(n, numtheory[pi](n)), x, 9):
    seq(a(n), n=9..68);  # 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]]][
         If[i == 0, 1, Prime[i]]] + b[n, i - 1]]], {x, 0, 10}];
    a[n_] := Coefficient[b[n, PrimePi[n]], x, 9];
    Table[a[n], {n, 9, 68}] (* Jean-François Alcover, Feb 26 2022, after Alois P. Heinz *)

A341972 Number of partitions of n into 10 primes (counting 1 as a prime).

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 7, 7, 11, 11, 17, 16, 24, 23, 32, 30, 43, 39, 56, 51, 71, 63, 89, 78, 111, 97, 134, 116, 164, 139, 197, 166, 232, 194, 275, 227, 324, 265, 374, 305, 438, 351, 505, 403, 578, 460, 665, 522, 760, 592, 859, 668, 978, 751, 1105, 844, 1239, 942, 1394
Offset: 10

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)))(
         `if`(i=0, 1, ithprime(i)))+b(n, i-1))), x, 11)
        end:
    a:= n-> coeff(b(n, numtheory[pi](n)), x, 10):
    seq(a(n), n=10..68);  # 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]]][
         If[i == 0, 1, Prime[i]]] + b[n, i - 1]]], {x, 0, 11}];
    a[n_] := Coefficient[b[n, PrimePi[n]], x, 10];
    Table[a[n], {n, 10, 68}] (* Jean-François Alcover, Feb 26 2022, after Alois P. Heinz *)

A347622 Number of partitions of n into at most 2 prime parts (counting 1 as a prime).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Sep 09 2021

Keywords

Crossrefs

A347623 Number of partitions of n into at most 4 prime parts (counting 1 as a prime).

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 12, 11, 14, 13, 15, 14, 18, 15, 20, 17, 22, 18, 25, 19, 26, 20, 26, 21, 30, 23, 33, 24, 35, 26, 38, 27, 40, 28, 41, 31, 48, 32, 50, 34, 53, 36, 58, 37, 60, 39, 61, 40, 67, 40, 68, 41, 72, 45, 79, 47, 82, 49
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 09 2021

Keywords

Crossrefs

Previous Showing 31-40 of 59 results. Next