login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A095182
Consider the triangle in which the j-th row begins with prime(j) and is the arithmetic progression with least common difference such that the remaining j-1 terms are composite and not divisible by prime(j). Sequence gives last term in each row.
2
2, 4, 27, 10, 39, 68, 299, 194, 159, 497, 261, 840, 1205, 576, 901, 2318, 2155, 2730, 2569, 1762, 4853, 9550, 6265, 8622, 12313, 7176, 17289, 7208, 23657, 17136, 25297, 41640, 21609, 38782, 17115, 45056, 10561, 70574, 28401, 63392, 104539, 14900
OFFSET
1,1
MATHEMATICA
a[n_] := For[r = 1, True, r++, ro = Table[Prime[n] + k* r, {k, 0, n - 1}]; If[AllTrue[Rest[ro], CompositeQ[#] && !Divisible[#, Prime[n]]&], Return[ro[[-1]]]]]; Table[a[n], {n, 1, 42}] (* Jean-François Alcover, Sep 26 2017 *)
PROG
(PARI) For arithprog(p, j) see A095181. {m=42; for(j=1, m, p=prime(j); d=arithprog(p, j); print1(p+d*(j-1), ", "))}
CROSSREFS
Cf. A095181 for the first few rows of the triangle.
Sequence in context: A102996 A358563 A189896 * A104465 A175759 A098515
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jun 02 2004
EXTENSIONS
Edited and extended by Klaus Brockhaus, Jun 03 2004
STATUS
approved