# [seqfan] Re: A December quiz with a non-prime array

Maximilian Hasler Maximilian.Hasler at martinique.univ-ag.fr
Wed Dec 28 20:22:49 CET 2011

```Hello Eric,

I confirm your calculations and created the sequence http://oeis.org/A203071 ;
the first row (now in oeis.org/A203072) goes on :
[1, 8, 4, 14, 6, 10, 22, 27, 15, 35, 40, 88, 28, 26, 44, 60, 57, 58,
64, 120, 62, 72, 34, 56, 80, 63, 98, 46, 102, 178, 52, 100, 66, 156,
86, 82, 110, 76, 114, 94, 140, 96, 154, 130, 160, 112, 108, 138, 78,
150, 118, 146, 132, 126, 162, 176, 164, 188, 202, 200, 180, ...]

At that point there are 1891 numbers in the complete triangle, but the
least composite not yet used is only 24;
the 99 smallest numbers used so far are
[1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 26, 27, 28, 30,
32, 34, 35, 36, 38, 40, 42, 44, 46, 48, 49, 50, 51, 52, 54, 56, 57,
58, 60, 62, 63, 64, 66, 68, 70, 72, 74, 75, 76, 78, 80, 81, 82, 84,
86, 88, 90, 91, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112,
114, 115, 116, 117, 118, 119, 120, 122, 124, 125, 126, 128, 129, 130,
132, 134, 136, 138, 140, 142, 143, 144, 146, 148, 150, 152, 154, 156,
158, 160, 161, 162]

Happy New Year,

Maximilian

PS: for my records:

extend_first_row( a=[], u=[] )={ u || for( i=1,#a, u=setunion(u,Set(a[i]));
forstep( j=i-1,1,-1, u=setunion(u, Set(a[j]+=a[j+1]))));
for( t=1,9e9, isprime(t) && next; setsearch(u,t) && next; my(tt=t);
forstep( j=#a,1,-1, setsearch(u, tt += a[j]) && next(2); isprime(tt)
&& next(2));
return(t)) }

list_by_antidiagonals(a)={my(u=[]);for(i=1,#a,u=concat(u,a[i]);forstep(j=i-1,1,-1,u=concat(u,a[j]+=a[j+1])));u}

On Wed, Dec 28, 2011 at 1:03 PM, Eric Angelini <Eric.Angelini at kntv.be> wrote:
> Hello Seqfans,
> is it possible to put all non-primes in an array like
> this one:
> - every term is unique (and not prime)
> - a term and his neighbor sum up on the line below.
> Best,
> É.
> (hope no mistakes were left in the example below)
>
>           1    8    4     14     6     10    22     27   15
>             9    12   18      20    16    32     49   42
>               21   30     38     36    48     81    91
>                 51    68     74     84    129   301
>                   119 142 158 213   301
>                      261    300    371    514
>                         561     671    885
>                            1232    1556
>                                2788
>
> The array has been built by antidiagonals, choosing always
> the smallest non-prime not yet in the array and not leading