OFFSET
1,1
LINKS
Nathaniel Johnston, Rows 1..100, flattened
EXAMPLE
Triangle begins:
2;
3, 5;
7, 13, 19;
5, 13, 17, 29;
11, 31, 41, 61, 71;
...
MAPLE
Tj := proc(n, k) option remember: local j, p: if(k=0)then return 0:fi: for j from procname(n, k-1)+1 do if(isprime(n*j+1))then return j: fi: od: end: A077316 := proc(n, k) return n*Tj(n, k)+1: end: seq(seq(A077316(n, k), k=1..n), n=1..15); # Nathaniel Johnston, Sep 02 2011
MATHEMATICA
Tj[n_, k_] := Tj[n, k] = Module[{j}, If[k == 0, Return[0]];
For[j = Tj[n, k-1]+1, True, j++, If[PrimeQ[n*j+1], Return[j]]]];
T[n_, k_] := n*Tj[n, k]+1;
Table[Table[T[n, k], {k, 1, n}], {n, 1, 15}] // Flatten (* Jean-François Alcover, Aug 02 2022, after Nathaniel Johnston *)
CROSSREFS
KEYWORD
AUTHOR
Amarnath Murthy, Nov 04 2002
EXTENSIONS
Edited and extended by Franklin T. Adams-Watters, Aug 29 2006
STATUS
approved