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.
%I A087377 #13 May 23 2015 04:00:55 %S A087377 1,1,2,2,4,6,1,3,4,7,2,6,8,12,14,1,2,3,5,6,7,4,6,10,16,18,28,30,2,5,9, %T A087377 11,12,14,17,24,2,4,8,12,14,18,20,22,30,1,3,4,6,7,10,13,15,18,19,2,6, %U A087377 8,18,30,32,36,38,42,56,60,1,3,5,6,8,9,13,15,16,19,20,23,4,6,10,12,24,34 %N A087377 Triangle read by rows: n-th row contains n smallest numbers k (say) such that nk+1 is a prime. %C A087377 From _Robert Israel_, May 22 2015: (Start) %C A087377 If n is odd, all elements in row n are even. %C A087377 By Dirichlet's theorem, every positive integer occurs infinitely often in the sequence. (End) %H A087377 Ivan Neretin, <a href="/A087377/b087377.txt">Table of n, a(n) for n = 1..5050</a> %e A087377 1 %e A087377 1 2 %e A087377 2 4 6 %e A087377 1 3 4 7 %e A087377 2 6 8 12 14 %e A087377 1 2 3 5 6 7 %e A087377 4 6 10 16 18 28 30 %p A087377 F:= proc(n) local res,count,k; %p A087377 res:= NULL: %p A087377 count:= 0: %p A087377 for k from 1 while count < n do %p A087377 if isprime(n*k+1) then %p A087377 res:= res,k; %p A087377 count:= count+1 %p A087377 fi %p A087377 od; %p A087377 res %p A087377 end proc: %p A087377 seq(F(n),n=1..20); # _Robert Israel_, May 22 2015 %t A087377 a = {}; Do[k = 0; ar = {}; While[Length[ar] < n, k++; If[PrimeQ[k n + 1], AppendTo[ar, k]]]; a = Join[a, ar], {n, 13}]; a (* _Ivan Neretin_, May 22 2015 *) %o A087377 (PARI) tabl(nn) = {for (n = 1, nn, j = 0; for (k = 1, n, j++; while (!isprime(n*j+1), j++); print1(j, ", ");); print(););} \\ _Michel Marcus_, May 23 2015 %Y A087377 The first column is given by A034693. %Y A087377 Cf. A034693, A087376. %K A087377 nonn,tabl %O A087377 1,3 %A A087377 _Amarnath Murthy_, Sep 09 2003 %E A087377 More terms from _Sam Alexander_, Feb 27 2004