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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 1
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, 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, 17, 19, 0, 1, 0, 5, 7, 0, 11, 13, 0, 17, 19, 0, 23 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

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

EXAMPLE

Triangle begins:

n ....... Pairs

1 ..........0

2 ........ 1,3

3 ....... 1,0,5

4 ...... 1,3,5,7

5 ..... 0,3,0,7,0

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

PROG

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

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; }

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

CROSSREFS

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

Sequence in context: A134560 A127626 A245095 * A121440 A324664 A011084

Adjacent sequences:  A154788 A154789 A154790 * A154792 A154793 A154794

KEYWORD

nonn,tabl

AUTHOR

Omar E. Pol, Jan 25 2009

EXTENSIONS

More terms from Michel Marcus, Feb 13 2014

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 October 19 03:34 EDT 2019. Contains 328211 sequences. (Running on oeis4.)