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.

A048448 a(n) = prime(n-1) + prime(n+1) (assuming prime(i) = 0 for i < 1).

Original entry on oeis.org

2, 3, 7, 10, 16, 20, 28, 32, 40, 48, 54, 66, 72, 80, 88, 96, 106, 114, 126, 132, 140, 150, 156, 168, 180, 190, 200, 208, 212, 220, 236, 244, 264, 270, 286, 290, 306, 314, 324, 336, 346, 354, 370, 374, 388, 392, 408, 422, 438, 452, 460, 468, 474, 490, 498, 514
Offset: 0

Views

Author

Patrick De Geest, May 15 1999

Keywords

Comments

Starting from prime sequence add previous and next term yielding generation 2.
a(n) = A116366(n,n-2) for n>2. - Reinhard Zumkeller, Feb 06 2006
Arithmetic derivative (see A003415) of prime(n-1)*prime(n+1) for n > 1. - Giorgio Balzarotti, May 26 2011

Crossrefs

Generation 1 is the 'prime sequence A000040'. See A048449-A048466. See also A047844.

Programs

  • GAP
    Concatenation([2,3], List([2..60], n-> Primes[n-1] + Primes[n+1])); # G. C. Greubel, May 18 2019
  • Magma
    [2,3] cat [NthPrime(n-1) + NthPrime(n+1): n in [2..60]];  // G. C. Greubel, May 18 2019
    
  • Mathematica
    Table[If[n < 2, Prime[n+1], Prime[n+1] + Prime[n-1]], {n, 0, 60}]
    Join[{2,3},First[#]+Last[#]&/@Partition[Prime[Range[60]],3,1]] (* Harvey P. Dale, Jan 25 2016 *)
  • MuPAD
    ithprime(i)+ithprime(i+2) $ i = 1..54 // Zerinvary Lajos, Feb 26 2007
    
  • PARI
    je=[2,3]; for(n=1,60,je=concat(je, prime(n)+prime(n+2))); je \\ modified by G. C. Greubel, May 18 2019
    
  • Sage
    [2,3] + [nth_prime(n-1) + nth_prime(n+1) for n in (2..60)] # G. C. Greubel, May 18 2019