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 51-60 of 85 results. Next

A119457 Triangle read by rows: T(n, 1) = n, T(n, 2) = 2*(n-1) for n>1 and T(n, k) = T(n-1, k-1) + T(n-2, k-2) for 2 < k <= n.

Original entry on oeis.org

1, 2, 2, 3, 4, 3, 4, 6, 6, 5, 5, 8, 9, 10, 8, 6, 10, 12, 15, 16, 13, 7, 12, 15, 20, 24, 26, 21, 8, 14, 18, 25, 32, 39, 42, 34, 9, 16, 21, 30, 40, 52, 63, 68, 55, 10, 18, 24, 35, 48, 65, 84, 102, 110, 89, 11, 20, 27, 40, 56, 78, 105, 136, 165, 178, 144, 12, 22, 30, 45, 64, 91, 126, 170, 220, 267, 288, 233
Offset: 1

Views

Author

Reinhard Zumkeller, May 20 2006

Keywords

Examples

			Triangle begins as:
   1;
   2,  2;
   3,  4,  3;
   4,  6,  6,  5;
   5,  8,  9, 10,  8;
   6, 10, 12, 15, 16, 13;
   7, 12, 15, 20, 24, 26,  21;
   8, 14, 18, 25, 32, 39,  42,  34;
   9, 16, 21, 30, 40, 52,  63,  68,  55;
  10, 18, 24, 35, 48, 65,  84, 102, 110,  89;
  11, 20, 27, 40, 56, 78, 105, 136, 165, 178, 144;
  12, 22, 30, 45, 64, 91, 126, 170, 220, 267, 288, 233;
		

Crossrefs

Main diagonal: A023607(n).
Sums: A001891 (row), A355020 (signed row).
Columns: A000027(n) (k=1), A005843(n-1) (k=2), A008585(n-2) (k=3), A008587(n-3) (k=4), A008590(n-4) (k=5), A008595(n-5) (k=6), A008603(n-6) (k=7).
Diagonals: A000045(n+1) (k=n), A006355(n+1) (k=n-1), A022086(n-1) (k=n-2), A022087(n-2) (k=n-3), A022088(n-3) (k=n-4), A022089(n-4) (k=n-5), A022090(n-5) (k=n-6).

Programs

  • Magma
    A119457:= func< n,k | (n-k+1)*Fibonacci(k+1) >;
    [A119457(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Apr 16 2025
    
  • Mathematica
    (* First program *)
    T[n_, 1] := n;
    T[n_ /; n > 1, 2] := 2 n - 2;
    T[n_, k_] /; 2 < k <= n := T[n, k] = T[n - 1, k - 1] + T[n - 2, k - 2];
    Table[T[n, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, Dec 01 2021 *)
    (* Second program *)
    A119457[n_,k_]:= (n-k+1)*Fibonacci[k+1];
    Table[A119457[n,k], {n,13}, {k,n}]//Flatten (* G. C. Greubel, Apr 16 2025 *)
  • SageMath
    def A119457(n,k): return (n-k+1)*fibonacci(k+1)
    print(flatten([[A119457(n,k) for k in range(1,n+1)] for n in range(1,13)])) # G. C. Greubel, Apr 16 2025

Formula

T(n, k) = (n-k+1)*T(k,k) for 1 <= k < n, with T(n, n) = A000045(n+1).
From G. C. Greubel, Apr 15 2025: (Start)
T(n, k) = (n-k+1)*Fibonacci(k+1).
Sum_{k=1..floor((n+1)/2)} T(n-k+1, k) = (1/2)*(1-(-1)^n)*A023652(floor((n+1)/2)) + (1+(-1)^n)*A001891(floor(n/2)).
Sum_{k=1..floor((n+1)/2)} (-1)^(k-1)*T(n-k+1, k) = (1/2)*(1-(-1)^n)*A112469(floor((n-1)/2)) + (1+(-1)^n)*A355020(floor((n-2)/2)). (End)

A207519 T(n,k)=Number of nXk 0..1 arrays avoiding 0 0 1 and 0 1 0 horizontally and 0 1 0 and 1 0 1 vertically.

Original entry on oeis.org

2, 4, 4, 6, 16, 6, 9, 36, 36, 10, 14, 81, 98, 100, 16, 21, 196, 271, 358, 256, 26, 31, 441, 834, 1307, 1152, 676, 42, 46, 961, 2307, 5458, 5369, 3910, 1764, 68, 68, 2116, 6115, 19909, 29622, 23645, 12994, 4624, 110, 100, 4624, 16544, 68807, 137719, 174224
Offset: 1

Views

Author

R. H. Hardin Feb 18 2012

Keywords

Comments

Table starts
..2....4.....6......9......14.......21........31.........46..........68
..4...16....36.....81.....196......441.......961.......2116........4624
..6...36....98....271.....834.....2307......6115......16544.......44250
.10..100...358...1307....5458....19909.....68807.....243954......851870
.16..256..1152...5369...29622...137719....600283....2713480....12034046
.26..676..3910..23645..174224..1048423...5849409...34086388...194127326
.42.1764.12994.101233..991184..7666319..54373655..406281454..2956097240
.68.4624.43596.439063.5723716.57113109.516879019.4964342828.46263548214

Examples

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

Crossrefs

Column 1 is A006355(n+2)
Column 2 is A206981
Column 3 is A207462
Column 4 is A207463
Row 1 is A038718(n+2)
Row 2 is A207069
Row 3 is A207392

A207949 T(n,k)=Number of nXk 0..1 arrays avoiding 0 0 1 and 0 1 1 horizontally and 0 1 0 and 1 0 1 vertically.

Original entry on oeis.org

2, 4, 4, 6, 16, 6, 9, 36, 36, 10, 12, 81, 102, 100, 16, 16, 144, 289, 370, 256, 26, 20, 256, 612, 1369, 1232, 676, 42, 25, 400, 1296, 3478, 5929, 4238, 1764, 68, 30, 625, 2340, 8836, 18172, 26569, 14406, 4624, 110, 36, 900, 4225, 18330, 55696, 98126, 117649
Offset: 1

Views

Author

R. H. Hardin Feb 21 2012

Keywords

Comments

Table starts
..2....4.....6......9......12.......16.......20........25........30.........36
..4...16....36.....81.....144......256......400.......625.......900.......1296
..6...36...102....289.....612.....1296.....2340......4225......6890......11236
.10..100...370...1369....3478.....8836....18330.....38025.....69420.....126736
.16..256..1232...5929...18172....55696...133812....321489....662256....1364224
.26..676..4238..26569...98126...362404..1007146...2798929...6501278...15100996
.42.1764.14406.117649..524104..2334784..7513176..24176889..63380130..166152100
.68.4624.49164.522729.2806686.15069924.56114310.208947025.617864520.1827049536

Examples

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

Crossrefs

Column 1 is A006355(n+2)
Column 2 is A206981
Column 3 is A207249
Column 4 is A207854
Row 1 is A002620(n+2)
Row 2 is A030179(n+2)
Row 3 is A207118

A208698 T(n,k)=Number of nXk 0..1 arrays avoiding 0 0 1 and 1 0 0 horizontally and 0 1 0 and 1 0 1 vertically.

Original entry on oeis.org

2, 4, 4, 6, 16, 6, 9, 36, 36, 10, 14, 81, 98, 100, 16, 22, 196, 271, 358, 256, 26, 35, 484, 844, 1309, 1152, 676, 42, 56, 1225, 2706, 5524, 5371, 3910, 1764, 68, 90, 3136, 8977, 24086, 30160, 23637, 12994, 4624, 110, 145, 8100, 30168, 109599, 177488, 177872
Offset: 1

Views

Author

R. H. Hardin Mar 01 2012

Keywords

Comments

Table starts
..2....4.....6......9......14.......22.........35..........56...........90
..4...16....36.....81.....196......484.......1225........3136.........8100
..6...36....98....271.....844.....2706.......8977.......30168.......102384
.10..100...358...1309....5524....24086.....109599......506870......2376964
.16..256..1152...5371...30160...177488....1103081.....6990922.....45002090
.26..676..3910..23637..177872..1415508...12014735...104356568....923279444
.42.1764.12994.101069.1016258.10934750..126827983..1510509752..18362140414
.68.4624.43596.438103.5893862.85697362.1356513169.22125222702.369223577680

Examples

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

Crossrefs

Column 1 is A006355(n+2)
Column 2 is A206981
Column 3 is A207462
Column 4 is A207914
Row 1 is A001611(n+2)
Row 2 is A207436
Row 3 is A207939

A221524 T(n,k)=Number of 0..k arrays of length n with each element differing from at least one neighbor by 2 or more.

Original entry on oeis.org

0, 0, 0, 0, 2, 0, 0, 6, 2, 0, 0, 12, 10, 4, 0, 0, 20, 30, 36, 6, 0, 0, 30, 68, 144, 94, 10, 0, 0, 42, 130, 400, 536, 274, 16, 0, 0, 56, 222, 900, 1940, 2172, 768, 26, 0, 0, 72, 350, 1764, 5368, 9982, 8544, 2182, 42, 0, 0, 90, 520, 3136, 12458, 33380, 50400, 33960, 6170, 68, 0, 0
Offset: 1

Views

Author

R. H. Hardin Jan 19 2013

Keywords

Comments

Table starts
.0...0......0.......0.........0..........0...........0...........0............0
.0...2......6......12........20.........30..........42..........56...........72
.0...2.....10......30........68........130.........222.........350..........520
.0...4.....36.....144.......400........900........1764........3136.........5184
.0...6.....94.....536......1940.......5368.......12458.......25544........47776
.0..10....274....2172......9982......33380.......90684......212812.......447962
.0..16....768....8544.....50400.....205080......654864.....1763328......4184064
.0..26...2182...33960....256018....1264378.....4738970....14629962.....39113752
.0..42...6170..134480...1297924....7787228....34274630...121342546....365574840
.0..68..17476..533248...6584320...47975704...247928860..1006508448...3416978176
.0.110..49470.2113456..33394958..295543282..1793345580..8348594292..31937713030
.0.178.140066.8377808.169387004.1820672982.12971955294.69248649436.298515152986

Examples

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

Crossrefs

Column 2 is A006355
Row 2 is A002378(n-1)
Row 3 is A034262(n-1)
Row 4 is A035287

Formula

Empirical for column k:
k=2: a(n) = a(n-1) +a(n-2)
k=3: a(n) = a(n-1) +4*a(n-2) +3*a(n-3) +a(n-4)
k=4: a(n) = 2*a(n-1) +6*a(n-2) +6*a(n-3) +4*a(n-4) +4*a(n-6)
k=5: a(n) = 2*a(n-1) +11*a(n-2) +20*a(n-3) +17*a(n-4) -3*a(n-5) +a(n-6)
k=6: a(n) = 3*a(n-1) +14*a(n-2) +29*a(n-3) +28*a(n-4) +a(n-5) +27*a(n-6) +8*a(n-7) +2*a(n-8)
k=7: a(n) = 3*a(n-1) +21*a(n-2) +58*a(n-3) +79*a(n-4) +32*a(n-5) +23*a(n-6) +4*a(n-7) +8*a(n-8)
Empirical for row n:
n=2: a(n) = n^2 - n
n=3: a(n) = n^3 - 3*n^2 + 4*n - 2
n=4: a(n) = n^4 - 2*n^3 + n^2
n=5: a(n) = n^5 - n^4 - 10*n^3 + 38*n^2 - 60*n + 40 for n>2
n=6: a(n) = n^6 - 20*n^4 + 83*n^3 - 182*n^2 + 236*n - 148 for n>3
n=7: a(n) = n^7 + n^6 - 29*n^5 + 109*n^4 - 204*n^3 + 202*n^2 - 80*n for n>2

A374439 Triangle read by rows: the coefficients of the Lucas-Fibonacci polynomials. T(n, k) = T(n - 1, k) + T(n - 2, k - 2) with initial values T(n, k) = k + 1 for k < 2.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 2, 3, 4, 1, 1, 2, 4, 6, 3, 2, 1, 2, 5, 8, 6, 6, 1, 1, 2, 6, 10, 10, 12, 4, 2, 1, 2, 7, 12, 15, 20, 10, 8, 1, 1, 2, 8, 14, 21, 30, 20, 20, 5, 2, 1, 2, 9, 16, 28, 42, 35, 40, 15, 10, 1, 1, 2, 10, 18, 36, 56, 56, 70, 35, 30, 6, 2
Offset: 0

Views

Author

Peter Luschny, Jul 22 2024

Keywords

Comments

There are several versions of Lucas and Fibonacci polynomials in this database. Our naming follows the convention of calling polynomials after the values of the polynomials at x = 1. This assumes a regular sequence of polynomials, that is, a sequence of polynomials where degree(p(n)) = n. This view makes the coefficients of the polynomials (the terms of a row) a refinement of the values at the unity.
A remarkable property of the polynomials under consideration is that they are dual in this respect. This means they give the Lucas numbers at x = 1 and the Fibonacci numbers at x = -1 (except for the sign). See the example section.
The Pell numbers and the dual Pell numbers are also values of the polynomials, at the points x = -1/2 and x = 1/2 (up to the normalization factor 2^n). This suggests a harmonized terminology: To call 2^n*P(n, -1/2) = 1, 0, 1, 2, 5, ... the Pell numbers (A000129) and 2^n*P(n, 1/2) = 1, 4, 9, 22, ... the dual Pell numbers (A048654).
Based on our naming convention one could call A162515 (without the prepended 0) the Fibonacci polynomials. In the definition above only the initial values would change to: T(n, k) = k + 1 for k < 1. To extend this line of thought we introduce A374438 as the third triangle of this family.
The triangle is closely related to the qStirling2 numbers at q = -1. For the definition of these numbers see A333143. This relates the triangle to A065941 and A103631.

Examples

			Triangle starts:
  [ 0] [1]
  [ 1] [1, 2]
  [ 2] [1, 2, 1]
  [ 3] [1, 2, 2,  2]
  [ 4] [1, 2, 3,  4,  1]
  [ 5] [1, 2, 4,  6,  3,  2]
  [ 6] [1, 2, 5,  8,  6,  6,  1]
  [ 7] [1, 2, 6, 10, 10, 12,  4,  2]
  [ 8] [1, 2, 7, 12, 15, 20, 10,  8,  1]
  [ 9] [1, 2, 8, 14, 21, 30, 20, 20,  5,  2]
  [10] [1, 2, 9, 16, 28, 42, 35, 40, 15, 10, 1]
.
Table of interpolated sequences:
  |  n | A039834 & A000045 | A000032 |   A000129   |   A048654  |
  |  n |     -P(n,-1)      | P(n,1)  |2^n*P(n,-1/2)|2^n*P(n,1/2)|
  |    |     Fibonacci     |  Lucas  |     Pell    |    Pell*   |
  |  0 |        -1         |     1   |       1     |       1    |
  |  1 |         1         |     3   |       0     |       4    |
  |  2 |         0         |     4   |       1     |       9    |
  |  3 |         1         |     7   |       2     |      22    |
  |  4 |         1         |    11   |       5     |      53    |
  |  5 |         2         |    18   |      12     |     128    |
  |  6 |         3         |    29   |      29     |     309    |
  |  7 |         5         |    47   |      70     |     746    |
  |  8 |         8         |    76   |     169     |    1801    |
  |  9 |        13         |   123   |     408     |    4348    |
		

Crossrefs

Triangles related to Lucas polynomials: A034807, A114525, A122075, A061896, A352362.
Triangles related to Fibonacci polynomials: A162515, A053119, A168561, A049310, A374441.
Sums include: A000204 (Lucas numbers, row), A000045 & A212804 (even sums, Fibonacci numbers), A006355 (odd sums), A039834 (alternating sign row).
Type m^n*P(n, 1/m): A000129 & A048654 (Pell, m=2), A108300 & A003688 (m=3), A001077 & A048875 (m=4).
Adding and subtracting the values in a row of the table (plus halving the values obtained in this way): A022087, A055389, A118658, A052542, A163271, A371596, A324969, A212804, A077985, A069306, A215928.
Columns include: A040000 (k=1), A000027 (k=2), A005843 (k=3), A000217 (k=4), A002378 (k=5).
Diagonals include: A000034 (k=n), A029578 (k=n-1), abs(A131259) (k=n-2).
Cf. A029578 (subdiagonal), A124038 (row reversed triangle, signed).

Programs

  • Magma
    function T(n,k) // T = A374439
      if k lt 0 or k gt n then return 0;
      elif k le 1 then return k+1;
      else return T(n-1,k) + T(n-2,k-2);
      end if;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 23 2025
    
  • Maple
    A374439 := (n, k) -> ifelse(k::odd, 2, 1)*binomial(n - irem(k, 2) - iquo(k, 2), iquo(k, 2)):
    # Alternative, using the function qStirling2 from A333143:
    T := (n, k) -> 2^irem(k, 2)*qStirling2(n, k, -1):
    seq(seq(T(n, k), k = 0..n), n = 0..10);
  • Mathematica
    A374439[n_, k_] := (# + 1)*Binomial[n - (k + #)/2, (k - #)/2] & [Mod[k, 2]];
    Table[A374439[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* Paolo Xausa, Jul 24 2024 *)
  • Python
    from functools import cache
    @cache
    def T(n: int, k: int) -> int:
        if k > n: return 0
        if k < 2: return k + 1
        return T(n - 1, k) + T(n - 2, k - 2)
    
  • Python
    from math import comb as binomial
    def T(n: int, k: int) -> int:
        o = k & 1
        return binomial(n - o - (k - o) // 2, (k - o) // 2) << o
    
  • Python
    def P(n, x):
        if n < 0: return P(n, x)
        return sum(T(n, k)*x**k for k in range(n + 1))
    def sgn(x: int) -> int: return (x > 0) - (x < 0)
    # Table of interpolated sequences
    print("|  n | A039834 & A000045 | A000032 |   A000129   |   A048654  |")
    print("|  n |     -P(n,-1)      | P(n,1)  |2^n*P(n,-1/2)|2^n*P(n,1/2)|")
    print("|    |     Fibonacci     |  Lucas  |     Pell    |    Pell*   |")
    f = "| {0:2d} | {1:9d}         |  {2:4d}   |   {3:5d}     |    {4:4d}    |"
    for n in range(10): print(f.format(n, -P(n, -1), P(n, 1), int(2**n*P(n, -1/2)), int(2**n*P(n, 1/2))))
    
  • SageMath
    from sage.combinat.q_analogues import q_stirling_number2
    def A374439(n,k): return (-1)^((k+1)//2)*2^(k%2)*q_stirling_number2(n+1, k+1, -1)
    print(flatten([[A374439(n, k) for k in range(n+1)] for n in range(13)])) # G. C. Greubel, Jan 23 2025

Formula

T(n, k) = 2^k' * binomial(n - k' - (k - k') / 2, (k - k') / 2) where k' = 1 if k is odd and otherwise 0.
T(n, k) = (1 + (k mod 2))*qStirling2(n, k, -1), see A333143.
2^n*P(n, -1/2) = A000129(n - 1), Pell numbers, P(-1) = 1.
2^n*P(n, 1/2) = A048654(n), dual Pell numbers.
T(2*n, n) = (1/2)*(-1)^n*( (1+(-1)^n)*A005809(n/2) - 2*(1-(-1)^n)*A045721((n-1)/2) ). - G. C. Greubel, Jan 23 2025

A068922 Number of ways to tile a 3 X 2n room with 1 X 2 Tatami mats. At most 3 Tatami mats may meet at a point.

Original entry on oeis.org

3, 4, 6, 10, 16, 26, 42, 68, 110, 178, 288, 466, 754, 1220, 1974, 3194, 5168, 8362, 13530, 21892, 35422, 57314, 92736, 150050, 242786, 392836, 635622, 1028458, 1664080, 2692538, 4356618, 7049156, 11405774, 18454930, 29860704, 48315634, 78176338, 126491972
Offset: 1

Views

Author

Dean Hickerson, Mar 11 2002

Keywords

Crossrefs

Cf. A068928 for incongruent tilings, A068920 for more info. First column of A272472.
Essentially the same as A006355.
Essentially the same as A078642. - Georg Fischer, Oct 06 2018

Programs

  • GAP
    Concatenation([3],List([2..40],n->2*Fibonacci(n+1))); # Muniru A Asiru, Oct 07 2018
  • Magma
    [3] cat [2*Fibonacci(n+1): n in [2..50]]; // Vincenzo Librandi, Oct 07 2018
    
  • Maple
    with(combinat): 3,seq(2*fibonacci(n+1),n=2..40); # Muniru A Asiru, Oct 07 2018
  • Mathematica
    Join[{3}, Table[2 Fibonacci[n + 1], {n, 2, 50}]] (* Vincenzo Librandi, Oct 07 2018 *)
    CoefficientList[Series[(x^2-x-3) / (x^2+x-1), {x, 0, 50}], x] (* Stefano Spezia, Oct 07 2018 *)
  • PARI
    Vec(x*(3+x-x^2) / (1-x-x^2) + O(x^50)) \\ Colin Barker, Jan 29 2017
    

Formula

For n >= 2, a(n) = 2*F(n+1), where F(n)=A000045(n) is the n-th Fibonacci number.
G.f.: x*(x^2-x-3) / (x^2+x-1). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 11 2009; checked and corrected by R. J. Mathar, Sep 16 2009
From Colin Barker, Jan 29 2017: (Start)
a(n) = (2^(-n)*(-(1-sqrt(5))^(1+n) + (1+sqrt(5))^(1+n))) / sqrt(5) for n>1.
a(n) = a(n-1) + a(n-2) for n>3. (End)
E.g.f.: 2*exp(x/2)*(5*cosh(sqrt(5)*x/2) + sqrt(5)*sinh(sqrt(5)*x/2))/5 - 2 + x. - Stefano Spezia, Apr 18 2022

A109265 Row sums of Riordan array (1-x-x^2,x(1-x)).

Original entry on oeis.org

1, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0
Offset: 0

Views

Author

Paul Barry, Jun 24 2005

Keywords

Examples

			G.f. = 1 - 2*x^2 - 2*x^3 + 2*x^5 + 2*x^6 - 2*x^8 - 2*x^9 + 2*x^11 + 2*x^12 + ...
		

Crossrefs

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x-x^2)/(1-x+x^2))); // G. C. Greubel, Aug 04 2018
  • Mathematica
    CoefficientList[Series[(1-x-x^2)/(1-x+x^2), {x, 0, 60}], x] (* G. C. Greubel, Aug 04 2018 *)
    LinearRecurrence[{1,-1},{1,0,-2},120] (* Harvey P. Dale, Apr 08 2019 *)
  • PARI
    {a(n) = n+=2; if( n<3, n==2, 2 * (n%3>0) * (-1)^(n\3))}; /* Michael Somos, Apr 15 2015 */
    

Formula

G.f.: (1-x-x^2)/(1-x+x^2).
a(n) = -a(n+3) if n>0. - Michael Somos, Apr 15 2015
a(n) = A257076(n+1). - Michael Somos, Apr 15 2015
Convolution inverse of A006355. - Michael Somos, Apr 15 2015
a(n) = A130772(n+1) = A184334(n+2) if n>0. - Michael Somos, Sep 01 2015

A206987 T(n,k)=Number of nXk 0..1 arrays avoiding the patterns 0 1 0 or 1 0 1 in any row, column, diagonal or antidiagonal.

Original entry on oeis.org

2, 4, 4, 6, 16, 6, 10, 36, 36, 10, 16, 100, 58, 100, 16, 26, 256, 158, 158, 256, 26, 42, 676, 420, 556, 420, 676, 42, 68, 1764, 1066, 1866, 1866, 1066, 1764, 68, 110, 4624, 2754, 5804, 7500, 5804, 2754, 4624, 110, 178, 12100, 7140, 18528, 27762, 27762, 18528
Offset: 1

Views

Author

R. H. Hardin Feb 14 2012

Keywords

Comments

Table starts
..2....4....6....10.....16......26.......42........68.......110........178
..4...16...36...100....256.....676.....1764......4624.....12100......31684
..6...36...58...158....420....1066.....2754......7140.....18430......47602
.10..100..158...556...1866....5804....18528.....59888....191484.....612874
.16..256..420..1866...7500...27762...106110....413526...1583234....6065840
.26..676.1066..5804..27762..119224...539576...2511348..11347860...51289536
.42.1764.2754.18528.106110..539576..2926752..16410772..88554260..477698908
.68.4624.7140.59888.413526.2511348.16410772.111202694.721243184.4677018224

Examples

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

Crossrefs

Column 1 is A006355(n+2)

A217637 T(n,k)=Number of nXk arrays of the minimum value of corresponding elements and their horizontal and vertical neighbors in a random 0..1 nXk array.

Original entry on oeis.org

2, 2, 2, 4, 6, 4, 6, 16, 16, 6, 10, 38, 66, 38, 10, 16, 98, 244, 244, 98, 16, 26, 244, 968, 1418, 968, 244, 26, 42, 614, 3726, 8706, 8706, 3726, 614, 42, 68, 1542, 14520, 52120, 83074, 52120, 14520, 1542, 68, 110, 3872, 56352, 315378, 773348, 773348, 315378
Offset: 1

Views

Author

R. H. Hardin, Oct 09 2012

Keywords

Comments

Number of maximal independent sets in the graph P_2 X P_n X P_k. - Andrew Howroyd, Jun 10 2017

Examples

			Table starts
...2.....2........4..........6...........10..............16................26
...2.....6.......16.........38...........98.............244...............614
...4....16.......66........244..........968............3726.............14520
...6....38......244.......1418.........8706...........52120............315378
..10....98......968.......8706........83074..........773348...........7272142
..16...244.....3726......52120.......773348........11181454.........163361868
..26...614....14520.....315378......7272142.......163361868........3709621842
..42..1542....56352....1900838.....68138974......2378097084.......83923710538
..68..3872...218978...11472148....639248556.....34661572702.....1901055652804
.110..9726...850620...69210290...5994907930....505010822224....43046530809006
.178.24426..3304624..417586442..56226693158...7358779655656...974841850791586
.288.61348.12837742.2519466108.527340415924.107224919634686.22075731493018104
...
Some solutions for n=3 k=4
..1..0..0..1....0..0..0..1....1..0..1..1....1..1..0..0....1..0..0..0
..0..0..0..0....0..0..1..1....0..0..0..1....0..0..1..0....1..1..0..0
..1..0..0..0....0..0..0..1....1..0..1..1....0..0..0..1....1..0..0..0
		

Crossrefs

Columns 1-3 are A006355(n+1), A217631, A217632.
Cf. A197054.
Previous Showing 51-60 of 85 results. Next