OFFSET
1,2
COMMENTS
The (primitive) period length k(n)=A077427(n) of the (regular) continued fraction of (sqrt(4*a(n)+1)+1)/2 determines whether or not the Diophantine equation (2*x-y)^2 - (1+4*a(n))*y^2 = +4 or -4 is solvable and the approximants of this continued fraction give all solutions. See A077057.
REFERENCES
O. Perron, "Die Lehre von den Kettenbruechen, Bd.I", Teubner, 1954, 1957 (Sec. 30, Satz 3.35, p. 109 and table p. 108).
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Oskar Perron, Die Lehre von den Kettenbrüchen, Teubner, Leipzig, 1913.
FORMULA
4*a(n)+1 is not a square number.
a(n) = ceiling(sqrt(n)) + n -1. - Leroy Quet, Jul 06 2007
A005369(a(n)) = 0. - Reinhard Zumkeller, Jul 05 2014
MATHEMATICA
Complement[Range[930], Table[n (n + 1), {n, 0, 30}]] (* and *) Table[Ceiling[Sqrt[n]] + n - 1, {n, 900}] (* Vladimir Joseph Stephan Orlovsky, Jul 20 2011 *)
PROG
(Haskell)
a078358 n = a078358_list !! (n-1)
a078358_list = filter ((== 0) . a005369) [0..]
-- Reinhard Zumkeller, Jul 04 2014, May 08 2012
(PARI) a(n)=sqrtint(n-1)+n \\ Charles R Greathouse IV, Jan 17 2013
(Python)
from operator import sub
from sympy import integer_nthroot
def A078358(n): return n+sub(*integer_nthroot(n, 2)) # Chai Wah Wu, Oct 01 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Nov 29 2002
STATUS
approved