login
A059793
Stationary value of quotient in the continued fraction expansion of sqrt(prime) when the quotient-cycle-length = 1.
0
2, 4, 8, 12, 20, 28, 32, 40, 48, 52, 72, 80, 108, 112, 132, 148, 168, 180, 188, 220, 232, 240, 248, 252, 260, 268, 292, 300, 312, 320, 340, 352, 360, 368, 408, 412, 420, 448, 460, 472, 480, 500, 512, 520, 528, 540, 560, 568, 600, 612, 628, 652, 680, 700, 768
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]
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
Sequence in context: A136034 A243112 A230127 * A118029 A049322 A014557
KEYWORD
nonn
AUTHOR
Labos Elemer, Feb 22 2001
STATUS
approved