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-7 of 7 results.

A079935 a(n) = 4*a(n-1) - a(n-2) with a(1) = 1, a(2) = 3.

Original entry on oeis.org

1, 3, 11, 41, 153, 571, 2131, 7953, 29681, 110771, 413403, 1542841, 5757961, 21489003, 80198051, 299303201, 1117014753, 4168755811, 15558008491, 58063278153, 216695104121, 808717138331, 3018173449203, 11263976658481, 42037733184721, 156886956080403
Offset: 1

Views

Author

Benoit Cloitre and Paul D. Hanna, Jan 20 2003

Keywords

Comments

See A001835 for another version.
Greedy frac multiples of sqrt(3): a(1)=1, Sum_{n>0} frac(a(n)*x) < 1 at x=sqrt(3).
The n-th greedy frac multiple of x is the smallest integer that does not cause Sum_{k=1..n} frac(a(k)*x) to exceed unity; an infinite number of terms appear as the denominators of the convergents to the continued fraction of x.
Binomial transform of A002605. - Paul Barry, Sep 17 2003
In general, Sum_{k=0..n} binomial(2n-k,k)*j^(n-k) = (-1)^n* U(2n, i*sqrt(j)/2), i=sqrt(-1). - Paul Barry, Mar 13 2005
The Hankel transform of this sequence is [1,2,0,0,0,0,0,0,0,0,0,...]. - Philippe Deléham, Nov 21 2007
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_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*Q^(m-2*p) + (b-Q)*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p) and
a(2*m+1) = a*Sum_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*Q^(m-2*p) + (a*b+q-a*Q)*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p).
(End)
x-values in the solution to 3*x^2 - 2 = y^2. - Sture Sjöstedt, Nov 25 2011
From Wolfdieter Lang, Oct 12 2020: (Start)
[X(n) = S(n, 4) - S(n-1, 4), Y(n) = X(n-1)] gives all positive solutions of X^2 + Y^2 - 4*X*Y = -2, for n = -oo..+oo, where the Chebyshev S-polynomials are given in A049310, with S(-1, 0) = 0, and S(-|n|, x) = - S(|n|-2, x), for |n| >= 2.
This binary indefinite quadratic form has discriminant D = +12. There is only this family representing -2 properly with X and Y positive, and there are no improper solutions.
See also the preceding comment by Sture Sjöstedt.
See the formula for a(n) = X(n-1), for n >= 1, in terms of S-polynomials below.
This comment is inspired by a paper by Robert K. Moniot (private communication). See his Oct 04 2020 comment in A027941 related to the case of x^2 + y^2 - 3*x*y = -1 (special Markov solutions). (End)
a(n) is also the output of Tesler's formula for the number of perfect matchings of an m x n Mobius band where m and n are both even, specialized to m=2. (The twist is on the length-n side.) - Sarah-Marie Belcastro, Feb 15 2022

Examples

			a(4) = 41 since frac(1*x) + frac(3*x) + frac(11*x) + frac(41*x) < 1, while frac(1*x) + frac(3*x) + frac(11*x) + frac(k*x) > 1 for all k > 11 and k < 41.
		

Crossrefs

Cf. A002530 (denominators of convergents to sqrt(3)), A079934, A079936, A001353.
Cf. A001835 (same except for the first term).
Row 4 of array A094954.
Cf. similar sequences listed in A238379.

Programs

  • Haskell
    a079935 n = a079935_list !! (n-1)
    a079935_list =
       1 : 3 : zipWith (-) (map (4 *) $ tail a079935_list) a079935_list
    -- Reinhard Zumkeller, Aug 14 2011
    
  • Magma
    I:=[1,3]; [n le 2 select I[n] else 4*Self(n-1)-Self(n-2): n in [1..40]]; // Vincenzo Librandi, Jun 06 2015
    
  • Maple
    f:= gfun:-rectoproc({a(n) = 4*a(n-1) - a(n-2),a(1)=1,a(2)=3}, a(n), remember):
    seq(f(n),n=1..30); # Robert Israel, Jun 05 2015
  • Mathematica
    a[n_] := (MatrixPower[{{1, 2}, {1, 3}}, n].{{1}, {1}})[[1, 1]]; Table[ a[n], {n, 0, 23}] (* Robert G. Wilson v, Jan 13 2005 *)
    LinearRecurrence[{4,-1},{1,3},30] (* or *) CoefficientList[Series[ (1-x)/(1-4x+x^2),{x,0,30}],x]  (* Harvey P. Dale, Apr 26 2011 *)
    a[n_] := Sqrt[2/3] Cosh[(-1 - 2 n) ArcCsch[Sqrt[2]]];
    Table[Simplify[a[n-1]], {n, 1, 12}] (* Peter Luschny, Oct 13 2020 *)
  • PARI
    a(n)=([0,1; -1,4]^(n-1)*[1;3])[1,1] \\ Charles R Greathouse IV, Mar 18 2017
    
  • PARI
    my(x='x+O('x^30)); Vec((1-x)/(1-4*x+x^2)) \\ G. C. Greubel, Feb 25 2019
  • Sage
    [lucas_number1(n,4,1)-lucas_number1(n-1,4,1) for n in range(1, 25)] # Zerinvary Lajos, Apr 29 2009
    

Formula

For n > 0, a(n) = ceiling( (2+sqrt(3))^n/(3+sqrt(3)) ).
From Paul Barry, Sep 17 2003: (Start)
G.f.: (1-x)/(1-4*x+x^2).
E.g.f.: exp(2*x)*(sinh(sqrt(3)*x)/sqrt(3) + cosh(sqrt(3)*x)).
a(n) = ( (3+sqrt(3))*(2+sqrt(3))^n + (3-sqrt(3))*(2-sqrt(3))^n )/6 (offset 0). (End)
a(n) = Sum_{k=0..n} binomial(2*n-k, k)*2^(n-k). - Paul Barry, Jan 22 2005 [offset 0]
a(n) = (-1)^n*U(2*n, i*sqrt(2)/2), U(n, x) Chebyshev polynomial of second kind, i=sqrt(-1). - Paul Barry, Mar 13 2005 [offset 0]
a(n) = Jacobi_P(n,-1/2,1/2,2)/Jacobi_P(n,-1/2,1/2,1). - Paul Barry, Feb 03 2006 [offset 0]
a(n) = sqrt(2+(2-sqrt(3))^(2*n-1) + (2+sqrt(3))^(2*n-1))/sqrt(6). - Gerry Martens, Jun 05 2015
a(n) = (1/2 + sqrt(3)/6)*(2-sqrt(3))^n + (1/2 - sqrt(3)/6)*(2+sqrt(3))^n. - Robert Israel, Jun 05 2015
a(n) = S(n-1,4) - S(n-2,4) = (-1)^(n-1)*S(2*(n-1), i*sqrt(2)), with Chebyshev S-polynomials (A049310), the imaginary unit i, S(-1, x) = 0, for n >= 1. See also the formula above by Paul Barry (with offset 0). - Wolfdieter Lang, Oct 12 2020
a(n) = sqrt(2/3)*cosh((-1 - 2*n) arccsch(sqrt(2))), where arccsch is the inverse hyperbolic cosecant function (with offset 0). - Peter Luschny, Oct 13 2020
From Peter Bala, May 04 2025: (Start)
a(n) = (1/sqrt(3)) * sqrt(1 - T(2*n-1, -2)), where T(k, x) denotes the k-th Chebyshev polynomial of the first kind.
a(n) divides a(3*n-1); a(n) divides a(5*n-2); in general, for k >= 0, a(n) divides a((2*k+1)*n - k).
The aerated sequence [b(n)]n>=1 = [1, 0, 3, 0, 11, 0, 41, 0, ...] is a fourth-order linear divisibility sequence; that is, if n | m then b(n) | b(m). It is the case P1 = 0, P2 = -6, Q = 1 of the 3-parameter family of divisibility sequences found by Williams and Guy.
Sum_{n >= 2} 1/(a(n) - 1/a(n)) = 1/2 (telescoping series: for n >= 1, 1/(a(n) - 1/a(n)) = 1/A052530(n-1) - 1/A052530(n).) (End)

A079939 Greedy frac multiples of e: a(1)=1, Sum_{n>0} frac(a(n)*e)=1.

Original entry on oeis.org

1, 3, 7, 14, 39, 78, 394, 1001, 2002, 3003, 9545, 10546, 27634, 154257, 398959, 797918, 1196877, 1595836, 5394991, 5793950, 15786014, 130087267, 312129649, 624259298
Offset: 1

Views

Author

Benoit Cloitre and Paul D. Hanna, Jan 21 2003

Keywords

Comments

The n-th greedy frac multiple of x is the smallest integer that does not cause Sum_{k=1..n} frac(a(k)*x) to exceed unity; an infinite number of terms appear as the denominators of the convergents to the continued fraction of x.

Examples

			a(4) = 14 since frac(1x) + frac(3x) + frac(7x) + frac(14x) < 1, while frac(1x) + frac(3x) + frac(7x) + frac(k*x) > 1 for all k>7 and k<14.
		

Crossrefs

Cf. A007677 (denominators of convergents to e), A079934, A079937, A079940.

Programs

  • Maple
    Digits := 100: a := []: s := 0: x := exp(1.0): for n from 1 to 1000000 do: temp := evalf(s+frac(n*x)): if (temp<1.0) then a := [op(a),n]: print(n): s := s+evalf(frac(n*x)): fi: od: a;

Extensions

a(15)-a(16) from Mark Hudson (mrmarkhudson(AT)hotmail.com), Jan 30 2003
a(17)-a(24) from Sean A. Irvine, Aug 30 2025

A079941 Greedy frac multiples of log(2): a(1)=1, Sum_{n>0} frac(a(n)*log(2)) = 1.

Original entry on oeis.org

1, 3, 6, 13, 26, 39, 277, 642, 2291, 4582, 6231, 16402, 26573, 36744, 63317, 73488, 110232, 414355, 828710, 1206321, 2412642, 4410929, 5617250, 12026466, 31668469, 51310472, 70952475, 141904950, 394046381
Offset: 1

Views

Author

Benoit Cloitre and Paul D. Hanna, Jan 21 2003

Keywords

Comments

The n-th greedy frac multiple of x is the smallest integer that does not cause Sum_{k=1..n} frac(a(k)*x) to exceed unity; an infinite number of terms appear as the denominators of the convergents to the continued fraction of x.

Examples

			a(4) = 13 since frac(1x) + frac(3x) + frac(6x) + frac(13x) < 1, while frac(1x) + frac(3x) + frac(6x) + frac(k*x) > 1 for all k>6 and k<13.
		

Crossrefs

Cf. A079943 (denominators of convergents to ln2), A079934, A079939, A079940.

Extensions

More terms from Mark Hudson (mrmarkhudson(AT)hotmail.com), Jan 29 2003
a(20)-a(29) from Sean A. Irvine, Aug 31 2025

A079937 Greedy frac multiples of Pi^2/6: a(1)=1, Sum_{n>=1} frac(a(n)*x) = 1 at x = Pi^2/6.

Original entry on oeis.org

1, 2, 14, 45, 107, 138, 276, 414, 1135, 2270, 6672, 12209, 18881, 180865, 361730, 542595, 723460, 2031679, 7945851, 15891702, 21805874, 29751725, 43611748, 65417622, 87223496, 362754007, 384559881, 406365755
Offset: 1

Views

Author

Benoit Cloitre and Paul D. Hanna, Jan 21 2003

Keywords

Comments

The n-th greedy frac multiple of x is the smallest integer that does not cause Sum_{k=1..n} frac(a(k)*x) to exceed unity; an infinite number of terms appear as the denominators of the convergents to the continued fraction of x.

Examples

			a(4) = 45 since frac(1*x) + frac(2*x) + frac(14*x) + frac(45*x) < 1, while frac(1*x) + frac(2*x) + frac(14*x) + frac(k*x) > 1 for all k > 14 and k < 45.
		

Crossrefs

Cf. A080017 (denominators of convergents to Pi^2/6), A079934, A079938, A079939.

Extensions

a(15)-a(28) from Sean A. Irvine, Aug 30 2025

A079940 Greedy fractional multiples of 1/e: a(1)=1, Sum_{n>0} frac(a(n)/e) = 1.

Original entry on oeis.org

1, 3, 4, 11, 87, 193, 386, 579, 1457, 23225, 49171, 98342, 147513, 196684, 566827, 13580623, 28245729, 56491458, 84737187, 112982916, 438351041, 466596770, 494842499
Offset: 1

Views

Author

Benoit Cloitre and Paul D. Hanna, Jan 21 2003

Keywords

Comments

The n-th greedy fractional multiple of x is the smallest integer m that does not cause Sum_{k=1..n} frac(m*x) to exceed unity; an infinite number of terms appear as the denominators of the convergents to the continued fraction of 1/e.
After a(20), there is only 109305220 - 297122396/e = ~1.06317354345346734...*10^-8 to work with.

Examples

			a(4) = 11 since frac(1x) + frac(3x) + frac(4x) + frac(11x) < 1, while frac(1x) + frac(3x) + frac(4x) + frac(k*x) > 1 for all k>4 and k<11.
		

Crossrefs

Cf. A007676 (numerators of convergents to e), A079934, A079939, A079941.

Programs

  • Maple
    Digits := 100: a := []: s := 0: x := 1.0/exp(1.0): for n from 1 to 1000000 do: temp := evalf(s+frac(n*x)): if (temp<1.0) then a := [op(a),n]: print(n): s := s+evalf(frac(n*x)): fi: od: a;
  • Mathematica
    a[1] = 1; a[n_] := a[n] = Block[{k = a[n - 1] + 1, ps = Plus @@ Table[ FractionalPart[ a[i]*E^-1], {i, n - 1}]}, While[ ps + FractionalPart[k*E^-1] > 1, k++ ]; a[n] = k]; Do[ Print[ a[n]], {n, 20}] (* Robert G. Wilson v, Nov 03 2004 *)

Extensions

More terms from Mark Hudson (mrmarkhudson(AT)hotmail.com), Jan 30 2003
a(16)-a(20) from Robert G. Wilson v, Nov 03 2004
a(21)-a(23) from Sean A. Irvine, Aug 30 2025

A079938 Greedy frac multiples of Pi: a(1)=1, Sum_{n>=1} frac(a(n)*Pi) = 1.

Original entry on oeis.org

1, 2, 3, 8, 99, 33102, 66317, 265381, 1360120, 25510582, 78256779, 156513558, 209259755, 340262731, 1963319607, 6701487259, 8664806866, 13402974518, 20104461777, 26805949036, 33507436295, 40208923554, 46910410813
Offset: 1

Views

Author

Benoit Cloitre and Paul D. Hanna, Jan 21 2003

Keywords

Comments

The n-th greedy frac multiple of x is the smallest integer that does not cause Sum_{k=1..n} frac(a(k)*x) to exceed unity; an infinite number of terms appear as the denominators of the convergents to the continued fraction of x.

Examples

			a(4) = 8 since frac(1x*) + frac(2*x) + frac(3*x) + frac(8*x) < 1, while frac(1*x) + frac(2*x) + frac(3*x) + frac(k*x) > 1 for all k > 3 and k < 8.
		

Crossrefs

Cf. A002486 (denominators of convergents to Pi), A079934, A079937, A079939.

Programs

  • Maple
    Digits := 100: a := []: s := 0: x := Pi: for n from 1 to 10000000 do: temp := evalf(s+frac(n*x)): if (temp<1.0) then a := [op(a),n]: print(n): s := s+evalf(frac(n*x)): fi: od: a;
  • PARI
    first(n)=my(v=vector(n),s=1.,p=Pi-3,k); for(m=1,oo, my(t=frac(p*m)); if(tCharles R Greathouse IV, Jul 25 2024

Extensions

a(9) from Mark Hudson, Jan 30 2003
a(10)-a(23) from Charles R Greathouse IV, Jul 26 2024

A079936 Greedy frac multiples of sqrt(5): a(1)=1, sum(n>0,frac(a(n)*x))=1 at x=sqrt(5).

Original entry on oeis.org

1, 2, 5, 13, 17, 34, 305, 610, 1597, 4181, 5473, 10946, 98209, 196418, 514229, 1346269, 1762289, 3524578, 31622993, 63245986, 165580141, 433494437, 567451585, 1134903170, 10182505537, 20365011074, 53316291173, 139583862445
Offset: 1

Views

Author

Benoit Cloitre and Paul D. Hanna, Jan 21 2003

Keywords

Comments

The n-th greedy frac multiple of x is the smallest integer that does not cause sum(k=1..n,frac(a(k)*x)) to exceed unity; an infinite number of terms appear as the denominators of the convergents to the continued fraction of x.

Examples

			a(4) = 13 since frac(1x) + frac(2x) + frac(5x) + frac(13x) < 1, while frac(1x) + frac(2x) + frac(5x) + frac(k*x) > 1 for all k>5 and k<13.
		

Crossrefs

Cf. A001076 (denominators of convergents to sqrt(5)), A079934, A079935, A079937.

Formula

For n>=0, a(6n+1)=A001076(4n+1); a(6n+2)=2a(6n+1); a(6n+3)=A001076(4n+1)+A001076(4n+2); a(6n+4)=A001076(4n+3)-A001076(4n+2); a(6n+5)=A001076(4n+3); a(6n+6)=2a(6n+5). Asymptotics: a(6n) -> 2*sqrt(5)*(tau)^(12n-3); a(6n+2)/a(6n+1) -> (tau)^2; a(6n+3)/a(6n+2) -> (tau)^2; a(6n+4)/a(6n+3) -> (tau)^2/2; a(6n+6)/a(6n+5) -> (tau)^6/2; where tau = (1+sqrt(5))/2.
G.f.: -x*(x -1)*(2*x^10 +3*x^9 +8*x^8 +21*x^7 +55*x^6 +72*x^5 +38*x^4 +21*x^3 +8*x^2 +3*x +1) / (x^12 -322*x^6 +1). - Colin Barker, Jun 16 2013
Showing 1-7 of 7 results.