Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #14 Feb 26 2021 01:36:59
%S 1,8,18,38,66,102,138,206,256,336,422,498,544,688,772,908,1034,1172,
%T 1304,1466,1570,1768,1940,2106,2292,2488,2702,2928,3138,3392,3606,
%U 3834,4140,4334,4638,4904,5182,5494,5800,6072,6394,6688,7022,7424,7762,8096,8442,8852,9112,9606
%N Main diagonal of array A082224.
%o (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 */
%Y Cf. A082224, A082228, A082231.
%K nonn,easy
%O 1,2
%A _Amarnath Murthy_, Apr 09 2003
%E Edited and extended _David Wasserman_, Feb 27 2006