OFFSET
1,1
COMMENTS
The square of the shortest distance between the start and end points of the path followed by a person moving 90 degrees left and right (or left and right) at the end of each path on a path of three consecutive prime numbers.
FORMULA
a(n) = prime(n)^2 + prime(n+1)^2 + prime(n+2)^2 + 2*prime(n)*prime(n+2).
EXAMPLE
For n = 1 the a(1) = (prime(1) + prime(3))^2 + prime(2)^2 = (2 + 5)^2 + 3^2 = 49 + 9 = 58.
MATHEMATICA
Table[(Prime[n] + Prime[n + 2])^2 + Prime[n + 1]^2, {n, 34}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Burak Muslu, Oct 23 2021
STATUS
approved