OFFSET
0,3
COMMENTS
a(1)=1, a(n) is the smallest integer > a(n-1) such that sqrt(2)*a(n) is closer and > to an integer than sqrt(2)*a(n-1) (i.e., a(n) is the smallest integer > a(n-1) such that frac(sqrt(2)*a(n)) < frac(sqrt(2)*a(n-1)).
a(n)*a(n+3) - a(n+1)*a(n+2) = 2. - Paul D. Hanna, Feb 22 2003
n such that floor(sqrt(2)*n^2) = n*floor(sqrt(2)*n).
The sequence 1,1,3,5,17,... has g.f. (1+x-3x^2-x^3)/(1-6x^2+x^4); a(n) = Sum_{k=0..floor(n/2)} C(n,2k)*2^(n-k-floor((n+1)/2)); a(n) = -(sqrt(2)-1)^n*((sqrt(2)/8-1/4)*(-1)^n - sqrt(2)/8 - 1/4) - (sqrt(2)+1)^n*((sqrt(2)/8-1/4)*(-1)^n - sqrt(2)/8 - 1/4); a(2n) = A001541(n) = A001333(2n); a(2n+1) = A001653(n) = A000129(2n+1). - Paul Barry, Jan 22 2005
The lower principal and intermediate convergents to 2^(1/2), beginning with 1/1, 4/3, 7/5, 24/17, 41/29, form a strictly increasing sequence; essentially, numerators=A143608 and denominators=A079496. - Clark Kimberling, Aug 27 2008
From Richard Choulet, May 09 2010: (Start)
This sequence is a particular case of the following situation: a(0)=1, a(1)=a, a(2)=b
with the recurrence relation a(n+3)=(a(n+2)*a(n+1)+q)/a(n) where q is given in Z to have Q=(a*b^2+q*b+a+q)/(a*b) itself in Z.
The g.f is f: f(z)=(1+a*z+(b-Q)*z^2+(a*b+q-a*Q)*z^3)/(1-Q*z^2+z^4); so we have the linear recurrence: a(n+4)=Q*a(n+2)-a(n).
The general form of a(n) is given by:
a(2*m)=sum((-1)^p*binomial(m-p,p)*Q^(m-2*p),p=0..floor(m/2))+(b-Q)*sum((-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p),p=0..floor((m-1)/2)) and
a(2*m+1)=a*sum((-1)^p*binomial(m-p,p)*Q^(m-2*p),p=0..floor(m/2))+(a*b+q-a*Q)*sum((-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p),p=0..floor((m-1)/2))
(End)
The integer square roots of floor(n^2/2 + 1) or (A007590 + 1). - Richard R. Forberg, Aug 01 2013
REFERENCES
Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..2608
John M. Campbell, An Integral Representation of Kekulé Numbers, and Double Integrals Related to Smarandache Sequences, arXiv:1105.3399 [math.GM], 2011.
Clark Kimberling, Best lower and upper approximates to irrational numbers, Elemente der Mathematik, 52 (1997) 122-126.
Yujun Yang, Heping Zhang, Kirchhoff Index of linear hexagonal chains, Int. J. Quant. Chem. 108 (2008) 503-512, eq (3.3).
Index entries for linear recurrences with constant coefficients, signature (0,6,0,-1).
FORMULA
a(2n+1) - a(2n) = a(2n) - a(2n-1) = A001542(n).
a(2n+1) = ceiling((2+sqrt(2))/4*(3+2*sqrt(2))^n), a(2n) = ceiling(1/2*(3+2*sqrt(2))^n).
G.f.: (1 + x - 3*x^2 - x^3)/(1 - 6*x^2 + x^4).
a(n) = 6*a(n-2) - a(n-4). - R. J. Mathar, Apr 04 2008
a(-n) = a(n) = A010914(n-3)*2^floor((4 - n)/2). - Michael Somos, Sep 03 2013
a(n) = (sqrt(2)*sqrt(2+(3-2*sqrt(2))^n+(3+2*sqrt(2))^n))/(2+sqrt(2)+(-1)^n*(-2+sqrt(2))). - Gerry Martens, Jun 06 2015
a(n) = 2^(n - 1)*H(n, n mod 2, 1/2) for n >= 3 where H(n, a, b) = hypergeom([a - n/2, b - n/2], [1 - n], -1). - Peter Luschny, Sep 03 2019
a(n) == Pell(n)^(-1) (mod Pell(n+1)) where Pell(n) = A000129(n), use the identity a(n)*Pell(n) - A084068(n-1)*Pell(n+1) = 1, taken modulo Pell(n+1). - Gary W. Adamson, Nov 21 2023
EXAMPLE
1 + x + 3*x^2 + 5*x^3 + 17*x^4 + 29*x^5 + 99*x^6 + 169*x^7 + 577*x^8 + ...
MAPLE
H := (n, a, b) -> hypergeom([a - n/2, b - n/2], [1 - n], -1):
a := n -> `if`(n < 3, [1, 1, 3][n+1], 2^(n - 1)*H(n, irem(n, 2), 1/2)):
seq(simplify(a(n)), n=0..26); # Peter Luschny, Sep 03 2019
MATHEMATICA
a[1] = 1; a[2] = 3; a[3] = 5; a[n_] := a[n] = (a[n-1]*a[n-2] + 2) / a[n-3]; Table[a[n], {n, 1, 29}] (* Jean-François Alcover, Jul 17 2013, after Paul D. Hanna *)
PROG
(PARI) {a(n) = n = abs(n); 2^((4-n)\2) * real( (10 + 7 * quadgen(8)) / 2 * (2 + quadgen(8))^(n-3) ) } /* Michael Somos, Sep 03 2013 */
(PARI) {a(n) = polcoeff( (1 + x - 3*x^2 - x^3) / (1 - 6*x^2 + x^4) + x * O(x^abs(n)), abs(n))} /* Michael Somos, Sep 03 2013 */
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Benoit Cloitre, Jan 20 2003
EXTENSIONS
a(0)=1 added by Michael Somos, Sep 03 2013
STATUS
approved