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

A156074
Triangle read by rows: T(n, k) = 3 + prime(n+1) - prime(k+1) - prime(n-k+1).
1
1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 4, 4, 4, 1, 1, 2, 4, 4, 2, 1, 1, 4, 4, 6, 4, 4, 1, 1, 2, 4, 4, 4, 4, 2, 1, 1, 4, 4, 6, 4, 6, 4, 4, 1, 1, 6, 8, 8, 8, 8, 8, 8, 6, 1, 1, 2, 6, 8, 6, 8, 6, 8, 6, 2, 1, 1, 6, 6, 10, 10, 10, 10, 10, 10, 6, 6, 1, 1, 4, 8, 8, 10, 12, 10, 12, 10, 8, 8, 4, 1
OFFSET
0,5
COMMENTS
Row sums are: {1, 2, 4, 6, 14, 14, 24, 22, 34, 62, 54, ...}.
FORMULA
T(n, k) = 3 + prime(n+1) - prime(k+1) - prime(n-k+1).
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 2, 1;
1, 2, 2, 1;
1, 4, 4, 4, 1;
1, 2, 4, 4, 2, 1;
1, 4, 4, 6, 4, 4, 1;
1, 2, 4, 4, 4, 4, 2, 1;
1, 4, 4, 6, 4, 6, 4, 4, 1;
1, 6, 8, 8, 8, 8, 8, 8, 6, 1;
1, 2, 6, 8, 6, 8, 6, 8, 6, 2, 1;
MAPLE
seq(seq( 3+ ithprime(n+1) -ithprime(k+1) -ithprime(n-k+1), k=0..n), n=0..15); # G. C. Greubel, Dec 02 2019
MATHEMATICA
Table[3 +Prime[n+1] -Prime[k+1] -Prime[n-k+1], {n, 0, 15}, {k, 0, n}]//Flatten
PROG
(PARI) T(n, k) = 3 + prime(n+1) - prime(k+1) - prime(n-k+1); \\ G. C. Greubel, Dec 02 2019
(Magma) P:=NthPrime; [3 +P(n+1) -P(k+1) -P(n-k+1): k in [0..n], n in [0..15]]; // G. C. Greubel, Dec 02 2019
(Sage) p=nth_prime; [[3 +p(n+1) -p(k+1) -p(n-k+1) for k in (0..n)] for n in (0..15)] # G. C. Greubel, Dec 02 2019
CROSSREFS
Sequence in context: A342767 A176653 A174842 * A051287 A278218 A216031
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, Feb 03 2009
EXTENSIONS
More terms added by G. C. Greubel, Dec 02 2019
STATUS
approved