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 81-90 of 135 results. Next

A077846 Expansion of g.f. 1/(1 - 3*x + 2*x^3).

Original entry on oeis.org

1, 3, 9, 25, 69, 189, 517, 1413, 3861, 10549, 28821, 78741, 215125, 587733, 1605717, 4386901, 11985237, 32744277, 89459029, 244406613, 667731285, 1824275797, 4984014165, 13616579925, 37201188181, 101635536213, 277673448789, 758617970005, 2072582837589, 5662401615189
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

Number of (s(0), s(1), ..., s(n+2)) such that 0 < s(i) < 6 and |s(i) - s(i-1)| <= 1 for i = 1..n+2, s(0) = 1, s(n+2) = 3. - Herbert Kociemba, Jun 17 2004
A Whitney transform of 2^n (see Benoit Cloitre formula and A004070). The Whitney transform maps the sequence with g.f. g(x) to that with g.f. (1/(1-x))g(x(1+x)). - Paul Barry, Feb 16 2005

Crossrefs

First differences are in A002605.

Programs

  • Mathematica
    CoefficientList[Series[1 / (1 - 3 x + 2 x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 19 2013 *)
    LinearRecurrence[{3,0,-2},{1,3,9},40] (* Harvey P. Dale, Apr 27 2014 *)
  • PARI
    a(n)=sum(i=0,n,sum(j=0,n,2^j*binomial(j,i-j)))
    
  • PARI
    Vec(1/(1-3*x+2*x^3) + O(x^100)) \\ Altug Alkan, Mar 24 2016

Formula

a(n) = 3*a(n-1) - 2*a(n-3) = 2*A057960(n) - 1 = round(2*A028859(n)/sqrt(3) - 1/3) = Sum_{i} b(n, i), where b(n, 0) = b(n, 6) = 0, b(0, 3) = 1, b(0, i) = 0 if i <> 3 and b(n+1, i) = b(n, i-1) + b(n, i) + b(n, i+1) if 0 < i < 6 (i.e., the number of three-choice paths along a corridor width 5, starting from the middle). - Henry Bottomley, Mar 06 2003
Binomial transform of A068911. a(n) = (1+sqrt(3))^n*(2+sqrt(3))/3 + (1-sqrt(3))^n*(2-sqrt(3))/3 - 1/3. - Paul Barry, Feb 17 2004
a(0)=1; for n >= 1, a(n) = ceiling((1+sqrt(3))*a(n-1)). - Benoit Cloitre, Jun 19 2004
a(n) = Sum_{i=0..n} Sum_{j=0..n} 2^j*binomial(j, i-j). - Benoit Cloitre, Oct 23 2004
a(n) = 2*(a(n-1) + a(n-2)) + 1, n > 1. - Gary Detlefs, Jun 20 2010
a(n) = (2*A052945(n+1) - 1)/3. - R. J. Mathar, Mar 31 2011
a(n) = floor((1+sqrt(3))^(n+2)/6). - Bruno Berselli, Feb 05 2013
a(n) = (-2 + (1-sqrt(3))^(n+2) + (1+sqrt(3))^(n+2))/6. - Alexander R. Povolotsky, Feb 13 2016
E.g.f.: exp(x)*(4*cosh(sqrt(3)*x) + 2*sqrt(3)*sinh(sqrt(3)*x) - 1)/3. - Stefano Spezia, Mar 02 2024

Extensions

Name changed by Arkadiusz Wesolowski, Dec 06 2011

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

Original entry on oeis.org

0, 1, 2, 6, 16, 38, 92, 222, 536, 1294, 3124, 7542, 18208, 43958, 106124, 256206, 618536, 1493278, 3605092, 8703462, 21012016, 50727494, 122467004, 295661502, 713790008, 1723241518, 4160273044, 10043787606, 24247848256, 58539484118, 141326816492, 341193117102
Offset: 0

Views

Author

Alois P. Heinz, Apr 06 2016

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{0, 1, 2}, LinearRecurrence[{2, 1}, {6, 16}, 30]] (* Jean-François Alcover, Nov 02 2021 *)
  • PARI
    concat(0, Vec(x*(1+x)*(1-x+2*x^2)/(1-2*x-x^2) + O(x^50))) \\ Colin Barker, Apr 12 2016

Formula

From Colin Barker, Apr 12 2016: (Start)
a(n) = ((1+sqrt(2))^n*(-5+4*sqrt(2)) + (1-sqrt(2))^n*(5+4*sqrt(2)))/sqrt(2) for n>2.
a(n) = 2*a(n-1)+a(n-2) for n>4.
(End)

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

Original entry on oeis.org

1, -1, 5, -11, 33, -87, 241, -655, 1793, -4895, 13377, -36543, 99841, -272767, 745217, -2035967, 5562369, -15196671, 41518081, -113429503, 309895169, -846649343, 2313089025, -6319476735, 17265131521, -47169216511, 128868696065, -352075825151, 961889042433, -2627929735167
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

Pisano period lengths: 1, 1, 6, 1, 24, 6, 48, 1, 18, 24, 5, 6, 12, 48, 24, 1,144, 18,180, 24,... - R. J. Mathar, Aug 10 2012

Programs

Formula

a(n+1)-a(n) = (-1)^(n+1)*A002605(n+2). - R. J. Mathar, Mar 14 2011

A099842 Expansion of (1-x)/(1 + 6*x - 3*x^2).

Original entry on oeis.org

1, -7, 45, -291, 1881, -12159, 78597, -508059, 3284145, -21229047, 137226717, -887047443, 5733964809, -37064931183, 239591481525, -1548743682699, 10011236540769, -64713650292711, 418315611378573, -2704034619149571, 17479154549033145, -112987031151647583
Offset: 0

Views

Author

Paul Barry, Oct 27 2004

Keywords

Comments

A transformation of x/(1-2*x-2*x^2).
The g.f. is the transform of the g.f. of A002605 under the mapping G(x) -> (-1/(1+x))*G((x-1)/(x+1)). In general this mapping transforms x/(1-k*x-k*x^2) into (1-x)/(1+2*(k+1)*x-(2*k-1)*x^2).
For n >= 1, |a(n)| equals the numbers of words of length n-1 on alphabet {0,1,...,6} containing no subwords 00, 11, 22, 33. - Milan Janjic, Jan 31 2015

Crossrefs

Programs

  • Magma
    [n le 2 select (-7)^(n-1) else -6*Self(n-1) +3*Self(n-2): n in [1..31]]; // G. C. Greubel, Oct 10 2022
    
  • Mathematica
    LinearRecurrence[{-6,3}, {1,-7}, 31] (* G. C. Greubel, Oct 10 2022 *)
    CoefficientList[Series[(1-x)/(1+6x-3x^2),{x,0,40}],x] (* Harvey P. Dale, Aug 31 2024 *)
  • SageMath
    A099842 = BinaryRecurrenceSequence(-6,3,1,-7)
    [A099842(n) for n in range(31)] # G. C. Greubel, Oct 10 2022

Formula

G.f.: (1-x)/(1+6*x-3*x^2).
a(n) = (1/2 - sqrt(3)/3)*(-3 + 2*sqrt(3))^n + (1/2 + sqrt(3)/3)*(-3 - 2*sqrt(3))^n.
a(n) = (-1)^n*Sum_{k=0..n} binomial(n, k)(-1)^(n-k)*A002605(2k+2)/2.
a(n) = (-1)^n*(A090018(n) + A090018(n-1)). - R. J. Mathar, Apr 07 2022

A221408 T(n,k)=Number of nXk arrays of occupancy after each element stays put or moves to some horizontal or vertical neighbor, with every occupancy equal to zero or two.

Original entry on oeis.org

0, 2, 2, 0, 6, 0, 4, 16, 16, 4, 0, 44, 0, 44, 0, 8, 120, 436, 436, 120, 8, 0, 328, 0, 4518, 0, 328, 0, 16, 896, 12668, 47156, 47156, 12668, 896, 16, 0, 2448, 0, 492102, 0, 492102, 0, 2448, 0, 32, 6688, 368268, 5133044, 18852560, 18852560, 5133044, 368268, 6688, 32
Offset: 1

Views

Author

R. H. Hardin Jan 15 2013

Keywords

Comments

Table starts
..0.....2........0.........4..........0...........8...........0............16
..2.....6.......16........44........120.........328.........896..........2448
..0....16........0.......436..........0.......12668...........0........368268
..4....44......436......4518......47156......492102.....5133044......53529806
..0...120........0.....47156..........0....18852560...........0....7505597654
..8...328....12668....492102...18852560...722442370.27665242848.1058237377670
..0...896........0...5133044..........0.27665242848
.16..2448...368268..53529806.7505597654
..0..6688........0.558164472
.32.18272.10705360
..0.49920
.64

Examples

			Some solutions for n=3 k=4
..2..2..0..2....2..0..2..0....2..0..2..2....2..0..2..0....0..2..2..0
..0..0..0..0....0..2..2..0....0..0..2..0....2..2..2..0....2..0..0..0
..2..2..2..0....2..0..0..2....0..2..2..0....0..0..2..0....2..2..0..2
		

Crossrefs

Column 1 is A077957
Column 2 is A002605(n+1)

A221728 T(n,k)=Number of nXk arrays of occupancy after each element stays put or moves to some horizontal, diagonal or antidiagonal neighbor, with every occupancy equal to zero or two.

Original entry on oeis.org

0, 2, 0, 0, 6, 0, 4, 16, 16, 0, 0, 52, 0, 44, 0, 8, 174, 540, 464, 120, 0, 0, 588, 0, 6188, 0, 328, 0, 16, 1984, 22180, 80160, 71310, 13948, 896, 0, 0, 6688, 0, 1048566, 0, 824144, 0, 2448, 0, 32, 22536, 911081, 13757056, 47798542, 42509454, 9525048, 420736, 6688, 0
Offset: 1

Views

Author

R. H. Hardin Jan 22 2013

Keywords

Comments

Table starts
.0....2......0.......4........0........8........0........16.....0....32.0
.0....6.....16......52......174......588.....1984......6688.22536.75924
.0...16......0.....540........0....22180........0....911081.....0
.0...44....464....6188....80160..1048566.13757056.180437354
.0..120......0...71310........0.47798542
.0..328..13948..824144.42509454
.0..896......0.9525048
.0.2448.420736
.0.6688
.0

Examples

			Some solutions for n=3 k=4
..2..0..2..0....0..2..0..0....0..2..0..0....2..0..0..2....2..0..0..2
..0..2..2..0....2..0..2..2....2..0..2..0....2..2..2..0....0..2..0..2
..0..2..0..2....2..0..2..0....2..2..0..2....0..2..0..0....0..2..2..0
		

Crossrefs

Column 2 is A002605(n+1)
Row 2 is A221270

A227418 Array A(n,k) with all numbers m such that 3*m^2 +- 3^k is a square and their corresponding square roots, read by downward antidiagonals.

Original entry on oeis.org

0, 1, 1, 0, 2, 4, 3, 3, 7, 15, 0, 6, 12, 26, 56, 9, 9, 21, 45, 97, 209, 0, 18, 36, 78, 168, 362, 780, 27, 27, 63, 135, 291, 627, 1351, 2911, 0, 54, 108, 234, 504, 1086, 2340, 5042, 10864, 81, 81, 189, 405, 873, 1881, 4053, 8733, 18817, 40545
Offset: 0

Views

Author

Richard R. Forberg, Sep 02 2013

Keywords

Comments

Array is analogous to A228405 in goal and structure, with key differences.
Left column is A001353. Top row (not in OEIS) interleaves 0 with the powers of 3, as: 0, 1, 0, 3, 0, 9, 0, 27, 0, 81.
Either or both may be used as initializing values. See Formula section.
The left column is the second binomial transform of the top row. The intermediate transform sequence is A002605, not present in this array.
The columns of the array hold all values, in sequential order, of numbers m such that 3*m^2 + 3^k or 3*m^2 - 3^k are squares, and their corresponding square roots in the next column, which then form the "next round" of m values for column k+1.
For example: A(n,0) are numbers such that 3*m^2 + 1 are squares, the integer square roots of each are in A(n,1), which are then numbers m such that 3*m^2 - 3 are squares, with those square roots in A(n,2), etc. The sign alternates for each increment of k, etc. No integer square roots exist for the opposite sign in a given column, regardless of n.
Also, A(n,1) are values of m such that floor(m^2/3) is square, with the corresponding square roots given by A(n,0).
A(n,k)/A(n,k-2) = 3; A(n,k)/A(n,k-1) converges to sqrt(3) for large n.
A(n,k)/A(n-1,k) converges to 2 + sqrt(3) for large n.
Several ways of combining the first few columns give OEIS sequences:
A(n,0) + A(n,1) = A001835; A(n,1) + A(n,2)= A001834; A(n,2) + A(n,3) = A082841;
A(n,0)*A(n,1)/2 = A007655(n); A(n+2,0)*A(n+1,1) = A001922(n);
A(n,0)*A(n+1,1) = A001921(n); A(n,0)^2 + A(n,1)^2 = A103974(n);
A(n,1)^2 - A(n,0)^2 = A011922(n); (A(n+2,0)^2 + A(n+1,1)^2)/2 = A122770(n) = 2*A011916(n).
The main diagonal (without initial 0) = 2*A090018. The first subdiagonal = abs(A099842). First superdiagonal = A141041.
A001353 (in left column) are the only initializing set of numbers where the recursive square root equation (see below) produces exclusively integer values, for all iterations of k. For any other initial values only even iterations (at k = 2, 4, ...) produce integers.

Examples

			The array, A(n, k), begins as:
    0,    1,    0,    3,    0,     9,     0,    27, ... see A000244;
    1,    2,    3,    6,    9,    18,    27,    54, ... A038754;
    4,    7,   12,   21,   36,    63,   108,   189, ... A228879;
   15,   26,   45,   78,  135,   234,   405,   702, ...
   56,   97,  168,  291,  504,   873,  1512,  2619, ...
  209,  362,  627, 1086, 1881,  3258,  5643,  9774, ...
  780, 1351, 2340, 4053, 7020, 12159, 21060, 36477, ...
Antidiagonal triangle, T(n, k), begins as:
   0;
   1,  1;
   0,  2,   4;
   3,  3,   7,  15;
   0,  6,  12,  26,  56;
   9,  9,  21,  45,  97,  209;
   0, 18,  36,  78, 168,  362,  780;
  27, 27,  63, 135, 291,  627, 1351, 2911;
   0, 54, 108, 234, 504, 1086, 2340, 5042, 10864;
  81, 81, 189, 405, 873, 1881, 4053, 8733, 18817, 40545;
		

Crossrefs

Programs

  • Magma
    function A(n,k)
      if k lt 0 then return 0;
      elif n eq 0 then return Round((1/2)*(1-(-1)^k)*3^((k-1)/2));
      elif k eq 0 then return Evaluate(ChebyshevSecond(n), 2);
      else return 2*A(n, k-1) - A(n-1, k-1);
      end if; return A;
    end function;
    A227418:= func< n,k | A(k, n-k) >;
    [A227418(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Oct 09 2022
    
  • Mathematica
    A[n_, k_]:= If[k<0, 0, If[k==0, ChebyshevU[n-1, 2], 2*A[n, k-1] - A[n-1, k-1]]];
    T[n_, k_]:= A[k, n-k];
    Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 09 2022 *)
  • SageMath
    def A(n,k):
        if (k<0): return 0
        elif (k==0): return chebyshev_U(n-1,2)
        else: return 2*A(n, k-1) - A(n-1, k-1)
    def A227418(n, k): return A(k, n-k)
    flatten([[A227418(n,k) for k in range(n+1)] for n in range(15)]) # G. C. Greubel, Oct 09 2022

Formula

If using the left column and top row to initialize, then: A(n,k) = 2*A(n, k-1) - A(n-1, k-1).
If using only the top row to initialize, then: A(n,k) = 4*A(n-1,k) - A(n-2,k).
If using the left column to initialize, then: A(n,k) = sqrt(3*A(n,k-1) + (-3)^(k-1)), for all n, k > 0.
Other internal relationships that apply are: A(2*n-1, 2*k) = A(n,k)^2 - A(n-1,k)^2;
A(n+1,k) * A(n,k+1) - A(n+1, k+1) * A(n,k) = (-3)^k, for all n, k > 0.
A(n, 0) = A001353(n).
A(n, 1) = A001075(n).
A(n, 2) = A005320(n).
A(n, 3) = A151961(n).
A(1, k) = A038754(k).
A(n, n) = 2*A090018(n), for n > 0 (main diagonal).
A(n, n+1) = A141041(n-1) (superdiagonal).
A(n+1, n) = abs(A099842(n)) (subdiagonal).
From G. C. Greubel, Oct 09 2022: (Start)
T(n, 0) = (1/2)*(1-(-1)^n)*3^((n-1)/2).
T(n, 1) = A038754(n-1).
T(n, 2) = A228879(n-2).
T(2*n-1, n-1) = A141041(n-1).
T(2*n, n) = 2*A090018(n-1), n > 0.
T(n, n-4) = 3*A005320(n-4).
T(n, n-3) = 3*A001075(n-3).
T(n, n-2) = 3*A001353(n-2).
T(n, n-1) = A001075(n-1).
T(n, n) = A001353(n).
Sum_{k=0..n-1} T(n, k) = A084156(n).
Sum_{k=0..n} T(n, k) = A084156(n) + A001353(n). (End)

Extensions

Offset corrected by G. C. Greubel, Oct 09 2022

A231137 T(n,k)=Number of (n+1)X(k+1) black-square subarrays of 0..2 arrays with no element equal to a strict majority of its diagonal and antidiagonal neighbors, with values 0..2 introduced in row major order.

Original entry on oeis.org

1, 2, 2, 6, 9, 6, 16, 40, 40, 16, 44, 182, 308, 182, 44, 120, 808, 2260, 2260, 808, 120, 328, 3688, 16812, 27171, 16812, 3688, 328, 896, 16368, 124644, 336004, 336004, 124644, 16368, 896, 2448, 74728, 924900, 4066129, 6794904, 4066129, 924900, 74728, 2448
Offset: 1

Views

Author

R. H. Hardin, Nov 04 2013

Keywords

Comments

Table starts
..1...2.....6.....16......44.......120........328.........896..........2448
..2...9....40....182.....808......3688......16368.......74728........331648
..6..40...308...2260...16812....124644.....924900.....6862052......50913012
.16.182..2260..27171..336004...4066129...50257244...608468617....7520563372
.44.808.16812.336004.6794904.137063228.2766762720.55844298404.1127200291672

Examples

			Some solutions for n=2 k=4
..x..0..x..1..x....x..0..x..1..x....x..0..x..0..x....x..0..x..1..x
..2..x..0..x..1....1..x..0..x..2....1..x..2..x..0....2..x..0..x..2
..x..0..x..2..x....x..0..x..1..x....x..1..x..2..x....x..1..x..1..x
		

Crossrefs

Column 1 is A002605
Column 3 is A231126
Column 5 is A231128
Column 7 is A231130

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1) +2*a(n-2)
k=2: a(n) = 22*a(n-2) -36*a(n-4) +16*a(n-6)
k=3: [order 8]
k=4: [order 18, even terms]
k=5: [order 34]
k=6: [order 90, even terms]

A265106 Expansion of (x^5-x^4-2*x^3+x^2-x)/(-x^4+x^3-2*x^2+3*x-1).

Original entry on oeis.org

0, 1, 2, 6, 16, 36, 80, 178, 394, 870, 1920, 4236, 9344, 20610, 45458, 100262, 221136, 487732, 1075728, 2372594, 5232922, 11541574, 25455744, 56144412, 123830400, 273116546, 602377506, 1328585414, 2930287376, 6462952260, 14254489936, 31439267250, 69341486762
Offset: 0

Views

Author

Alois P. Heinz, Apr 06 2016

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(x^5-x^4-2x^3+x^2-x)/(-x^4+x^3-2x^2+3x-1),{x,0,40}],x] (* or *) LinearRecurrence[{3,-2,1,-1},{0,1,2,6,16,36},40] (* Harvey P. Dale, Feb 05 2019 *)
  • PARI
    concat(0, Vec(x*(1-x+2*x^2+x^3-x^4)/((1-x)*(1-2*x-x^3)) + O(x^50))) \\ Colin Barker, Apr 12 2016

Formula

a(n) = 3*a(n-1)-2*a(n-2)+a(n-3)-a(n-4) for n>5. - Colin Barker, Apr 12 2016
a(n) = 2*a(n-1) + a(n-3) + 2 for n>4. - Greg Dresden, Feb 09 2020

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

Original entry on oeis.org

0, 1, 2, 6, 16, 36, 76, 156, 316, 636, 1276, 2556, 5116, 10236, 20476, 40956, 81916, 163836, 327676, 655356, 1310716, 2621436, 5242876, 10485756, 20971516, 41943036, 83886076, 167772156, 335544316, 671088636, 1342177276, 2684354556, 5368709116, 10737418236, 21474836476
Offset: 0

Views

Author

N. J. A. Sloane, Apr 06 2016

Keywords

Crossrefs

Agrees with A048487 except for initial terms.

Programs

  • Magma
    [n le 2 select n else 5*2^(n-2)-4: n in [0..40]]; // Bruno Berselli, Apr 08 2016
    
  • PARI
    concat(0, Vec(x*(1-x+2*x^2+2*x^3)/((1-x)*(1-2*x)) + O(x^50))) \\ Colin Barker, Apr 12 2016

Formula

G.f.: x*(1 - x + 2*x^2 + 2*x^3)/((1 - x)*(1 - 2*x)).
a(n) = 5*2^(n-2)-4 for n>2. - Bruno Berselli, Apr 08 2016
a(n) = 3*a(n-1)-2*a(n-2) for n>4. - Colin Barker, Apr 12 2016
From Paul Curtz, Sep 23 2019: (Start)
a(n+1) = b(n+4) - b(n) where b(n) = 0, 1, 1, 1 followed by A026646.
a(n) = 2*a(n-1)+4 for n>4. (End)
Previous Showing 81-90 of 135 results. Next