A102330 Triangle read by rows: n-th row consists of the lexicographically earliest set of n distinct primes whose sum is A068873(n).
2, 2, 3, 3, 5, 11, 2, 3, 5, 7, 3, 5, 7, 11, 17, 2, 3, 5, 7, 11, 13, 3, 5, 7, 11, 13, 17, 23, 2, 3, 5, 7, 11, 13, 19, 23, 3, 5, 7, 11, 13, 17, 19, 23, 29, 2, 3, 5, 7, 11, 13, 17, 19, 23, 31, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 41, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 3, 5, 7, 11, 13, 17
Offset: 1
Examples
Triangle begins: 2 2,3 3,5,11 2,3,5,7 3,5,7,11,17 2,3,5,7,11,13 3,5,7,11,13,17,23 2,3,5,7,11,13,19,23 3,5,7,11,13,17,19,23,29 2,3,5,7,11,13,17,19,23,31 3,5,7,11,13,17,19,23,29,31,41 2,3,5,7,11,13,17,19,23,29,31,37 3,5,7,11,13,17,19,23,29,31,37,41,47 2,3,5,7,11,13,17,19,23,29,31,37,41,43 3,5,7,11,13,17,19,23,29,31,37,41,43,47,53
Links
- David A. Corneth, Table of n, a(n) for n = 1..10011 (first 141 rows flattened, first 300 terms from Jean-Francois Alcover, terms 301..2485 from Robert Israel)
- Robert Israel, Table of n, a(n) for n = 1..2485 (rows 1 to 70, flattened), replacing incorrect b-file from Jean-Francois Alcover
Crossrefs
By definition, row sums are A068873.
Programs
-
Maple
g:= proc(n,k,m) option remember; # lex earliest set of k distinct primes > m with sum n local q,v; if k = 1 then if isprime(n) and n > m then return [n] else return NULL fi fi; q:= m; do q:= nextprime(q); if n < k*q then return NULL fi; v:= procname(n-q,k-1,q); if v <> NULL then return [q,op(v)] fi od end proc: f:= proc(k) local p,i,v; p:= add(ithprime(i),i=1..k)-1; do p:= nextprime(p); v:= g(p,k,0); if v <> NULL then return v fi od end proc: for k from 1 to 30 do f(k) od; # Robert Israel, May 12 2025
-
Mathematica
(* Computation verified with A068873. *) row[n_] := Module[{s, m}, s = Select[{#, Total[#]}& /@ Subsets[ Prime[ Range[n+4]], {n}], PrimeQ[#[[2]]]&]; m = MinimalBy[s, #[[2]]&, 1]; If[s != {}, Return[m[[1, 1]]]]]; Array[row, 49] // Flatten (* Jean-François Alcover, Apr 23 2020 *)
Extensions
Edited, corrected and extended by Ray Chandler, Feb 02 2005
Edited by N. J. A. Sloane, May 07 2014