OFFSET
1,1
COMMENTS
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Janyarak Tongsomporn, Saeree Wananiyaku, and Jörn Steuding, Sums of consecutive prime squares, Integers (2022) Vol. 22, #A9.
FORMULA
MAPLE
seq(ithprime(n)^2+ithprime(n+1)^2, n = 1 .. 100); # Stefano Spezia, Dec 21 2018
MATHEMATICA
Table[Prime[n]^2+Prime[n+1]^2, {n, 5!}] (* Vladimir Joseph Stephan Orlovsky, Apr 12 2010 *)
Total[#^2]&/@Partition[Prime[Range[50]], 2, 1] (* Harvey P. Dale, May 26 2012 *)
PROG
(PARI) v=primes(101); vector(#v-1, i, v[i]^2+v[i+1]^2) \\ Charles R Greathouse IV, Aug 21 2011
(Python)
from sympy import prime
for n in range(1, 101): print(n, prime(n)**2+prime(n+1)**2) # Stefano Spezia, Dec 21 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Mar 29 2002
STATUS
approved