OFFSET
0,1
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
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..10000
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 *)
PROG
(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
(MuPAD) ithprime(i)+ithprime(i+2) $ i = 1..54 // Zerinvary Lajos, Feb 26 2007
(Magma) [2, 3] cat [NthPrime(n-1) + NthPrime(n+1): n in [2..60]]; // 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
(GAP) Concatenation([2, 3], List([2..60], n-> Primes[n-1] + Primes[n+1])) # G. C. Greubel, May 18 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Patrick De Geest, May 15 1999
STATUS
approved