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 41-50 of 56 results. Next

A127620 Number of walks from (0,0) to (n,n) in the region 0 <= x-y <= 6 with the steps (1,0), (0, 1), (2,0) and (0,2).

Original entry on oeis.org

1, 1, 5, 22, 117, 654, 3843, 22882, 137443, 827998, 4995443, 30155494, 182083275, 1099560942, 6640309323, 40101959542, 242184540139, 1462610652718, 8833070227499, 53345145429670, 322164911643723, 1945636121710110
Offset: 0

Views

Author

Arvind Ayyer, Jan 20 2007

Keywords

Examples

			a(2)=5 because we can reach (2,2) in the following ways:
(0,0),(1,0),(1,1),(2,1),(2,2)
(0,0),(2,0),(2,2)
(0,0),(1,0),(2,0),(2,2)
(0,0),(2,0),(2,1),(2,2)
(0,0),(1,0),(2,0),(2,1),(2,2)
		

Crossrefs

Programs

  • Mathematica
    b[n_, k_] := Boole[n >= 0 && k >= 0 && 0 <= n-k <= 6];
    T[0, 0] = T[1, 1] = 1; T[n_, k_] /; b[n, k] == 1 := T[n, k] = b[n-1, k]* T[n-1, k] + b[n-2, k]*T[n-2, k] + b[n, k-1]*T[n, k-1] + b[n, k-2]*T[n, k-2]; T[, ] = 0;
    a[n_] := T[n, n];
    Table[a[n], {n, 0, 21}]
    (* or: *)
    LinearRecurrence[{6, 5, -24, -28, -6, 8}, {1, 1, 5, 22, 117, 654}, 22] (* Jean-François Alcover, Apr 02 2019 *)

Formula

G.f.: (1 - 5x - 6x^2 + 11x^3 + 12x^4 - 4x^5)/(1 - 6x - 5x^2 + 24x^3 + 28x^4 + 6x^5 - 8x^6). [corrected by Jean-François Alcover, Apr 02 2019]

A164907 a(n) = (3*3^n-(-1)^n)/2.

Original entry on oeis.org

1, 5, 13, 41, 121, 365, 1093, 3281, 9841, 29525, 88573, 265721, 797161, 2391485, 7174453, 21523361, 64570081, 193710245, 581130733, 1743392201, 5230176601, 15690529805, 47071589413, 141214768241, 423644304721, 1270932914165
Offset: 0

Views

Author

Klaus Brockhaus, Aug 31 2009

Keywords

Comments

Interleaving of A096053 and A083884 without initial term 1.
Partial sums are (essentially) in A080926.
First differences are (essentially) in A105723.
a(n)+a(n+1) = A008776(n+1) = A099856(n+1) = A110593(n+2).
Binomial transform of A056450. Inverse binomial transform of A164908.

Crossrefs

Equals A046717 without initial term 1 and A080925 without initial term 0. Equals A084182 / 2 from second term onward.

Programs

Formula

a(n) = 2*a(n-1)+3*a(n-2) for n > 1; a(0) = 1, a(1) = 5.
G.f.: (1+3*x)/((1+x)*(1-3*x)).
a(n) = 3*a(n-1)+2*(-1)^n. - Carmine Suriano, Mar 21 2014

A160444 Expansion of g.f.: x^2*(1 + x - x^2)/(1 - 2*x^2 - 2*x^4).

Original entry on oeis.org

0, 1, 1, 1, 2, 4, 6, 10, 16, 28, 44, 76, 120, 208, 328, 568, 896, 1552, 2448, 4240, 6688, 11584, 18272, 31648, 49920, 86464, 136384, 236224, 372608, 645376, 1017984, 1763200, 2781184, 4817152, 7598336, 13160704, 20759040, 35955712, 56714752
Offset: 1

Views

Author

Willibald Limbrunner (w.limbrunner(AT)gmx.de), May 14 2009

Keywords

Comments

This sequence is the case k=3 of a family of sequences with recurrences a(2*n+1) = a(2*n) + a(2*n-1), a(2*n+2) = k*a(2*n-1) + a(2*n), a(1)=0, a(2)=1. Values of k, for k >= 0, are given by A057979 (k=0), A158780 (k=1), A002965 (k=2), this sequence (k=3). See "Family of sequences for k" link for other connected sequences.
It seems that the ratio of two successive numbers with even, or two successive numbers with odd, indices approaches sqrt(k) for these sequences as n-> infinity.
This algorithm can be found in a historical figure named "Villardsche Figur" of the 13th century. There you can see a geometrical interpretation.

Crossrefs

Programs

  • Magma
    I:=[0,1,1,1]; [n le 4 select I[n] else 2*(Self(n-2) +Self(n-4)): n in [1..40]]; // G. C. Greubel, Feb 18 2023
    
  • Mathematica
    LinearRecurrence[{0,2,0,2}, {0,1,1,1}, 40] (* G. C. Greubel, Feb 18 2023 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A160444
        if (n<5): return ((n+1)//3)
        else: return 2*(a(n-2) + a(n-4))
    [a(n) for n in range(1, 41)] # G. C. Greubel, Feb 18 2023

Formula

a(n) = 2*a(n-2) + 2*a(n-4).
a(2*n+1) = A002605(n).
a(2*n) = A026150(n-1).

Extensions

Edited by R. J. Mathar, May 14 2009

A165553 a(n) = (3/2)*(1+(-3)^(n-1)).

Original entry on oeis.org

1, 3, -3, 15, -39, 123, -363, 1095, -3279, 9843, -29523, 88575, -265719, 797163, -2391483, 7174455, -21523359, 64570083, -193710243, 581130735, -1743392199, 5230176603, -15690529803, 47071589415, -141214768239
Offset: 0

Views

Author

Philippe Deléham, Sep 21 2009

Keywords

Comments

a(n)/a(n-1) tends to -3.

Crossrefs

Programs

  • Mathematica
    3/2*(1 + (-3)^(Range[0, 29] - 1)) (* or *)
    LinearRecurrence[{-2, 3}, {1, 3}, 30] (* Paolo Xausa, Apr 22 2024 *)

Formula

a(0)=1, a(1)=3, a(n)=3*a(n-2)-2*a(n-1).
G.f.: (1+5x)/(1+2x-3x^2).
a(n)= Sum_{k=0..n} A112555(n,k)*2^(n-k).

A190943 a(n) = 8*a(n-1) + 27*a(n-2), with a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 8, 91, 944, 10009, 105560, 1114723, 11767904, 124240753, 1311659432, 13847775787, 146197010960, 1543466033929, 16295047567352, 172033963454899, 1816237991957696, 19174820948943841, 202436993374408520, 2137216112616751867
Offset: 0

Views

Author

Bruno Berselli, May 24 2011

Keywords

Crossrefs

Cf. A000045, A046717, A015533 (for type of recurrence).
Cf. A015611, A190441 (for type of closed formula).

Programs

  • Magma
    [n le 2 select n-1 else 8*Self(n-1)+27*Self(n-2): n in [1..17]];
    
  • Mathematica
    a = {0, 1}; Do[AppendTo[a, 8 a[[-1]] + 27 a[[-2]]], {18}]; a (* Bruno Berselli, Dec 26 2012 *)
    CoefficientList[Series[x / (1 - 8 x - 27 x^2), {x, 0, 25}], x] (* Vincenzo Librandi, Aug 19 2013 *)
  • Maxima
    a[0]:0$ a[1]:1$ a[n]:=8*a[n-1]+27*a[n-2]$ makelist(a[n], n, 0, 17);
    
  • PARI
    x='x+O('x^30); concat([0], Vec(x/(1-8*x-27*x^2))) \\ G. C. Greubel, Dec 30 2017

Formula

G.f.: x/(1-8*x-27*x^2).
a(n) = ((4+sqrt(43))^n - (4-sqrt(43))^n)/(2*sqrt(43)).

A326347 Number of unordered pairs of 4-colorings of an n-cycle that differ in the coloring of exactly one vertex.

Original entry on oeis.org

36, 240, 780, 2952, 10164, 35040, 118044, 393720, 1299012, 4251600, 13817388, 44641128, 143488980, 459165120, 1463588412, 4649045976, 14721978468, 46490458800, 146444944716, 460255541064, 1443528741876, 4518872583840, 14121476823900, 44059007691192
Offset: 3

Views

Author

Andrew Howroyd, Sep 11 2019

Keywords

Crossrefs

Programs

  • PARI
    a(n) = 6*n*(3^(n-2) + (-1)^n);

Formula

a(n) = n*(3*A218034(n-2) + A218034(n-1)).
a(n) = 6*n*(3^(n-2) + (-1)^n).
a(n) = 12*n*A046717(n-2).
a(n) = 4*a(n-1) + 2*a(n-2) - 12*a(n-3) - 9*a(n-4) for n > 6.
G.f.: 12*x^3*(3 + 8*x - 21*x^2 - 18*x^3)/((1 + x)^2*(1 - 3*x)^2).

A375248 Expansion of (1 - x)/(1 - 2*x - 3*x^2)^(7/2).

Original entry on oeis.org

1, 6, 35, 168, 756, 3192, 12936, 50688, 193479, 722722, 2651649, 9581936, 34176324, 120526056, 420852204, 1456709328, 5002984791, 17062825626, 57827993685, 194871361608, 653285629920, 2179701604080, 7241015510820, 23958512912880, 78978801164445
Offset: 0

Views

Author

Seiichi Manyama, Aug 07 2024

Keywords

Crossrefs

First differences of A374506.

Programs

  • Mathematica
    a[n_]:=(1+n)(2+n)(3+n)(4+n)(5+n)Hypergeometric2F1[(1-n)/2,-n/2,3,4]/120; Array[a,25,0] (* Stefano Spezia, Aug 07 2024 *)
  • PARI
    my(N=30, x='x+O('x^N)); Vec((1-x)/(1-2*x-3*x^2)^(7/2))

Formula

a(n) = (binomial(n+5,3)/10) * Sum_{k=0..floor(n/2)} binomial(n+2,n-2*k) * binomial(2*k+2,k).
a(n) = (binomial(n+5,3)/10) * A014531(n+1).
a(n) = ((n+5)/(n*(n+4))) * ((2*n+3)*a(n-1) + 3*(n+4)*a(n-2)).
a(n) = (1 + n)*(2 + n)*(3 + n)*(4 + n)*(5 + n)*hypergeom([(1-n)/2, -n/2], [3], 4)/120. - Stefano Spezia, Aug 07 2024

A378796 Number of minimal edge cuts in the n-sun graph.

Original entry on oeis.org

1, 6, 15, 44, 125, 370, 1099, 3288, 9849, 29534, 88583, 265732, 797173, 2391498, 7174467, 21523376, 64570097, 193710262, 581130751, 1743392220, 5230176621, 15690529826, 47071589435, 141214768264, 423644304745, 1270932914190, 3812798742519, 11438396227508, 34315188682469, 102945566047354
Offset: 1

Views

Author

Eric W. Weisstein, Dec 07 2024

Keywords

Comments

The sequence has been extended to n=1 using the formula. - Andrew Howroyd, Dec 12 2024

Crossrefs

Programs

  • Mathematica
    Table[((-1)^n + 3^n + 2 n - 2)/2, {n, 20}]
    LinearRecurrence[{4, -2, -4, 3}, {1, 6, 15, 44}, 20]
    CoefficientList[Series[(-1 - 2 x + 7 x^2)/((-1 + x)^2 (-1 + 2 x + 3 x^2)), {x, 0, 20}], x]
  • PARI
    a(n) = (3^n + (-1)^n)/2 + n - 1 \\ Andrew Howroyd, Dec 12 2024

Formula

a(n) = (3^n + (-1)^n)/2 + n - 1 = A046717(n) + n - 1. - Andrew Howroyd, Dec 12 2024
G.f.: x*(-1-2*x+7*x^2)/((-1+x)^2*(-1+2*x+3*x^2)). - Eric W. Weisstein, Dec 18 2024
E.g.f.: exp(x)*(cosh(2*x) - 1 + x). - Stefano Spezia, Dec 19 2024

Extensions

a(1)-a(2) prepended and a(7) onwards from Andrew Howroyd, Dec 12 2024

A087213 Expansion of (1+x-4*x^2) / ((1+x)*(1-4*x^2)).

Original entry on oeis.org

1, 0, 0, 4, -4, 20, -20, 84, -84, 340, -340, 1364, -1364, 5460, -5460, 21844, -21844, 87380, -87380, 349524, -349524, 1398100, -1398100, 5592404, -5592404, 22369620, -22369620, 89478484, -89478484, 357913940, -357913940, 1431655764, -1431655764, 5726623060
Offset: 0

Views

Author

Paul Barry, Aug 26 2003

Keywords

Comments

Binomial transform is A046717 (with extra leading 1).

Programs

  • Mathematica
    CoefficientList[Series[(1 + x - 4 x^2)/((1 + x) (1 - 4 x^2)), {x, 0, 33}], x] (* or *) {1, 0}~Join~LinearRecurrence[{-1, 4, 4}, {0, 4, -4}, 32] (* Michael De Vlieger, Mar 17 2017 *)
  • PARI
    Vec((1 + x - 4*x^2) / ((1 + x)*(1 - 2*x)*(1 + 2*x)) + O(x^40)) \\ Colin Barker, Mar 17 2017

Formula

a(2*n+1) = A002450(n) = A001045(2*n).
a(2*n+2) = -A002450(n) = -A001045(2*n).
a(n) = 2^n/6 - (-2)^n/2 + 4*(-1)^n/3.
a(n) = -a(n-1)+4*a(n-2)+4*a(n-3) for n>2.

A202389 Triangle T(n,k), read by rows, given by (1, -2, 1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 1, -1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 1, 1, -1, 1, 2, -1, -2, 2, 3, 1, -2, -5, 3, 5, 1, 3, -5, -10, 5, 8, -1, 3, 9, -10, -20, 8, 13, -1, -4, 9, 22, -20, -38, 13, 21, 1, -4, -14, 22, 51, -38, -71, 21, 34, 1, 5, -14, -40, 51, 111, -71, -130, 34, 55
Offset: 0

Views

Author

Philippe Deléham, Dec 18 2011

Keywords

Comments

T(n,n) = A000045(n+1) = Fibonacci(n+1).

Examples

			Triangle begins :
1
1, 1
-1, 1, 2
-1, -2, 2, 3
1, -2, -5, 3, 5
1, 3, -5, -10, 5, 8
-1, 3, 9, -10, -20, 8, 13
		

Crossrefs

Programs

  • Mathematica
    With[{m = 9}, CoefficientList[CoefficientList[Series[(1+x)/(1-y*x+(1-y^2)*x
    ^2), {x, 0 , m}, {y, 0, m}], x], y]] // Flatten (* Georg Fischer, Feb 17 2020 *)
  • PARI
    T(n,k) = if (k<0, 0, if (nMichel Marcus, Feb 17 2020

Formula

T(n,k) = T(n-1,k-1) + T(n-2,k-2) - T(n-2,k) with T(0,0) = T(1,0) = T(1,1) = 1 and T(n,k) = 0 if k<0 or if n
G.f.: (1+x)/(1-y*x+(1-y^2)*x^2).
Sum_{k=0..n} T(n,k)*x^k = (-1)^n*A046717(n), A000007(n), A057077(n), A040000(n), A000244(n) for x = -2, -1, 0, 1, 2 respectively.

Extensions

a(52) corrected by Georg Fischer, Feb 17 2020
Previous Showing 41-50 of 56 results. Next