login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A082228 In the following square array numbers (not occurring earlier) are entered like this a(1, 1), a(1, 2), a(2, 1), a(3, 1), a(2, 2), a(1, 3), a(1, 4), a(2, 3), a(3, 2), a(4, 1), a(5, 1), a(4, 2), ... such that every partial sum (n>1) of the rows is composite and every partial sum (n>1) of the columns is prime. Sequence contains the terms in the order in which they are entered. 4
1, 3, 2, 4, 8, 5, 6, 12, 18, 10, 14, 24, 20, 11, 7, 13, 16, 26, 22, 30, 28, 38, 44, 42, 36, 48, 46, 9, 19, 34, 50, 32, 52, 56, 40, 54, 60, 62, 66, 68, 64, 58, 70, 78, 15, 17, 82, 76, 80, 72, 74, 84, 88, 102, 96, 90, 100, 86, 106, 108, 92, 114, 98, 94, 110, 21, 25, 116, 112, 120 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..70.

EXAMPLE

Square array begins

   1  3  5  6 ...

   2  8 12 ...

   4 18 ...

  10 24 ...

  14 ...

  ...

E.g., the third partial sum of the second row is 2+8+12 = 22, which is composite, while the same for the second column is 3+8+18 = 29, which is prime.

PROG

(PARI) { A=matrix(100, 100); S=Set(); for(s=2, 101, 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])); print1(n, ", "); )) } \\ Max Alekseyev, Apr 11 2009

CROSSREFS

Cf. A082224, A082225, A082226, A082227, A082229, A082230, A082231.

Sequence in context: A201422 A231330 A254051 * A114650 A170949 A276953

Adjacent sequences:  A082225 A082226 A082227 * A082229 A082230 A082231

KEYWORD

hard,nonn,tabl

AUTHOR

Amarnath Murthy, Apr 09 2003

EXTENSIONS

Extended by Max Alekseyev, Apr 11 2009

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 21 17:47 EST 2019. Contains 319349 sequences. (Running on oeis4.)