OFFSET
0,1
COMMENTS
Absolute value of the difference between each prime of form n^2+1 and the nearest square > n^2+1. [Michel Lagneau, Aug 09 2014]
LINKS
FORMULA
a(n) = 2*A005574(n). For n=sqrt(p) the transient is n, the stationary quotient is 2n.
EXAMPLE
cfrac(sqrt(577),5): 24+1/(48+1/(48+1/(48+1/(48+1/(48+`...`))))) thus a(9) = 48 = 2*A005574(9).
PROG
(PARI) lista(nn) = {for (n=1, nn, if (isprime(p=n^2+1), k = 1; while (!issquare(p+k), k++); print1(k, ", "); ); ); } \\ Michel Marcus, Aug 10 2014, after comment by Michel Lagneau
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Feb 22 2001
STATUS
approved