cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A079496 a(0) = a(1) = 1; thereafter a(2*n+1) = 2*a(2*n) - a(2*n-1), a(2*n) = 4*a(2*n-1) - a(2*n-2).

Original entry on oeis.org

1, 1, 3, 5, 17, 29, 99, 169, 577, 985, 3363, 5741, 19601, 33461, 114243, 195025, 665857, 1136689, 3880899, 6625109, 22619537, 38613965, 131836323, 225058681, 768398401, 1311738121, 4478554083, 7645370045, 26102926097, 44560482149, 152139002499, 259717522849, 886731088897
Offset: 0

Views

Author

Benoit Cloitre, Jan 20 2003

Keywords

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))).
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

Examples

			1 + x + 3*x^2 + 5*x^3 + 17*x^4 + 29*x^5 + 99*x^6 + 169*x^7 + 577*x^8 + ...
		

References

  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.

Crossrefs

Programs

  • 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 *)
  • 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 */

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)*a(n+3) - a(n+1)*a(n+2) = 2. - Paul D. Hanna, Feb 22 2003
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
E.g.f.: cosh(x)*(cosh(sqrt(2)*x) + sinh(sqrt(2)*x)/sqrt(2)). - Stefano Spezia, Apr 21 2025

Extensions

a(0)=1 added by Michael Somos, Sep 03 2013

A143609 Numerators of the upper principal and intermediate convergents to 2^(1/2).

Original entry on oeis.org

2, 3, 10, 17, 58, 99, 338, 577, 1970, 3363, 11482, 19601, 66922, 114243, 390050, 665857, 2273378, 3880899, 13250218, 22619537, 77227930, 131836323, 450117362, 768398401, 2623476242, 4478554083, 15290740090, 26102926097, 89120964298, 152139002499
Offset: 1

Views

Author

Clark Kimberling, Aug 27 2008

Keywords

Comments

The upper principal and intermediate convergents to 2^(1/2), beginning with
2/1, 3/2, 10/7, 17/12, 58/41, form a strictly decreasing sequence;
essentially, numerators=A143609 and denominators=A084068.

Examples

			2*x + 3*x^2 + 10*x^3 + 17*x^4 + 58*x^5 + 99*x^6 + 338*x^7 + 577*x^8 + ...
		

References

  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.

Crossrefs

Programs

  • Mathematica
    Rest@ CoefficientList[Series[x (2 + 3 x - 2 x^2 - x^3)/(1 - 6 x^2 + x^4), {x, 0, 30}], x] (* Michael De Vlieger, Mar 27 2016 *)
  • PARI
    {a(n) = if( n<1, 0, polcoeff( x * (2 + 3*x - 2*x^2 - x^3) / (1 - 6*x^2 + x^4) + x * O(x^n), n))} /* Michael Somos, Sep 03 2013 */
    
  • PARI
    x='x+O('x^99); Vec(x*(2+3*x-2*x^2-x^3)/(1-6*x^2+x^4)) \\ Altug Alkan, Mar 27 2016

Formula

a(n) = 6 * a(n-2) - a(n-4). a(2*n) = A001541(n) if n>0. a(2*n + 1) = 2 * A001653(n + 1).- Michael Somos, Sep 03 2013
G.f.: x * (2 + 3*x - 2*x^2 - x^3) / (1 - 6*x^2 + x^4). - Michael Somos, Sep 03 2013
a(n) = (2+sqrt(2)+(-1)^n*(-2+sqrt(2)))*((-1+sqrt(2))^n+(1+sqrt(2))^n)/(4*sqrt(2)). - Colin Barker, Mar 27 2016
Showing 1-2 of 2 results.