login

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”).

Triangle read by rows in which row n lists all the pairs of noncomposite numbers that are equidistant from n, with 0's inserted, as shown below in the example.
1

%I #11 Dec 08 2015 08:56:17

%S 0,1,3,1,0,5,1,3,5,7,0,3,0,7,0,1,0,5,7,0,11,1,3,0,0,0,11,13,0,3,5,0,0,

%T 11,13,0,1,0,5,7,0,11,13,0,17,1,3,0,7,0,0,13,0,17,19,0,3,5,0,0,0,0,0,

%U 17,19,0,1,0,5,7,0,11,13,0,17,19,0,23

%N Triangle read by rows in which row n lists all the pairs of noncomposite numbers that are equidistant from n, with 0's inserted, as shown below in the example.

%e Triangle begins:

%e n ....... Pairs

%e 1 ..........0

%e 2 ........ 1,3

%e 3 ....... 1,0,5

%e 4 ...... 1,3,5,7

%e 5 ..... 0,3,0,7,0

%e 6 .... 1,0,5,7,0,11

%o (PARI) iscomp(n) = (n!=1) && !isprime(n);

%o vecp(n) = {v = vector(n, i, 2*i-1); for (i = 1, n\2, if (iscomp(v[i]) || iscomp(v[n-i+1]), v[i] = 0; v[n-i+1] = 0);); if ((n % 2), v[n\2+1] = 0); v;}

%o trgp(nn) = {for (n = 1, nn, v = vecp(n); for (k = 1, n, print1(v[k], ", ");); print(););} \\ _Michel Marcus_, Feb 13 2014

%Y Cf. A008578, A154720, A154721, A154722, A154723.

%K nonn,tabl

%O 1,3

%A _Omar E. Pol_, Jan 25 2009

%E More terms from _Michel Marcus_, Feb 13 2014