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-8 of 8 results.

A333337 Indices of rows of n consecutive smallest primes in A333238, or -1 if n consecutive smallest primes do not appear in A333238.

Original entry on oeis.org

0, 1, 2, 4, 6, 8, 9, 10, 12, 15, 16, 18, 20, 21, 25, 27, 24, 28, 33, 35, 30, 39, 44, 45, 49, 51, 55, 63, 57, 65, 69, 75, 77, 81, 85, 60, 76, 87, 91, 95, 99, 105, 111, 115, 117, 119, 121, 123, 125, 135, 143, 145, 147, 153, 155, 161, 169, 159, 165, 171, 175, 177
Offset: 0

Views

Author

Keywords

Comments

Consider the irregular table where row m lists the distinct smallest primes p of prime partitions of m. Row n of this sequence contains all m that have n consecutive primes starting with 2.
Alternatively, positions of k-repunits in A333259.
A330507(n) = First terms in row n.
Null rows occur at n = {90, 151, 349, 352, 444, ...} and are thus filled with the term -1.

Examples

			Table begins:
       0:    0     1
       1:    2     4
       2:    6     8     9
       3:   10    12    15    16
       4:   18    20    21    25    27
       5:   24    28    33    35
       6:   30    39    44    45    49
       7:   51    55    63
       8:   57    65
       9:   60    76    87    91    95
      10:   69    75    77    81    85
      11:   99   105
      12:  111   115   117   119   121
      13:  123   125   135
      14:  143   145
      15:  147   153   155   161   169
      16:  159   165   171   175
      17:  177   185   187
Consider the table plotting prime p in row m of A333238 at pi(p) place; intervening primes missing from row m are shown by "." as a place holder:
    m      Primes in row m of A333238
    ---------------------------------
    2:     2
    3:     .   3
    4:     2
    5:     2   .   5
    6:     2   3
    7:     2   .   .   7
    8:     2   3
    9:     2   3
    10:    2   3   5
    11:    2   3   .   .  11
    12:    2   3   5
    13:    2   3   .   .   .  13
    14:    2   3   .   7
    15:    2   3   5
    16:    2   3   5
    17:    2   3   5   .   .   .  17
    ...
There are no primes in rows 0 or 1 of A333238, thus row 0 of this sequence contains {0, 1}.
The smallest prime, 2, appears alone in rows 2 and 4 of A333238, thus row 1 of this sequence contains {2, 4}.
We have the primes {2, 3} and no other primes in rows {6, 8, 9} in A333238, thus row 2 of this sequence contains {6, 8, 9}.
We have the primes {2, 3, 5} and no other primes in rows {10, 12, 15, 16} in A333238, thus row 3 of this sequence contains {10, 12, 15, 16}, etc.
		

Crossrefs

Programs

  • Mathematica
    Block[{m = 120, s, a}, a = ConstantArray[{}, m]; s = {Prime@ PrimePi@ m}; Do[If[# <= m, If[FreeQ[a[[#]], Last@ s], a = ReplacePart[a, # -> Union@ Append[a[[#]], Last@ s]], Nothing]; AppendTo[s, Last@ s], If[Last@ s == 2, s = DeleteCases[s, 2]; If[Length@s == 0, Break[], s = MapAt[Prime[PrimePi[#] - 1] &, s, -1]], s = MapAt[Prime[PrimePi[#] - 1] &, s, -1]]] &@ Total[s], {i, Infinity}]; s = {0}~Join~Map[Which[Length@ # == 0, 0, And[Length@ # == 1, First@ # == 2], 1, True, If[Union@ # == {1}, Length@ # + 1, -1] &[Differences@ PrimePi@ #, {} -> {2}]] &, a]; Array[-1 + Position[s, #][[All, 1]] /. k_ /; MissingQ@ k -> {-1} &, Max@ s + 1, 0]]

A330507 a(n) is the smallest number k having for every prime p <= prime(n) at least one prime partition with least part p, and no such partition having least part > prime(n). If no such k exists then a(n) = 0 (see comments).

Original entry on oeis.org

2, 6, 10, 18, 24, 30, 51, 57, 69, 60, 99, 111, 123, 143, 147, 159, 177, 189, 201, 213, 225, 245, 255, 267, 291, 303, 309, 321, 345, 357, 381, 393, 411, 427, 447, 465, 471, 493, 507, 519, 537, 553, 573, 583, 623, 621, 633, 669, 681, 695, 707, 729, 749, 753, 783
Offset: 1

Views

Author

David James Sycamore, Mar 01 2020

Keywords

Comments

Alternatively, a(n) is the smallest number whose product of distinct least part primes from all partitions of n into prime parts, is equal to primorial(n).
2 is the only prime term.
a(n) = 0 for n = 90, 151, 349, 352, 444, ... . - Alois P. Heinz, Mar 12 2020

Examples

			a(1) = 2 because [2] is the only prime partition of prime(1) = 2.
a(2) = 6 because [2,2,2] and [3,3] are the only possible prime partitions of 6, namely with prime(1) and prime(2) the only least parts.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, p, t) option remember; `if`(n=0, 1, `if`(p>n, 0, (q->
          add(b(n-p*j, q, 1), j=1..n/p)*t^p+b(n, q, t))(nextprime(p))))
        end:
    a:= proc(n) option remember; local f, k, p; p:= ithprime(n);
          for k to 4*p do f:= b(k, 2, x); if degree(f)<= p and andmap(
            h->0Alois P. Heinz, Mar 12 2020
  • Mathematica
    With[{s = Array[Union@ Select[IntegerPartitions[#], AllTrue[#, PrimeQ] &][[All, -1]] &, 70]}, TakeWhile[Map[FirstPosition[s, #][[1]] &, Rest@ NestList[Append[#, Prime[Length@ # + 1]] &, {}, 12]], IntegerQ]] (* Michael De Vlieger, Mar 06 2020 *)
    (* Second program: *)
    Block[{a, m = 125, s}, a = ConstantArray[{}, m]; s = {Prime@ PrimePi@ m}; Do[If[# <= m, If[FreeQ[a[[#]], Last@ s], a = ReplacePart[a, # -> Union@ Append[a[[#]], Last@ s]], Nothing]; AppendTo[s, Last@ s], If[Last@ s == 2, s = DeleteCases[s, 2]; If[Length@ s == 0, Break[], s = MapAt[Prime[PrimePi[#] - 1] &, s, -1]], s = MapAt[Prime[PrimePi[#] - 1] &, s, -1]]] &@ Total[s], {i, Infinity}]; TakeWhile[Map[FirstPosition[a, #][[1]] &, Rest@ NestList[Append[#, Prime[Length@ # + 1]] &, {}, Max[Length /@ a]]], IntegerQ]] (* Michael De Vlieger, Mar 11 2020 *)

Extensions

a(19)-a(21) from Michael De Vlieger, Mar 12 2020
a(22)-a(55) from Alois P. Heinz, Mar 12 2020

A333129 Product of all distinct least part primes from all partitions of n into prime parts.

Original entry on oeis.org

1, 1, 2, 3, 2, 10, 6, 14, 6, 6, 30, 66, 30, 78, 42, 30, 30, 510, 210, 570, 210, 210, 330, 690, 2310, 210, 2730, 210, 2310, 6090, 30030, 6510, 2730, 2310, 39270, 2310, 46410, 85470, 3990, 30030, 39270, 94710, 570570, 1291290, 30030, 30030, 903210, 1411410, 746130
Offset: 0

Views

Author

David James Sycamore, Mar 08 2020

Keywords

Comments

For all n, omega(a(n)) = Omega(a(n)). The prime factorization of each term gives the least part primes of all partitions of n into prime parts.
Product of all terms in row n of A333238. - Alois P. Heinz, Mar 16 2020

Examples

			a(2) = 2 because [2] is the only prime partition of 2. a(5) = 10 because the prime partitions of 5 are [2,3] and [5], so the products of all distinct least part primes is 2*5 = 10.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, p, t) option remember; `if`(n=0, 1, `if`(p>n, 0, (q->
          add(b(n-p*j, q, 1), j=1..n/p)*t^p+b(n, q, t))(nextprime(p))))
        end:
    a:= n-> (p-> mul(`if`(coeff(p, x, i)>0, i, 1), i=2..n))(b(n, 2, x)):
    seq(a(n), n=0..55);  # Alois P. Heinz, Mar 12 2020
  • Mathematica
    a[0] = 1; a[n_] := Times @@ Union[Min /@ IntegerPartitions[n, All, Prime[ Range[PrimePi[n]]]]];
    a /@ Range[0, 55] (* Jean-François Alcover, Nov 01 2020 *)

A333259 a(n) = Sum_{p in L(n)} 2^(pi(p) - 1) where L(n) is the set of all least primes in partitions of n into prime parts.

Original entry on oeis.org

0, 0, 1, 2, 1, 5, 3, 9, 3, 3, 7, 19, 7, 35, 11, 7, 7, 71, 15, 135, 15, 15, 23, 263, 31, 15, 47, 15, 31, 527, 63, 1039, 47, 31, 95, 31, 111, 2079, 143, 63, 95, 4127, 191, 8255, 63, 63, 351, 16447, 223, 63, 191, 127, 319, 32895, 383, 127, 191, 255, 639, 65663
Offset: 0

Views

Author

Michael De Vlieger, Mar 16 2020

Keywords

Comments

In other words, convert the indices of primes p_i in row n of A333238 to 1s in the (i - 1)-th place to create a binary number m; convert m to decimal.
The number of prime partitions of n is shown by A000607(n), which in terms of this sequence equates to the number of 1s in a(n), written in binary.
For prime p, row p of A333238 includes p itself as the largest term, since p is the sum of (p); here we find a(p) >= 2^(p - 1). More specifically, a(2) = 1, a(p) > 2^(p - 1) for p odd.
For n = A330507(m), a(n) = 2^m - 1, the smallest n with this value in this sequence.

Examples

			The least primes among the prime partitions of 5 are 2 and 5, cf. the 2 prime partitions of 5: (5) and (3, 2), thus row 5 of A333238 lists {2, 5}. Convert these to their indices gives us {1, 3}, take the sum of 2^(1 - 1) and 2^(3 - 1) = 2^0 + 2^2 = 1 + 4 = 5, thus a(5) = 5.
The least primes among the prime partitions of 6 are 2 and 3, cf. the two prime partitions of 6, (3, 3), and (2, 2, 2), thus row 6 of A333238 lists {2, 3}. Convert these to their indices: {1, 2}, take the sum of 2^(1 - 1) and 2^(2 - 1) = 2^0 + 2^1 = 1 + 2 = 3, thus a(6) = 3.
Row 7 of A333238 contains {2, 7} because there are 3 prime partitions of 7: (7), (5, 2), (3, 2, 2). Note that 2 is the smallest part of the latter two partitions, thus only 2 and 7 are distinct. Convert to indices: {1, 4}, sum 2^(1 - 1) and 2^(4 - 1) = 2^0 + 2^3 = 1 + 8 = 9, therefore a(7) = 9.
Table plotting prime p in row n of A333238 at pi(p) place, intervening primes missing from row n are shown by "." as a place holder. We convert the indices of these primes into a binary number to obtain the terms of this sequence:
    n      Row n of A333238    binary   a(n)
    ---------------------------------------
    2:     2                 =>     1 =>  1
    3:     .   3             =>    10 =>  2
    4:     2                 =>     1 =>  1
    5:     2   .   5         =>   101 =>  5
    6:     2   3             =>    11 =>  3
    7:     2   .   .   7     =>  1001 =>  9
    8:     2   3             =>    11 =>  3
    9:     2   3             =>    11 =>  3
    10:    2   3   5         =>   111 =>  7
    11:    2   3   .   .  11 => 10011 => 19
    12:    2   3   5         =>   111 =>  7
    ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, p, t) option remember; `if`(n=0, 1, `if`(p>n, 0, (q->
          add(b(n-p*j, q, 1), j=1..n/p)*t^p+b(n, q, t))(nextprime(p))))
        end:
    a:= proc(n) option remember; (p-> add(`if`(isprime(i) and coeff(p, x,
          i)>0, 2^(numtheory[pi](i)-1), 0), i=2..degree(p)))(b(n, 2, x))
        end:
    seq(a(n), n=0..63);  # Alois P. Heinz, Mar 16 2020
  • Mathematica
    Block[{a, m = 59, s}, a = ConstantArray[{}, m]; s = {Prime@ PrimePi@ m}; Do[If[# <= m, If[FreeQ[a[[#]], Last@ s], a = ReplacePart[a, # -> Append[a[[#]], Last@ s]], Nothing]; AppendTo[s, Last@ s], If[Last@ s == 2, s = DeleteCases[s, 2]; If[Length@ s == 0, Break[], s = MapAt[Prime[PrimePi[#] - 1] &, s, -1]], s = MapAt[Prime[PrimePi[#] - 1] &, s, -1]]] &@ Total[s], {i, Infinity}]; {0, 0}~Join~Map[Total[2^(-1 + PrimePi@ #)] &, Rest[Union /@ a]]]

A333365 T(n,k) is the number of times that prime(k) is the least part in a partition of n into prime parts; triangle T(n,k), n >= 0, 1 <= k <= max(1,A000720(A331634(n))), read by rows.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 2, 0, 0, 1, 2, 1, 3, 1, 3, 1, 1, 4, 1, 0, 0, 1, 5, 1, 1, 6, 2, 0, 0, 0, 1, 7, 2, 0, 1, 9, 2, 1, 10, 3, 1, 12, 3, 1, 0, 0, 0, 1, 14, 3, 1, 1, 17, 4, 1, 0, 0, 0, 0, 1, 19, 5, 1, 1, 23, 5, 1, 1, 26, 6, 2, 0, 1, 30, 7, 2, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, Mar 16 2020

Keywords

Examples

			In the A000607(11) = 6 partitions of 11 into prime parts, (11), 335, 227, 2225, 2333, 22223 the least parts are 11 = prime(5) (once), 3 = prime(2)(once), and 2 = prime(1) (four times), whereas 5 and 7 (prime(3) and prime(4)) do not occur. Thus row 11 is [4,1,0,0,1].
Triangle T(n,k) begins:
   0    ;
   0    ;
   1    ;
   0, 1    ;
   1       ;
   1, 0, 1    ;
   1, 1       ;
   2, 0, 0, 1    ;
   2, 1          ;
   3, 1          ;
   3, 1, 1       ;
   4, 1, 0, 0, 1    ;
   5, 1, 1          ;
   6, 2, 0, 0, 0, 1    ;
   7, 2, 0, 1          ;
   9, 2, 1             ;
  10, 3, 1             ;
  12, 3, 1, 0, 0, 0, 1    ;
  14, 3, 1, 1             ;
  17, 4, 1, 0, 0, 0, 0, 1    ;
  19, 5, 1, 1                ;
  ...
		

Crossrefs

Columns k=1-2 give: A000607(n-2) for n>1, A099773(n-3) for n>2.
Row sums give A000607 for n>0.
Length of n-th row is A000720(A331634(n)) for n>1.
Indices of rows without 1's: A330433.

Programs

  • Maple
    b:= proc(n, p, t) option remember; `if`(n=0, 1, `if`(p>n, 0, (q->
          add(b(n-p*j, q, 1), j=1..n/p)*t^p+b(n, q, t))(nextprime(p))))
        end:
    T:= proc(n) option remember; (p-> seq(`if`(isprime(i),
          coeff(p, x, i), [][]), i=2..max(2,degree(p))))(b(n, 2, x))
        end:
    seq(T(n), n=0..23);
  • Mathematica
    b[n_, p_, t_] := b[n, p, t] = If[n == 0, 1, If[p > n, 0, With[{q = NextPrime[p]}, Sum[b[n - p*j, q, 1], {j, 1, n/p}]*t^p + b[n, q, t]]]];
    T[n_] := If[n < 2, {0}, MapIndexed[If[PrimeQ[#2[[1]]], #1, Nothing]&, Rest @ CoefficientList[b[n, 2, x], x]]];
    T /@ Range[0, 23] // Flatten (* Jean-François Alcover, Mar 30 2021, after Alois P. Heinz *)

Formula

T(n,pi(n)) = A010051(n) for n > 1.
T(p,pi(p)) = 1 if p is prime.
T(prime(k),k) = 1 for k >= 1.
Recursion: T(n,k) = Sum_{q=k..pi(n-p)} T(n-p, q) with p := prime(k) and T(n,k) = 0 if n < p, or 1 if n = p. - David James Sycamore, Mar 28 2020

A333266 a(n) is the smallest number k such that for all m >= k there is at least one prime partition of m with prime(n) as least part.

Original entry on oeis.org

4, 8, 15, 24, 39, 49, 67, 83, 89, 115, 127, 143, 163, 179, 193, 223, 235, 249, 271, 281, 295, 333, 349, 363, 387, 403, 409, 427, 461, 483, 515, 535, 545, 565, 595, 625, 643, 659, 685, 703, 725, 733, 759, 805, 813, 835, 851, 895, 907, 923, 937, 965, 989, 1033
Offset: 1

Views

Author

David James Sycamore, Mar 13 2020

Keywords

Comments

a(n) is a term if and only if it is the smallest number such that there exists a prime partition of every m in the interval [a(n), 2*a(n)] with least part prime(n). There is no prime partition of a(n)-1 having prime(n) as least part, and this is the greatest such number.

Examples

			For any k >= 4 there exists a prime partition of k having least part 2, hence a(1)=4.
		

Crossrefs

Extensions

More terms from Alois P. Heinz, Mar 16 2020

A333417 a(n) is the greatest number k having for every prime <= prime(n) at least one prime partition with least part p, and no such partition having least part > prime(n). If no such k exists then a(n) = 0.

Original entry on oeis.org

4, 9, 16, 27, 35, 49, 63, 65, 85, 95, 105, 121, 135, 145, 169, 175, 187, 203, 207, 221, 253, 265, 273, 289, 301, 305, 319, 351, 369, 387, 403, 407, 425, 445, 473, 485, 495, 517, 529, 545, 551, 567, 611, 615, 629, 637, 671, 679, 693, 697, 725, 747, 781, 793, 799
Offset: 1

Views

Author

David James Sycamore, Mar 20 2020

Keywords

Comments

Alternatively a(n) is the greatest number whose product of distinct least part primes from all prime partitions of n, is equal to primorial(n). Companion sequence to A330507.
From Michael De Vlieger, Mar 20 2020: (Start)
a(n) = 0 for n = {90, 151, 349, 352, 444, ...}, cf. the comment from Alois P. Heinz at A330507.
Index m of last instance of A002110(n) in A333129 as m increases.
Last row n in A333238 that contains the consecutive primes (1...n).
Last index of the occurrence of 2^n - 1 in A333259, which is the decimal value of the characteristic function of primes in A333238 interpreted as a binary number. (End)

Examples

			a(1) = 4 because [2,2] is the only prime partition of 4, and no greater number n has only 2 as least part in any partition of n into primes.
From _Michael De Vlieger_, Mar 20 2020: (Start)
Looking at this sequence as the first position of 2^n - 1 in A333259, which in binary is a k-bit repunit, we look for the last occasion of such in A333259, indicated by the arrows. a(k) = n for rows n that have an arrow. In the chart, we reverse the portrayal of the binary rendition of A333259(n), replacing zeros with "." for clarity:
   n   A333259(n)            k
------------------------------
   2   1                     1
   3   . 1
   4   1                  -> 1
   5   1 . 1
   6   1 1                   2
   7   1 . . 1
   8   1 1                   2
   9   1 1                -> 2
  10   1 1 1                 3
  11   1 1 . . 1
  12   1 1 1                 3
  13   1 1 . . . 1
  14   1 1 . 1
  15   1 1 1                 3
  16   1 1 1              -> 3
  17   1 1 1 . . . 1
  18   1 1 1 1               4
  19   1 1 1 . . . . 1
  20   1 1 1 1               4
  ... (End)
		

Crossrefs

Programs

  • Mathematica
    With[{s = TakeWhile[Import["https://oeis.org/A333259/b333259.txt", "Data"], Length@ # > 0 &][[All, -1]]}, Array[If[Length[#] == 0, 0, #[[-1, 1]] - 1] &@ Position[s, 2^# - 1] &, 55]] (* Michael De Vlieger, Mar 20 2020, using the b-file at A333259 *)

Extensions

More terms from Michael De Vlieger, Mar 20 2020

A333636 a(n) is the greatest least part of a partition of n into prime parts which does not divide n, or 0 if no such prime exists.

Original entry on oeis.org

0, 0, 0, 2, 0, 2, 3, 2, 3, 3, 5, 3, 3, 2, 5, 5, 7, 5, 7, 5, 5, 5, 11, 7, 7, 7, 11, 7, 13, 7, 13, 7, 11, 11, 17, 11, 7, 11, 17, 11, 19, 13, 13, 13, 17, 13, 19, 13, 19, 13, 23, 17, 23, 17, 19, 17, 17, 17, 29, 19, 19, 17, 23, 19, 29, 19, 31, 19, 29, 19, 31, 19, 31, 23, 29, 23, 37, 19, 37, 23, 29, 23, 41
Offset: 2

Views

Author

David James Sycamore, Mar 30 2020

Keywords

Comments

For n = 2,3,4,6 a(n) = 0. For n > 6 there are no terms a(n) = 0, and therefore n has at least one prime partition whose least part prime does not divide n. This sequence lists the greatest such prime for each n. The indices of the records of this sequence are in A001043.

Examples

			The only prime partition of 2 is [2], but 2|2, so a(2) = 0. Also, since [2,2,2] and [3,3] are the prime partitions of 6, with 2|6 and 3|6, a(6) = 0. The prime partitions of 5 are [2,3] and [5], but 2 does not divide 5 so a(5) = 2.
From _Michael De Vlieger_, Apr 01 2020: (Start)
Chart showing terms k in rows 5 <= n <= 24 of A333238, plotted at pi(k), with "." replacing terms k | n. In the table, we place a(n) in parenthesis:
   n   k
  -------------------
   5  (2)      .
   6   .   .
   7  (2)          .
   8   .  (3)
   9  (2)  .
  10   .  (3)  .
  11   2  (3)          .
  12   .   .  (5)
  13   2  (3)              .
  14   .  (3)      .
  15  (2)  .   .
  16   .   3  (5)
  17   2   3  (5)              .
  18   .   .   5  (7)
  19   2   3  (5)                  .
  20   .   3   .  (7)
  21   2   .  (5)  .
  22   .   3  (5)      .
  23   2   3  (5)                      .
  24   .   .   5   7  (11)
  ... (End)
		

Crossrefs

Programs

  • Mathematica
    Block[{m = 84, s, a}, a = ConstantArray[{}, m]; s = {Prime@ PrimePi@ m}; Do[If[# <= m, If[And[FreeQ[a[[#]], Last[s]], Mod[#, Last[s]] != 0], a = ReplacePart[a, # -> Union@ Append[a[[#]], Last@ s]], Nothing]; AppendTo[s, Last@ s], If[Last@ s == 2, s = DeleteCases[s, 2]; If[Length@ s == 0, Break[], s = MapAt[Prime[PrimePi[#] - 1] &, s, -1]], s = MapAt[Prime[PrimePi[#] - 1] &, s, -1]]] &@ Total[s], {i, Infinity}]; Map[If[Length[#] == 0, 0, Last@ #] &, Rest@ a]] (* Michael De Vlieger, Apr 01 2020 *)
Showing 1-8 of 8 results.