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.

A333238 Irregular table where row n lists the distinct smallest primes p of prime partitions of n.

This page as a plain text file.
%I A333238 #40 Mar 20 2025 04:15:40
%S A333238 2,3,2,2,5,2,3,2,7,2,3,2,3,2,3,5,2,3,11,2,3,5,2,3,13,2,3,7,2,3,5,2,3,
%T A333238 5,2,3,5,17,2,3,5,7,2,3,5,19,2,3,5,7,2,3,5,7,2,3,5,11,2,3,5,23,2,3,5,
%U A333238 7,11,2,3,5,7,2,3,5,7,13,2,3,5,7,2,3,5,7,11
%N A333238 Irregular table where row n lists the distinct smallest primes p of prime partitions of n.
%C A333238 A prime partition of n is an integer partition wherein all parts are prime. For instance, (3 + 2) is a prime partition of the sum 5; for n = 5, (5) is also a prime partition. For 6, we have two prime partitions (3 + 3) and (2 + 2 + 2).
%C A333238 We note that there are no prime partitions for n = 1, therefore the offset of this sequence is 2.
%C A333238 The number of prime partitions of n is shown by A000607(n).
%C A333238 For prime p, row p includes p itself as the largest term, since p is the sum of (p).
%C A333238 The product of all terms in row n gives A333129(n). - _Alois P. Heinz_, Mar 16 2020
%C A333238 From _David James Sycamore_, Mar 28 2020: (Start)
%C A333238 In the irregular table below, T(n,k) is either prime(k) or is empty. The former means there is at least one prime partition of n with least part prime(k), the latter means that no such partition exists. T(n,k) empty is not recorded in the data.
%C A333238 Recursion for n >= 4: T(n,k) = prime(k) iff T(n-prime(k), k) = prime(k), or there is a q > k such that T(n-prime(k), q) = prime(q); else T(n,k) is empty. Example: T(17,3) = 5 because T(12,3) = prime(3) = 5. T(10,2) = 3 since although T(7,2) is empty, T(7,4) = prime(4) = 7. (End)
%H A333238 Alois P. Heinz, <a href="/A333238/b333238.txt">Rows n = 2..1000, flattened</a> (rows n=2..240 from Michael De Vlieger)
%H A333238 Michael De Vlieger, <a href="/A333238/a333238.png">Labeled plot of p at (pi(p), n)</a>, for 2 <= n <= 240, with terms n in A330507 shown in red.
%e A333238 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 lists {2, 5}.
%e A333238 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 lists {2, 3}.
%e A333238 Row 7 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.
%e A333238 Table plotting prime p in row n at pi(p) place, intervening primes missing from row n are shown by "." as a place holder:
%e A333238 n      Primes in row n
%e A333238 ----------------------
%e A333238 2:     2
%e A333238 3:     .   3
%e A333238 4:     2
%e A333238 5:     2   .   5
%e A333238 6:     2   3
%e A333238 7:     2   .   .   7
%e A333238 8:     2   3
%e A333238 9:     2   3
%e A333238 10:    2   3   5
%e A333238 11:    2   3   .   .  11
%e A333238 12:    2   3   5
%e A333238 13:    2   3   .   .   .  13
%e A333238 14:    2   3   .   7
%e A333238 15:    2   3   5
%e A333238 16:    2   3   5
%e A333238 17:    2   3   5   .   .   .  17
%e A333238 ...
%p A333238 b:= proc(n, p, t) option remember; `if`(n=0, 1, `if`(p>n, 0, (q->
%p A333238       add(b(n-p*j, q, 1), j=1..n/p)*t^p+b(n, q, t))(nextprime(p))))
%p A333238     end:
%p A333238 T:= proc(n) option remember; (p-> seq(`if`(isprime(i) and
%p A333238       coeff(p, x, i)>0, i, [][]), i=2..degree(p)))(b(n, 2, x))
%p A333238     end:
%p A333238 seq(T(n), n=2..40);  # _Alois P. Heinz_, Mar 16 2020
%t A333238 Block[{a, m = 20, s}, a = ConstantArray[{}, m]; s = {Prime@ PrimePi@ m}; Do[If[# <= m, If[FreeQ[a[[#]], First@ 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}]; Union /@ a // Flatten]
%Y A333238 Cf. A330507, A333129, A333259, A333365.
%K A333238 nonn,tabf
%O A333238 2,1
%A A333238 _Michael De Vlieger_, _David James Sycamore_, Mar 12 2020