login
A082230
First column of A082228.
4
1, 2, 4, 10, 14, 28, 38, 54, 60, 96, 90, 150, 136, 194, 186, 238, 242, 318, 342, 376, 390, 480, 458, 550, 546, 650, 646, 758, 760, 876, 894, 1002, 998, 1152, 1120, 1262, 1260, 1402, 1400, 1560, 1600, 1728, 1730, 1896, 1914, 2038, 2072, 2242, 2268, 2462, 2458
OFFSET
1,2
PROG
(PARI) lista(nn) = { my(A=matrix(nn, nn)); S=Set(); for(s=2, nn+1, for(i=1, s-1, if(s%2, q=[i, s-i], q=[s-i, i]); p=[sum(j=1, q[2]-1, A[q[1], j]), sum(j=1, q[1]-1, A[j, q[2]])]; n=1; while(setsearch(S, n) || (p[1]&&isprime(p[1]+n)) || (p[2]&&!isprime(p[2]+n)), n++); A[q[1], q[2]]=n; S=setunion(S, Set([n])); if(q[2]==1, print1(n, ", ")); )) } \\ This is a modification of Max Alekseyev's PARI program from A082228. - Petros Hadjicostas, Feb 25 2021
KEYWORD
hard,nonn
AUTHOR
Amarnath Murthy, Apr 09 2003
EXTENSIONS
Extended by Max Alekseyev, Apr 11 2009
Various sections edited by Petros Hadjicostas, Feb 25 2021
STATUS
approved