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-10 of 13 results. Next

A245996 Number of length 1+2 0..n arrays with no pair in any consecutive three terms totaling exactly n.

Original entry on oeis.org

2, 8, 28, 64, 126, 216, 344, 512, 730, 1000, 1332, 1728, 2198, 2744, 3376, 4096, 4914, 5832, 6860, 8000, 9262, 10648, 12168, 13824, 15626, 17576, 19684, 21952, 24390, 27000, 29792, 32768, 35938, 39304, 42876, 46656, 50654, 54872, 59320, 64000, 68922
Offset: 1

Views

Author

R. H. Hardin, Aug 09 2014

Keywords

Comments

From Pontus von Brömssen, Jan 10 2022: (Start)
Proof of the empirical observations in the Formula section:
For k = 1, 2, 3, let N_k be the number of triples (x, y, z) with x, y, and z in 0..n, that satisfy x+y = n (if k=1), x+y = y+z = n (if k=2), or x+y = y+z = z+x = n (if k=3).
By inclusion-exclusion (and symmetry between x, y, and z), a(n) = (n+1)^3 - 3*N_1 + 3*N_2 - N_3. The unique solution to x+y = y+z = z+x = n is x = y = z = n/2, so N_3 = 1 if n is even, otherwise N_3 = 0. We write this as N_3 = [n even]. It is easily seen that N_1 = (n+1)^2 (x and z can be chosen freely and y = n-x) and that N_2 = n+1 (y can be chosen freely and x = z = n-y), so a(n) = (n+1)^3 - 3*(n+1)^2 + 3*(n+1) - [n even] = n^3 + [n odd] = 2*ceiling(n^3/2) = 2*A036486(n).
The recurrence and the generating function follow from this. (End)

Examples

			Some solutions for n=10:
  6   9   5   8   0   5   8   6   9   8   5   0   4   8   5   2
  3   8   3   0   0   7   9   5   0   4   7   5   2   4   7   6
  6   9   6   9   5   9   7   3   7   4   1   7  10   0   2   6
		

Crossrefs

Row 1 of A245995.
Cf. A036486.

Formula

Empirical: a(n) = 3*a(n-1) - 2*a(n-2) - 2*a(n-3) + 3*a(n-4) - a(n-5).
From R. J. Mathar, Aug 10 2014: (Start)
Empirical: a(n) = 2*A036486(n).
G.f.: 2*x*(1+x+4*x^2) / ( (1+x)*(x-1)^4 ). (End)

A245990 Number of length n+2 0..3 arrays with no pair in any consecutive three terms totalling exactly 3.

Original entry on oeis.org

28, 68, 164, 396, 956, 2308, 5572, 13452, 32476, 78404, 189284, 456972, 1103228, 2663428, 6430084, 15523596, 37477276, 90478148, 218433572, 527345292, 1273124156, 3073593604, 7420311364, 17914216332, 43248744028, 104411704388
Offset: 1

Views

Author

R. H. Hardin, Aug 09 2014

Keywords

Examples

			Some solutions for n=10:
  3  2  1  1  2  1  1  2  0  2  3  0  1  3  3  0
  3  2  1  0  2  3  0  2  2  3  2  0  3  1  2  2
  3  3  3  0  3  1  0  2  0  2  2  0  1  1  2  0
  3  2  1  1  3  1  0  2  0  3  2  1  3  3  3  2
  3  3  1  1  1  1  0  0  0  3  0  1  1  1  3  2
  2  3  0  0  3  3  2  2  1  2  2  1  1  3  2  2
  2  2  1  0  1  1  2  2  1  3  0  1  1  3  2  2
  2  3  1  1  3  3  3  2  1  3  2  0  3  3  3  0
  3  3  1  1  3  1  3  2  3  3  0  0  1  2  2  0
  2  1  0  3  3  1  2  3  3  2  2  0  1  3  2  1
  3  1  0  1  3  0  3  3  2  2  2  0  0  3  3  1
  2  0  1  3  3  0  2  1  3  0  3  1  0  1  2  3
		

Crossrefs

Column 3 of A245995.
Essentially 4 times A001333.

Formula

Empirical: a(n) = 2*a(n-1) + a(n-2).
Conjectures from Colin Barker, Nov 05 2018: (Start)
G.f.: 4*x*(7 + 3*x) / (1 - 2*x - x^2).
a(n) = sqrt(2)*((1-sqrt(2))^n*(-4+3*sqrt(2)) + (1+sqrt(2))^n*(4+3*sqrt(2))).
(End)

A245989 Number of length n 0..2 arrays with no pair in any consecutive three terms totalling exactly 2.

Original entry on oeis.org

1, 3, 6, 8, 12, 18, 26, 38, 56, 82, 120, 176, 258, 378, 554, 812, 1190, 1744, 2556, 3746, 5490, 8046, 11792, 17282, 25328, 37120, 54402, 79730, 116850, 171252, 250982, 367832, 539084, 790066, 1157898, 1696982, 2487048, 3644946, 5341928, 7828976, 11473922
Offset: 0

Views

Author

R. H. Hardin, Aug 09 2014

Keywords

Comments

Also, number of length n ternary words with no pair of equal consecutive letters and avoiding the subwords 010, 101, 020, 202. - Miquel A. Fiol, Dec 22 2023

Examples

			Some solutions for n=12:
  0  1  0  1  1  0  2  2  0  2  0  2  0  0  0  1
  0  2  1  2  0  0  1  2  1  1  0  2  0  0  1  2
  0  2  0  2  0  1  2  1  0  2  0  2  0  0  0  2
  0  2  0  1  0  0  2  2  0  2  1  1  1  1  0  1
  0  1  1  2  0  0  2  2  0  2  0  2  0  0  0  2
  0  2  0  2  1  1  2  1  1  1  0  2  0  0  0  2
  0  2  0  2  0  0  1  2  0  2  0  2  0  0  1  2
  0  2  0  2  0  0  2  2  0  2  0  2  0  0  0  2
  0  1  1  2  1  1  2  1  0  2  0  1  1  0  0  1
  0  2  0  1  0  0  2  2  0  2  0  2  0  0  0  2
  0  2  0  2  0  0  2  2  0  1  1  2  0  0  0  2
  0  2  0  2  1  0  1  1  0  2  0  1  0  0  1  2
		

Crossrefs

Column 2 of A245995.

Programs

  • Mathematica
    gf=(x^4 + x^3 + 3*x^2 + 2*x + 1) / (1 - x - x^3);Table[SeriesCoefficient[gf, {x, 0, n}], {n, 0, 40}]  (* James C. McMahon, Dec 30 2023 *)

Formula

a(n) = a(n-1) + a(n-3) for n>=5.
G.f.: (x^4 + x^3 + 3*x^2 + 2*x + 1) / (1 - x - x^3). - Colin Barker, Nov 05 2018

Extensions

Edited by Alois P. Heinz, Dec 30 2023

A245991 Number of length n+2 0..4 arrays with no pair in any consecutive three terms totalling exactly 4.

Original entry on oeis.org

64, 208, 676, 2196, 7132, 23168, 75260, 244464, 794096, 2579500, 8379052, 27217860, 88412560, 287192948, 932896352, 3030352272, 9843575108, 31975148500, 103865731612, 337389844512, 1095952482460, 3560011839440, 11564081956784
Offset: 1

Views

Author

R. H. Hardin, Aug 09 2014

Keywords

Examples

			Some solutions for n=7:
  3  3  4  0  2  2  3  2  2  3  4  3  4  0  4  0
  4  4  1  3  1  1  4  3  4  2  2  0  1  3  2  1
  4  4  1  0  1  1  3  4  4  3  4  2  2  2  1  1
  4  2  2  2  0  4  4  3  2  3  3  0  0  3  4  2
  3  4  0  0  2  2  3  3  1  0  2  1  3  4  4  4
  3  3  0  3  0  1  2  3  4  0  4  2  3  3  3  4
  2  3  0  0  1  1  0  0  2  2  1  1  0  2  4  4
  4  0  3  0  1  2  3  0  1  3  2  4  2  3  4  4
  4  0  2  1  1  4  0  3  0  4  1  1  1  0  2  4
		

Crossrefs

Column 4 of A245995.

Formula

Empirical: a(n) = 2*a(n-1) + a(n-2) + 9*a(n-3) + 3*a(n-4).
Empirical g.f.: 4*x*(16 + 20*x + 49*x^2 + 15*x^3) / (1 - 2*x - x^2 - 9*x^3 - 3*x^4). - Colin Barker, Nov 05 2018

A245992 Number of length n+2 0..5 arrays with no pair in any consecutive three terms totalling exactly 5.

Original entry on oeis.org

126, 534, 2262, 9582, 40590, 171942, 728358, 3085374, 13069854, 55364790, 234529014, 993480846, 4208452398, 17827290438, 75517614150, 319897747038, 1355108602302, 5740332156246, 24316437227286, 103006081065390
Offset: 1

Views

Author

R. H. Hardin, Aug 09 2014

Keywords

Comments

Column 5 of A245995

Examples

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

Formula

Empirical: a(n) = 4*a(n-1) +a(n-2).
Empirical: G.f.: -6*x*(21+5*x) / ( -1+4*x+x^2 ). - R. J. Mathar, Aug 10 2014

A245993 Number of length n+2 0..6 arrays with no pair in any consecutive three terms totalling exactly 6.

Original entry on oeis.org

216, 1116, 5766, 29790, 153906, 795144, 4108062, 21223992, 109652160, 566509902, 2926831878, 15121261374, 78122885724, 403616150730, 2085253182384, 10773307330236, 55659500700198, 287560720444278, 1485661331645130
Offset: 1

Views

Author

R. H. Hardin, Aug 09 2014

Keywords

Examples

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

Crossrefs

Column 6 of A245995.

Formula

Empirical: a(n) = 4*a(n-1) + a(n-2) + 25*a(n-3) + 5*a(n-4).
Empirical g.f.: 6*x*(36 + 42*x + 181*x^2 + 35*x^3) / (1 - 4*x - x^2 - 25*x^3 - 5*x^4). - Colin Barker, Nov 06 2018

A245994 Number of length n+2 0..7 arrays with no pair in any consecutive three terms totalling exactly 7.

Original entry on oeis.org

344, 2120, 13064, 80504, 496088, 3057032, 18838280, 116086712, 715358552, 4408238024, 27164786696, 167396958200, 1031546535896, 6356676173576, 39171603577352, 241386297637688, 1487489389403480, 9166322634058568
Offset: 1

Views

Author

R. H. Hardin, Aug 09 2014

Keywords

Comments

Column 7 of A245995

Examples

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

Formula

Empirical: a(n) = 6*a(n-1) +a(n-2).
Empirical: G.f.: -8*x*(43+7*x) / ( -1+6*x+x^2 ). - R. J. Mathar, Aug 10 2014

A245997 Number of length 2+2 0..n arrays with no pair in any consecutive three terms totalling exactly n.

Original entry on oeis.org

2, 12, 68, 208, 534, 1116, 2120, 3648, 5930, 9100, 13452, 19152, 26558, 35868, 47504, 61696, 78930, 99468, 123860, 152400, 185702, 224092, 268248, 318528, 375674, 440076, 512540, 593488, 683790, 783900, 894752, 1016832, 1151138, 1298188
Offset: 1

Views

Author

R. H. Hardin, Aug 09 2014

Keywords

Comments

Row 2 of A245995

Examples

			Some solutions for n=10
..5....2....2....2....8....9....2....4....6....8....8....5....3....0....1....6
..0....2....7....7....7....4....9...10....7....6...10....0....6....4....2...10
..1....1...10....2....5....3....6....4....2....6....7....7....0....4....6....9
..8....1....5....7....0....3....9....5....6....3...10....7....0...10....2....3
		

Formula

Empirical: a(n) = 3*a(n-1) -a(n-2) -5*a(n-3) +5*a(n-4) +a(n-5) -3*a(n-6) +a(n-7).
Empirical: G.f.: -2*x*(1+3*x+17*x^2+13*x^3+14*x^4) / ( (1+x)^2*(x-1)^5 ). - R. J. Mathar, Aug 10 2014

A245998 Number of length 3+2 0..n arrays with no pair in any consecutive three terms totalling exactly n.

Original entry on oeis.org

2, 18, 164, 676, 2262, 5766, 13064, 25992, 48170, 82810, 135852, 212268, 320894, 468846, 668432, 929296, 1267794, 1696482, 2236340, 2903220, 3723302, 4716118, 5913624, 7339416, 9031802, 11018826, 13345724, 16045372, 19170510, 22759230
Offset: 1

Views

Author

R. H. Hardin, Aug 09 2014

Keywords

Comments

Row 3 of A245995

Examples

			Some solutions for n=10
..6....9....2....7....1...10....9....7....9....9....3....5....1....5....5....6
..8....9....7...10....4....8....8....9...10....6....9....6....5....6....8....1
..3...10...10....9....3....4...10....0....3....2....2....1....2....7....3....5
..6....2....5....4....2....9...10....3....2...10....4....2....1....2....5....1
..3....2...10....4....9...10....6....0....9....9...10....3....7....1....8....0
		

Formula

Empirical: a(n) = 3*a(n-1) -8*a(n-3) +6*a(n-4) +6*a(n-5) -8*a(n-6) +3*a(n-8) -a(n-9).
Empirical: G.f.: 2*x*(1+6*x+55*x^2+100*x^3+183*x^4+86*x^5+49*x^6) / ( (1+x)^3*(x-1)^6 ). - R. J. Mathar, Aug 10 2014

A245999 Number of length 4+2 0..n arrays with no pair in any consecutive three terms totalling exactly n.

Original entry on oeis.org

2, 26, 396, 2196, 9582, 29790, 80504, 185192, 391290, 753570, 1371972, 2352636, 3877286, 6128486, 9405552, 13997520, 20363634, 28934442, 40377980, 55306340, 74651742, 99252846, 130367976, 169112376, 217138922, 275894450, 347501364
Offset: 1

Views

Author

R. H. Hardin, Aug 09 2014

Keywords

Comments

Row 4 of A245995.

Examples

			Some solutions for n=8
..1....2....1....3....2....0....0....1....1....0....4....0....2....5....5....3
..4....7....3....2....0....2....2....5....1....7....1....2....2....2....2....7
..5....5....4....1....7....1....5....5....5....6....6....3....7....1....5....7
..6....5....1....4....2....8....4....7....8....5....3....4....7....8....7....5
..8....0....5....0....2....1....8....7....4....4....6....1....4....5....0....2
..4....1....6....1....7....8....7....4....6....7....1....1....7....5....6....2
		

Crossrefs

Cf. A245995.

Formula

Empirical: a(n) = 3*a(n-1) +a(n-2) -11*a(n-3) +6*a(n-4) +14*a(n-5) -14*a(n-6) -6*a(n-7) +11*a(n-8) -a(n-9) -3*a(n-10) +a(n-11).
Empirical: G.f.: -2*x*(1 +10*x +158*x^2 +502*x^3 +1436*x^4 +1510*x^5 +1498*x^6 +474*x^7 +171*x^8) / ( (1+x)^4*(x-1)^7 ). - R. J. Mathar, Aug 10 2014
Showing 1-10 of 13 results. Next