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.

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