OFFSET
1,1
EXAMPLE
Triangle begins:
4
6 8
8 10 12
9 12 15 18
10 12 14 16 18
12 14 16 18 20 22
...
MAPLE
A002808 := proc(n) local resul, i ; i := 1 ; resul := 4 ; while i < n do resul := resul+1 ; while isprime(resul) do resul := resul+1 ; od ; i := i+1 ; od; RETURN(resul) ; end: A079775 := proc(n) local a, anxt, atst ; a := [A002808(n)] ; while nops(a) < n do anxt := op(-1, a)+1 ; atst := [ op(a), anxt] ; while igcd(op(atst)) = 1 do anxt := anxt+1 ; atst := [ op(a), anxt] ; od ; a := [op(a), anxt] ; od; RETURN(a) ; end: for n from 1 to 20 do arow := A079775(n) : for m from 1 to nops(arow) do printf("%d, ", op(m, arow)) ; od ; # R. J. Mathar, Apr 01 2007
MATHEMATICA
A002808[n_] := Module[{resul, i}, i = 1; resul = 4; While[i < n, resul++; While[PrimeQ[resul], resul++]; i++]; Return[resul]];
A079775[n_] := Module[{a, anxt, atst}, a = {A002808[n]}; While[Length[a] < n, anxt = a[[-1]]+1; atst = Append[a, anxt]; While[GCD @@ atst == 1, anxt++; atst = Append[a, anxt]]; a = Append[a, anxt]]; Return[a]];
Table[A079775[n], {n, 1, 20}] // Flatten (* Jean-François Alcover, Mar 27 2024, after R. J. Mathar *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Amarnath Murthy, Jan 31 2003
EXTENSIONS
Corrected and extended by R. J. Mathar, Apr 01 2007
STATUS
approved