cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A154791 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.

This page as a plain text file.
%I A154791 #11 Dec 08 2015 08:56:17
%S A154791 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 A154791 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 A154791 17,19,0,1,0,5,7,0,11,13,0,17,19,0,23
%N A154791 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 A154791 Triangle begins:
%e A154791 n ....... Pairs
%e A154791 1 ..........0
%e A154791 2 ........ 1,3
%e A154791 3 ....... 1,0,5
%e A154791 4 ...... 1,3,5,7
%e A154791 5 ..... 0,3,0,7,0
%e A154791 6 .... 1,0,5,7,0,11
%o A154791 (PARI) iscomp(n) = (n!=1) && !isprime(n);
%o A154791 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 A154791 trgp(nn) = {for (n = 1, nn, v = vecp(n); for (k = 1, n, print1(v[k], ", ");); print(););} \\ _Michel Marcus_, Feb 13 2014
%Y A154791 Cf. A008578, A154720, A154721, A154722, A154723.
%K A154791 nonn,tabl
%O A154791 1,3
%A A154791 _Omar E. Pol_, Jan 25 2009
%E A154791 More terms from _Michel Marcus_, Feb 13 2014