OFFSET
1,1
COMMENTS
It is easy to prove that for any 3 consecutive primes p1,p2,p3, a(n) always lies between p2 and p3.
EXAMPLE
For the first 3 prime numbers, go up 2, go right 3 and go down 5. Connecting the figure to form a right trapezoid we have the slanted side = sqrt(18). The integer part of this is 4, the first term of the sequence.
PROG
(PARI) a(n) = { my(p1=prime(n), p2=prime(n+1), p3=prime(n+2), y=p3-p1); sqrtint(p2^2 + y^2) }
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Sep 20 2006
STATUS
approved