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.

Previous Showing 31-40 of 70 results. Next

A082841 a(n) = 4*a(n-1) - a(n-2) for n>1, a(0)=3, a(1)=9.

Original entry on oeis.org

3, 9, 33, 123, 459, 1713, 6393, 23859, 89043, 332313, 1240209, 4628523, 17273883, 64467009, 240594153, 897909603, 3351044259, 12506267433, 46674025473, 174189834459, 650085312363, 2426151414993, 9054520347609, 33791929975443
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Apr 14 2003

Keywords

Comments

y-values in the solutions to 3*x^2+6 = y^2. - Sture Sjöstedt, Nov 25 2011
Positive values of x (or y) satisfying x^2 - 4*x*y + y^2 + 18 = 0. - Colin Barker, Feb 04 2014
Positive values of x (or y) satisfying x^2 - 14*x*y + y^2 + 288 = 0. - Colin Barker, Feb 16 2014

Crossrefs

First differences of A005320.
Cf. A001834.

Programs

  • GAP
    a:=[3,9];; for n in [3..30] do a[n]:=4*a[n-1]-a[n-2]; od; a; # G. C. Greubel, Feb 25 2019
  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( (3-6*x+3*x^2)/((1-x)*(1-4*x+x^2)) )); // G. C. Greubel, Feb 25 2019
    
  • Maple
    a:=proc(n) option remember; if n=0 then 3 elif n=1 then 9 else 4*a(n-1)-a(n-2); fi; end: seq(a(n), n=0..40); # Wesley Ivan Hurt, Jan 21 2017
  • Mathematica
    CoefficientList[Series[(3-6x+3x^2)/((1-x)(1-4x+x^2)), {x, 0, 25}], x]
    LinearRecurrence[{4,-1},{3,9},30] (* Harvey P. Dale, Aug 28 2019 *)
  • PARI
    my(x='x+O('x^30)); Vec((3-6*x+3*x^2)/((1-x)*(1-4*x+x^2))) \\ G. C. Greubel, Feb 25 2019
    
  • Sage
    ((3-6*x+3*x^2)/((1-x)*(1-4*x+x^2))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Feb 25 2019
    

Formula

G.f.: (3 -6*x +3*x^2)/((1-x)*(1-4*x+x^2)).
a(n) = sqrt(3/2)*(a^(n+1/2) + b^(n+1/2)), with a=2+sqrt(3) and b=2-sqrt(3).
a(n) = sqrt(3*(11 +12*A082840(n) +4*A082840(n)^2)).
a(n) = sqrt((3/2)*(A003500(2n+1) +2)).
a(n) - a(n-1) = 6*A001353(n).
a(n) == 3 (mod 6).
a(n) = 3 * A001835(n+1).
a(n) = 3*x(n) + 3*y(n) for x(n)= A001075(n) and y(n) = A001353(n) the solutions to x^2 - 3*y^2 = 1. - Greg Dresden and his Math 222 Linear Algebra class, Oct 05 2022

A220864 Number of perfect matchings in the graph C_4 X C_n.

Original entry on oeis.org

50, 272, 722, 3108, 10082, 39952, 140450, 537636, 1956242, 7379216, 27246962, 102144036, 379501250, 1418981392, 5285770562, 19742287908, 73621286642, 274848860432, 1025412242450, 3827417932836, 14282150107682, 53304783436816, 198924689265122, 742414961433636, 2770663499604050, 10340361362903312
Offset: 3

Views

Author

N. J. A. Sloane, Dec 27 2012

Keywords

Crossrefs

Cf. A001834.

Programs

  • Mathematica
    CoefficientList[Series[2 (25 + 36 x - 333 x^2 - 6 x^3 + 467 x^4 - 104 x^5 - 71 x^6 + 18 x^7)/((1 - x) (1 + x) (1 - 4 x + x^2) (1 - 2 x - x^2) (1 + 2 x - x^2)), {x,0, 40}], x] (* Vincenzo Librandi, Apr 20 2014 *)
  • PARI
    Vec( 2*x^3*(25+36*x-333*x^2-6*x^3+467*x^4-104*x^5-71*x^6+18*x^7)/((1-x)*(1+x)*(1-4*x+x^2)*(1-2*x-x^2)*(1+2*x-x^2)) +O(x^66) ) \\ Joerg Arndt, Oct 22 2013

Formula

G.f.: 2*x^3*(25+36*x-333*x^2-6*x^3+467*x^4-104*x^5-71*x^6+18*x^7)/((1-x)*(1+x)*(1-4*x+x^2)*(1-2*x-x^2)*(1+2*x-x^2)). - Sergey Perepechko, Oct 21 2013
Assuming the above o.g.f. we have, for n >= 1, a(2n+1) = 2*A001834(n)^2 = (2 + sqrt(3))^(2*n+1) + (2 - sqrt(3))^(2*n+1) - 2. - Peter Bala, Apr 19 2014

Extensions

More terms from Joerg Arndt, Oct 22 2013

A244419 Coefficient triangle of polynomials related to the Dirichlet kernel. Rising powers. Riordan triangle ((1+z)/(1+z^2), 2*z/(1+z^2)).

Original entry on oeis.org

1, 1, 2, -1, 2, 4, -1, -4, 4, 8, 1, -4, -12, 8, 16, 1, 6, -12, -32, 16, 32, -1, 6, 24, -32, -80, 32, 64, -1, -8, 24, 80, -80, -192, 64, 128, 1, -8, -40, 80, 240, -192, -448, 128, 256, 1, 10, -40, -160, 240, 672, -448, -1024, 256, 512, -1, 10, 60, -160, -560, 672, 1792, -1024, -2304, 512, 1024
Offset: 0

Views

Author

Wolfdieter Lang, Jul 29 2014

Keywords

Comments

This is the row reversed version of A180870. See also A157751 and A228565.
The Dirichlet kernel is D(n,x) = Sum_{k=-n..n} exp(i*k*x) = 1 + 2*Sum_{k=1..n} T(n,x) = S(n, 2*y) + S(n-1, 2*y) = S(2*n, sqrt(2*(1+y))) with y = cos(x), n >= 0, with the Chebyshev polynomials T (A053120) and S (A049310). This triangle T(n, k) gives in row n the coefficients of the polynomial Dir(n,y) = D(n,x=arccos(y)) = Sum_{m=0..n} T(n,m)*y^m. See A180870, especially the Peter Bala comments and formulas.
This is the Riordan triangle ((1+z)/(1+z^2), 2*z/(1+z^2)) due to the o.g.f. for Dir(n,y) given by (1+z)/(1 - 2*y*z + z^2) = G(z)/(1 - y*F(z)) with G(z) = (1+z)/(1+z^2) and F(z) = 2*z/(1+z^2) (see the Peter Bala formula under A180870). For Riordan triangles and references see the W. Lang link 'Sheffer a- and z- sequences' under A006232.
The A- and Z- sequences of this Riordan triangle are (see the mentioned W. Lang link in the preceding comment also for the references): The A-sequence has o.g.f. 1+sqrt(1-x^2) and is given by A(2*k+1) = 0 and A(2*k) [2, -1/2, -1/8, -1/16, -5/128, -7/256, -21/1024, -33/2048, -429/32768, -715/65536, ...], k >= 0. (See A098597 and A046161.)
The Z-sequence has o.g.f. sqrt((1-x)/(1+x)) and is given by
[1, -1, 1/2, -1/2, 3/8, -3/8, 5/16, -5/16, 35/128, -35/128, ...]. (See A001790 and A046161.)
The column sequences are A057077, 2*(A004526 with even numbers signed), 4*A008805 (signed), 8*A058187 (signed), 16*A189976 (signed), 32*A189980 (signed) for m = 0, 1, ..., 5.
The row sums give A005408 (from the o.g.f. due to the Riordan property), and the alternating row sums give A033999.
The row polynomials Dir(n, x), n >= 0, give solutions to the diophantine equation (a + 1)*X^2 - (a - 1)*Y^2 = 2 by virtue of the identity (a + 1)*Dir(n, -a)^2 - (a - 1)*Dir(n, a)^2 = 2, which is easily proved inductively using the recurrence Dir(n, a) = (1 + a)*(-1)^(n-1)*Dir(n-1, -a) + a*Dir(n-1, a) given below by Wolfdieter Lang. - Peter Bala, May 08 2025

Examples

			The triangle T(n,m) begins:
  n\m  0   1   2    3    4    5    6     7     8    9    10 ...
  0:   1
  1:   1   2
  2:  -1   2   4
  3:  -1  -4   4    8
  4:   1  -4 -12    8   16
  5:   1   6 -12  -32   16   32
  6:  -1   6  24  -32  -80   32   64
  7:  -1  -8  24   80  -80 -192   64   128
  8:   1  -8 -40   80  240 -192 -448   128   256
  9:   1  10 -40 -160  240  672 -448 -1024   256  512
  10: -1  10  60 -160 -560  672 1792 -1024 -2304  512  1024
  ...
Example for A-sequence recurrence: T(3,1) = Sum_{j=0..2} A(j)*T(2,j) = 2*(-1) + 0*2 + (-1/2)*4 = -4. Example for Z-sequence recurrence: T(4,0) = Sum_{j=0..3} Z(j)*T(3,j) = 1*(-1) + (-1)*(-4) + (1/2)*4 + (-1/2)*8 = +1. (For the A- and Z-sequences see a comment above.)
Example for the alternate recurrence: T(4,2) = 2*T(3,1) - T(3,2) = 2*(-4) - 4 = -12. T(4,3) = 0*T(3,2) + T(3,3) = T(3,3) = 8. - _Wolfdieter Lang_, Jul 30 2014
		

Crossrefs

Dir(n, x) : A005408 (x = 1), A002878 (x = 3/2), A001834 (x = 2), A030221 (x = 5/2), A002315 (x = 3), A033890 (x = 7/2), A057080 (x = 4), A057081 (x = 9/2), A054320 (x = 5), A077416 (x = 6), A028230 (x = 7), A159678 (x = 8), A049629 (x = 9), A083043 (x = 10),
(-1)^n * Dir(n, x): A122367 (x = -3/2); A079935 (x = -2), A004253 (x = -5/2), A001653 (x = -3), A049685 (x = -7/2), A070997 (x = -4), A070998 (x = -9/2), A072256(n+1) (x = -5).

Programs

  • Mathematica
    T[n_, k_] := T[n, k] = Which[k == 0, (-1)^Quotient[n, 2], (0 <= n && n < k) || (n == -1 && k == 1), 0, True, 2 T[n-1, k-1] - T[n-2, k]];
    Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 28 2019, from Sage *)
  • Sage
    def T(n, k):
        if k == 0: return (-1)^(n//2)
        if (0 <= n and n < k) or (n == -1 and k == 1): return 0
        return 2*T(n-1, k-1) - T(n-2, k)
    for n in range(11): [T(n,k) for k in (0..n)] # Peter Luschny, Jul 29 2014

Formula

T(n, m) = [y^m] Dir(n,y) for n >= m >= 0 and 0 otherwise, with the polynomials Dir(y) defined in a comment above.
T(n, m) = 2^m*(S(n,m) + S(n-1,m)) with the entries S(n,m) of A049310 given there explicitly.
O.g.f. for polynomials Dir(y) see a comment above (Riordan triangle ((1+z)/(1+z^2), 2*z/(1+z^2))).
O.g.f. for column m: ((1 + x)/(1 + x^2))*(2*x/(1 + x^2))^m, m >= 0, (Riordan property).
Recurrence for the polynomials: Dir(n, y) = 2*y*Dir(n-1, y) - Dir(n-2, y), n >= 1, with input D(-1, y) = -1 and D(0, y) = 1.
Triangle three-term recurrence: T(n,m) = 2*T(n-1,m-1) - T(n-2,m) for n >= m >= 1 with T(n,m) = 0 if 0 <= n < m, T(0,0) = 1, T(-1,1) = 0 and T(n,0) = A057077(n) = (-1)^(floor(n/2)).
From Wolfdieter Lang, Jul 30 2014: (Start)
In analogy to A157751 one can derive a recurrence for the row polynomials Dir(n, y) = Sum_{m=0..n} T(n,m)*y^m also using a negative argument but only one recursive step: Dir(n,y) = (1+y)*(-1)^(n-1)*Dir(n-1,-y) + y*Dir(n-1,y), n >= 1, Dir(0,y) = 1 (Dir(-1,y) = -1). See also A180870 from where this formula can be derived by row reversion.
This entails another triangle recurrence T(n,m) = (1 + (-1)^(n-m))*T(n-1,m-1) - (-1)^(n-m)*T(n-1,m), for n >= m >= 1 with T(n,m) = 0 if n < m and T(n,0) = (-1)^floor(n/2). (End)
From Peter Bala, Aug 14 2022: (Start)
The row polynomials Dir(n,x), n >= 0, are related to the Chebyshev polynomials of the first kind T(n,x) by the binomial transform as follows:
(2^n)*(x - 1)^(n+1)*Dir(n,x) = (-1) * Sum_{k = 0..2*n+1} binomial(2*n+1,k)*T(k,-x).
Note that Sum_{k = 0..2*n} binomial(2*n,k)*T(k,x) = (2^n)*(1 + x)^n*T(n,x). (End)
From Peter Bala, May 04 2025: (Start)
For n >= 1, the n-th row polynomial Dir(n, x) = (-1)^n * (U(n, -x) - U(n-1, -x)) = U(2*n, sqrt((1+x)/2)), where U(n, x) denotes the n-th Chebyshev polynomial of the second kind.
For n >= 1 and x < 1, Dir(n, x) = (-1)^n * sqrt(2/(1 - x )) * T(2*n+1, sqrt((1 - x)/2)), where T(n, x) denotes the n-th Chebyshev polynomial of the first kind.
Dir(n, x)^2 - 2*x*Dir(n, x)*Dir(n+1, x) + Dir(n+1, x)^2 = 2*(1 + x).
Dir(n, x) = (-1)^n * R(n, -2*(x+1)), where R(n, x) is the n-th row polynomial of the triangle A085478.
Dir(n, x) = Sum_{k = 0..n} (-1)^(n+k) * binomial(n+k, 2*k) * (2*x + 2)^k. (End)

A046174 Indices of pentagonal numbers which are also triangular.

Original entry on oeis.org

0, 1, 12, 165, 2296, 31977, 445380, 6203341, 86401392, 1203416145, 16761424636, 233456528757, 3251629977960, 45289363162681, 630799454299572, 8785902997031325, 122371842504138976, 1704419892060914337
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [ n eq 1 select 0 else n eq 2 select 1 else 14*Self(n-1)-Self(n-2)-2: n in [1..20] ]; // Vincenzo Librandi, Aug 23 2011
  • Mathematica
    LinearRecurrence[{15,-15,1},{0,1,12},20] (* Harvey P. Dale, Aug 22 2011 *)

Formula

From Warut Roonguthai, Jan 05 2001: (Start)
a(n) = 14*a(n-1) - a(n-2) - 2.
G.f.: x*(1-3*x)/((1-x)*(1-14*x+x^2)). (End)
a(n+1) = 7*a(n) - 1 + 2*sqrt(12*a(n)^2 - 4*a(n) + 1). - Richard Choulet, Sep 19 2007
a(n+1) = 15*a(n) - 15*a(n-1) + a(n-2), a(1)=1, a(2)=12, a(3)=165. - Sture Sjöstedt, May 29 2009
a(n) = (1/12)*(2 - (7 - 4*sqrt(3))^n*(1 + sqrt(3)) + (-1 + sqrt(3))*(7 + 4*sqrt(3))^n). - Alan Michael Gómez Calderón, Jun 30 2024

A046175 Indices of triangular numbers which are also pentagonal.

Original entry on oeis.org

0, 1, 20, 285, 3976, 55385, 771420, 10744501, 149651600, 2084377905, 29031639076, 404358569165, 5631988329240, 78443478040201, 1092576704233580, 15217630381229925, 211954248632985376, 2952141850480565345, 41118031658094929460, 572700301362848447101
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{15,-15,1},{0,1,20},20] (* Harvey P. Dale, Sep 10 2021 *)
  • PARI
    concat(0, Vec(-x*(5*x+1)/((x-1)*(x^2-14*x+1)) + O(x^50))) \\ Colin Barker, Jun 23 2015

Formula

From Warut Roonguthai, Jan 05 2001: (Start)
a(n) = 14*a(n-1) - a(n-2) + 6.
G.f.: x*(1+5*x)/((1-x)*(1-14*x+x^2)). (End)
a(n+1) = 7*a(n) + 3 + 2*sqrt(12*a(n)^2 + 12*a(n) + 1). - Richard Choulet, Sep 19 2007
a(n+1) = 15*a(n)-15*a(n-1)+ a(n-2) with a(1)=1, a(2)=20, a(3)=285. - Sture Sjöstedt, May 29 2009
a(n) = (1/12)*(-6 + (7 - 4*sqrt(3))^n*(3 + sqrt(3)) - (-3 + sqrt(3))*(7 + 4*sqrt(3))^n). - Alan Michael Gómez Calderón, Jun 30 2024

A099780 a(n) = Sum_{k=0..floor(n/3)} C(n-k, 2*k) * 2^k*3^(n-3*k).

Original entry on oeis.org

1, 3, 9, 29, 99, 351, 1273, 4677, 17307, 64295, 239361, 892125, 3327091, 12412143, 46313289, 172824629, 644952459, 2406919671, 8982595153, 33523198797, 125109675747, 466914455615, 1742546049561, 6503265548325, 24270507755131, 90578748694983, 338044453470369
Offset: 0

Views

Author

Paul Barry, Oct 26 2004

Keywords

Comments

In general a(n) = Sum_{k=0..floor(n/3)} C(n-k,2*k) * u^k*v^(n-3*k) has g.f. (1-v*x) / ((1-v*x)^2-u*x^2) and satisfies the recurrence a(n) = 2*u*v*a(n-1) - v^2*a(n-2) + u*a(n-3).

Crossrefs

Programs

  • GAP
    a:=[1,3,9];; for n in [4..30] do a[n]:=6*a[n-1]-9*a[n-2]+2*a[n-3]; od; a; # G. C. Greubel, Sep 04 2019
  • Magma
    I:=[1,3,9]; [n le 3 select I[n] else 6*Self(n-1) - 9*Self(n-2) + 2*Self(n-3): n in [1..30]]; // G. C. Greubel, Sep 04 2019
    
  • Maple
    seq(coeff(series((1-3*x)/((1-3*x)^2 -2*x^3), x, n+1), x, n), n = 0..30); # G. C. Greubel, Sep 04 2019
  • Mathematica
    LinearRecurrence[{6,-9,2},{1,3,9},30] (* Harvey P. Dale, Nov 30 2015 *)
  • PARI
    Vec((1-3*x) / ((1-3*x)^2-2*x^3) + O(x^30)) \\ Colin Barker, Feb 05 2017
    
  • PARI
    a(n) = sum(k=0, n\3, binomial(n-k, 2*k) * 2^k*3^(n-3*k)); \\ Michel Marcus, Feb 05 2017
    
  • Sage
    def A099780_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1-3*x)/((1-3*x)^2 -2*x^3)).list()
    A099780_list(30) # G. C. Greubel, Sep 04 2019
    

Formula

G.f.: (1-3*x)/((1-3*x)^2 - 2*x^3).
a(n) = 6*a(n-1) - 9*a(n-2) + 2*a(n-3).
a(n) = A001834(n)/3 + 2^(n+1)/3. - R. J. Mathar, Sep 21 2012
a(n) = (2^(2+n) - (2-sqrt(3))^n*(-1+sqrt(3)) + (1+sqrt(3))*(2+sqrt(3))^n) / 6. - Colin Barker, Feb 05 2017
E.g.f.: (1/3)*exp(2*x)*(2 + cosh(sqrt(3)*x) + sqrt(3)*sinh(sqrt(3)*x)). - Stefano Spezia, Sep 04 2019

A109437 a(-1) = a(0) = 0, a(1) = 1; a(n) = 5a(n-1) - 5a(n-2) + a(n-3) + 2*(-1)^(n+1), alternatively a(n) = 3a(n-1) + 3a(n-2) - a(n-3).

Original entry on oeis.org

0, 1, 3, 12, 44, 165, 615, 2296, 8568, 31977, 119339, 445380, 1662180, 6203341, 23151183, 86401392, 322454384, 1203416145, 4491210195, 16761424636, 62554488348, 233456528757, 871271626679, 3251629977960, 12135248285160, 45289363162681, 169022204365563, 630799454299572
Offset: 0

Views

Author

Creighton Dement, Jun 28 2005

Keywords

Comments

See A105968 for a similar sequence. Observe the four periodic sequences (1,1,1,1,); (-1,-1,-1,-1); (1,-1,1,-1,); (-1,1,-1,1,); (a(n)) is the (Type 1A) jbasejfor-transform of the periodic sequence (1,1,1,1) with respect to the floretion given in the program code. A109438 is the (Type 1A) jbasejfor-transform of the periodic sequence (-1,-1,-1,-1) with respect to the floretion given in the program code. A001834 is the (Type 1A) jbasejfor-transform of the periodic sequence (1,-1,1,-1) with respect to the floretion given in the program code. A102871 is the (Type 1A) jbasejfor-transform of the periodic sequence (-1,1,-1,1) with respect to the floretion given in the program code.
Floretion Algebra Multiplication Program, FAMP Code: (-1)^(n+1)jbasejfor[ + .5'ii' + .5'kk' + .5'ij' + .5'ji' + .5'jk' + .5'kj'] 1vesfor = (1,1,1,1,)

Crossrefs

Programs

  • Maple
    with(numtheory):a := cfrac (tan(Pi/3),60): > b := cfrac (tan(Pi/6),60): > seq(nthnumer (b,i)*nthdenom (a,i), i=0..24 ); # Zerinvary Lajos, Feb 08 2007
  • Mathematica
    LinearRecurrence[{3,3,-1},{0,1,3},40] (* Harvey P. Dale, Apr 21 2018 *)
  • PARI
    {a(n) = local(s=1); if( n<0, n = -1 - n; s=-1); s * polcoeff( x / ((x + 1) * (x^2 -4*x + 1)) + x * O(x^n), n)} /* Michael Somos, Jul 27 2012 */

Formula

G.f.: x/((x+1)*(x^2-4*x+1)).
a(n) = A002530(n)*A002530(n+1). - Zerinvary Lajos, Feb 08 2007
a(-1 - n) = -a(n). a(2*n) = A011916(n). a(2*n + 1) = -A011916(-1 -n). - Michael Somos, Jul 27 2012
6*a(n) = A001353(n)+A001353(n+1)-(-1)^n. - R. J. Mathar, Sep 07 2016
a(n) = ((1 + sqrt(3))*(2 + sqrt(3))^n + (1 - sqrt(3))*(2 - sqrt(3))^n - 2*(-1)^n)/12. - Stefano Spezia, Sep 19 2023
a(n)+a(n+1) = A001353(n+1). - R. J. Mathar, Aug 31 2025

A102871 a(n) = a(n-3) - 5*a(n-2) + 5*a(n-1), a(0) = 1, a(1) = 3, a(2) = 10.

Original entry on oeis.org

1, 3, 10, 36, 133, 495, 1846, 6888, 25705, 95931, 358018, 1336140, 4986541, 18610023, 69453550, 259204176, 967363153, 3610248435, 13473630586, 50284273908, 187663465045, 700369586271, 2613814880038, 9754889933880, 36405744855481, 135868089488043, 507066613096690
Offset: 0

Views

Author

Creighton Dement, Mar 01 2005

Keywords

Comments

A floretion-generated sequence resulting from a particular transform of the periodic sequence (-1,1).
Floretion Algebra Multiplication Program, FAMP Code: .5em[J* ]forseq[ .25( 'i + 'j + 'k + i' + j' + k' + 'ii' + 'jj' + 'kk' + 'ij' + 'ik' + 'ji' + 'jk' + 'ki' + 'kj' + e ) ], em[J]forseq = A001834, vesforseq = (1,-1,1,-1). ForType 1A. Identity used: em[J]forseq + em[J* ]forseq = vesforseq.
Also indices of the centered triangular numbers which are triangular numbers - Richard Choulet, Oct 09 2007
Place a(n) red and b(n) blue balls in an urn; draw 2 balls without replacement. Probability(2 red balls) = 3*Probability(2 blue balls); b(n)=A101265(n). - Paul Weisenhorn, Aug 02 2010

Examples

			For n=5, a(5)=495; b(5)=286; binomial(495,2) = 122265 = 3*binomial(286,2). - _Paul Weisenhorn_, Aug 02 2010
		

Crossrefs

Cf. A001075 (first differences), A001834, A082841, A101265.

Programs

  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=4*a[n-1]-a[n-2]-1 od: seq(a[n], n=1..23); # Zerinvary Lajos, Mar 08 2008
  • Mathematica
    LinearRecurrence[{5,-5,1},{1,3,10},30] (* Harvey P. Dale, Oct 04 2011 *)

Formula

2*a(n) - A001834(n) = (-1)^(n+1); a(n) = 4*a(n-1) - a(n) - 1;
G.f.: (2*x-1)/((x-1)*(x^2-4*x+1)).
Superseeker results: a(n+2) - 2a(n+1) + a(n) = A001834(n+1) (from this and the first relation involving A001834 it follows that 4a(n+1) - a(n+2) - a(n) = (-1)^n as well as the recurrence relation given for A001834 ); a(n+1) - a(n) = A001075(n+1); a(n+2) - a(n) = A082841(n+1).
a(j+3) - 3*a(j+2) - 3*a(j+1) + a(j) = -2 for all j.
a(n+1) = 2*a(n) - 1/2 + (1/2)*(12*a(n)^2 - 12*a(n) + 9)^(1/2). - Richard Choulet, Oct 09 2007
a(n) = (sqrt(12*b(n)*(b(n)-1) + 1) + 1)/2; b(n) = A101265(n). - Paul Weisenhorn, Aug 02 2010
a(n) = A001571(n) + 1. - Johannes Boot, Jun 17 2011
E.g.f.: (exp(2*x)*(cosh(sqrt(3)*x) + sqrt(3)*sinh(sqrt(3)*x)) + cosh(x) + sinh(x))/2. - Stefano Spezia, Sep 19 2023

A082840 a(n) = 4*a(n-1) - a(n-2) + 3, with a(0) = -1, a(1) = 1.

Original entry on oeis.org

-1, 1, 8, 34, 131, 493, 1844, 6886, 25703, 95929, 358016, 1336138, 4986539, 18610021, 69453548, 259204174, 967363151, 3610248433, 13473630584, 50284273906, 187663465043, 700369586269, 2613814880036, 9754889933878, 36405744855479, 135868089488041
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Apr 14 2003

Keywords

Comments

Apart from the initial -1, these are the numbers k such that the triangular number k*(k + 1)/2 is the sum of three consecutive triangular numbers - see A129803. - Brian Nowell, Nov 03 2009

Crossrefs

Programs

  • GAP
    a:=[-1,1,8];; for n in [4..30] do a[n]:=5*a[n-1]-5*a[n-2]+a[n-3]; od; a; # G. C. Greubel, Feb 25 2019
  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( -(1-6*x+2*x^2)/((1-x)*(1-4*x+x^2)) )); // G. C. Greubel, Feb 25 2019
    
  • Mathematica
    CoefficientList[Series[(-1+6x-2x^2)/((1-x)(1-4x+x^2)), {x, 0, 30}], x] (* Vincenzo Librandi, Apr 15 2014 *)
    LinearRecurrence[{5,-5,1}, {-1,1,8}, 30] (* G. C. Greubel, Feb 25 2019 *)
  • PARI
    is(n)=ispolygonal(3/2*n*(n+1)+4,3) || n==-1 \\ Charles R Greathouse IV, Apr 14 2014
    
  • PARI
    my(x='x+O('x^30)); Vec(-(1-6*x+2*x^2)/((1-x)*(1-4*x+x^2))) \\ G. C. Greubel, Feb 25 2019
    
  • Sage
    (-(1-6*x+2*x^2)/((1-x)*(1-4*x+x^2))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Feb 25 2019
    

Formula

a(n) = A001571(n) - 1. - N. J. A. Sloane, Nov 03 2009
G.f.: -(1 -6*x +2*x^2)/((1 - x)*(1 - 4*x + x^2)).
a(n) = -3/2 + (1/12)*( (a -2*b +5)*a^n + (b -2*a +5)*b^n ), with a = 2 + sqrt(3), b = 2 - sqrt(3):.
a(n) = -3/2 + (3/4)*A003500(n) - (1/4)*A003500(n-1).
a(n) = (1/2)*(A001834(n) - 3).
E.g.f.: ((1 + sqrt(3))*exp((2 + sqrt(3))*x) + (1 - sqrt(3))*exp((2 - sqrt(3))*x) - 6*exp(x))/4. - Franck Maminirina Ramaharo, Nov 12 2018

A086386 Numerators of the rational convergents to sqrt(3) if both numerators and denominators are primes.

Original entry on oeis.org

5, 19, 71, 3691, 191861, 26947261171
Offset: 1

Views

Author

Cino Hilliard, Sep 06 2003

Keywords

Comments

These numbers are rare.

Crossrefs

Cf. A001834.

Programs

  • PARI
    cfracnum(m,f) = { cfr = vector(10000); x=f; for(n=0,m, i=floor(x); x=1/(x-i); cfr[n+1] = i; ); for(m1=0,m, r=cfr[m1+1]; forstep(n=m1,1,-1, r = 1/r; r+=cfr[n]; ); numer=numerator(r); denom=denominator(r); if(isprime(numer) & isprime(denom),print1(numer",")); ) }
Previous Showing 31-40 of 70 results. Next