OFFSET
1,1
FORMULA
a(n) = prime(n+1) + (-1)^(n+1). - Juri-Stepan Gerasimov, Sep 10 2009
a(n) = odd prime(n) - (-1)^n. - Juri-Stepan Gerasimov, Sep 10 2009
a(n) + a(n-1) = prime(n) + prime(n+1), i.e., a(n) = prime(n) + prime(n+1) - a(n-1) generates sequence with initial value a(1)=4. - Labos Elemer, Apr 24 2003; corrected by Dean Hickerson, Apr 27 2003
EXAMPLE
a(4) + a(3) = 10 + 8 = 18 = prime(4) + prime(5) = 7 + 11.
MATHEMATICA
a[1]=4; a[n_] := a[n]=Prime[n]+Prime[n+1]-a[n-1]
Total/@Partition[Riffle[Prime[Range[2, 60]], {1, -1}], 2] (* Harvey P. Dale, May 19 2011 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Erich Friedman
STATUS
approved