login
A082227
Main diagonal of array A082224.
5
1, 8, 18, 38, 66, 102, 138, 206, 256, 336, 422, 498, 544, 688, 772, 908, 1034, 1172, 1304, 1466, 1570, 1768, 1940, 2106, 2292, 2488, 2702, 2928, 3138, 3392, 3606, 3834, 4140, 4334, 4638, 4904, 5182, 5494, 5800, 6072, 6394, 6688, 7022, 7424, 7762, 8096, 8442, 8852, 9112, 9606
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[1]==q[2], print1(n, ", ")); )) } /* This is a modification of the PARI program by Max Alekseyev in A082228. - Petros Hadjicostas, Feb 25 2021 */
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Apr 09 2003
EXTENSIONS
Edited and extended David Wasserman, Feb 27 2006
STATUS
approved