login
A082225
First row of array A082224.
5
1, 2, 10, 6, 22, 20, 42, 46, 78, 80, 114, 120, 168, 172, 210, 216, 290, 274, 342, 338, 412, 408, 492, 528, 608, 624, 706, 710, 790, 800, 922, 926, 1050, 1056, 1174, 1166, 1326, 1324, 1496, 1452, 1632, 1600, 1824, 1830, 1976, 2004, 2176, 2184, 2372, 2364
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]==1, 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