OFFSET
1,1
COMMENTS
Original name was: Sum of staircase primes according to the rule: bottom + top + next top.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
FORMULA
We list the primes in staircase fashion as in A135274. The right diagonal, RD(n), is the set of top primes and the left diagonal, LD(n), is the set of bottom primes. Then a(n) = LD(n+1) + RD(n) + RD(n+2).
a(n) = A034961(2*n-1). - R. J. Mathar, Sep 10 2016
MATHEMATICA
Table[Prime[n + 1] + Prime[n] + Prime[n + 2], {n, 1, 50}][[;; ;; 2]] (* G. C. Greubel, Oct 08 2016 *)
PROG
(PARI) g(n) = forstep(x=1, n, 2, y=prime(x+1) + prime(x) + prime(x+2); print1(y", "))
(PARI) a(n) = prime(2*n-1) + prime(2*n) + prime(2*n+1) \\ Charles R Greathouse IV, Oct 08 2016
(Python)
from sympy import prime
def a(n): return prime(2*n-1) + prime(2*n) + prime(2*n+1)
print([a(n) for n in range(1, 51)]) # Michael S. Branicky, Oct 23 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Cino Hilliard, Dec 02 2007
EXTENSIONS
New name from Charles R Greathouse IV, Oct 08 2016
STATUS
approved