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.

A065342 Triangle of sum of two primes: prime(n)+prime(k) with n >= k >= 1.

Original entry on oeis.org

4, 5, 6, 7, 8, 10, 9, 10, 12, 14, 13, 14, 16, 18, 22, 15, 16, 18, 20, 24, 26, 19, 20, 22, 24, 28, 30, 34, 21, 22, 24, 26, 30, 32, 36, 38, 25, 26, 28, 30, 34, 36, 40, 42, 46, 31, 32, 34, 36, 40, 42, 46, 48, 52, 58, 33, 34, 36, 38, 42, 44, 48, 50, 54, 60, 62, 39, 40, 42, 44, 48
Offset: 1

Views

Author

Henry Bottomley, Oct 30 2001

Keywords

Examples

			Sequence starts 2+2; 3+2, 3+3; 5+2, 5+3, 5+5; etc. i.e. 4; 5,6; 7,8,10; ...
Triangle begins:
   4;
   5,  6;
   7,  8, 10;
   9, 10, 12, 14;
  13, 14, 16, 18, 22;
  ...
		

Crossrefs

Cf. A052147 (left edge), A100484 (right edge), A000040.
Cf. A087112.
Cf. A065305.

Programs

  • Haskell
    import Data.List (inits)
    a065342 n k = a065342_tabl !! (n-1) !! (k-1)
    a065342_row n = a065342_tabl !! (n-1)
    a065342_tabl = zipWith (map . (+)) a000040_list $ tail $ inits a000040_list
    -- Reinhard Zumkeller, Aug 02 2015, Jan 30 2012
    
  • PARI
    row(n) = vector(n, k, prime(n)+prime(k)); \\ Michel Marcus, Sep 10 2021

Formula

T(n, k) = 2*A065305(n, k) [but note different offset].