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 12 results. Next

A248434 Number of length three 0..n arrays with the sum of two elements equal to twice the third.

Original entry on oeis.org

2, 9, 16, 29, 42, 61, 80, 105, 130, 161, 192, 229, 266, 309, 352, 401, 450, 505, 560, 621, 682, 749, 816, 889, 962, 1041, 1120, 1205, 1290, 1381, 1472, 1569, 1666, 1769, 1872, 1981, 2090, 2205, 2320, 2441, 2562, 2689, 2816, 2949, 3082, 3221, 3360, 3505, 3650
Offset: 1

Views

Author

R. H. Hardin, Oct 06 2014

Keywords

Comments

Number of length three 0..n vectors that contain their arithmetic mean. - Hywel Normington, Aug 15 2020

Examples

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

Crossrefs

Row 1 of A248433.
Cf. A168328, A319127, A319127. First differences A168301.

Programs

  • PARI
    a(n) = {my(res = 2); if(n % 2 == 0, res+=(1 + 6*floor(n/2))); n = (n-1)>>1; res+=6*n^2 + 8*n; res} \\ David A. Corneth, Aug 26 2020
    
  • PARI
    first(n) = {my(res = vector(n), inc = 7); res[1] = 2; for(i = 2, n, res[i] = res[i-1] + inc; inc += 6 * (i%2 == 1)); res} \\ David A. Corneth, Aug 26 2020

Formula

Empirical: a(n) = 2*a(n-1) -2*a(n-3) +a(n-4).
Empirical for n mod 2 = 0: a(n) = (3/2)*n^2 + n + 1.
Empirical for n mod 2 = 1: a(n) = (3/2)*n^2 + n - (1/2).
From Hywel Normington, Aug 21 2020: (Start)
a(n) = a(n-1) + 1 + 6*floor(n/2)
a(n) = A319127(n+1) + n + 1 = 6*floor((n+1)/2)*floor(n/2) + n + 1.
(End)
From Colin Barker, Aug 28 2020: (Start)
G.f.: x*(2 + 5*x - 2*x^2 + x^3) / ((1 - x)^3*(1 + x)).
a(n) = (1 + 3*(-1)^n + 4*n + 6*n^2) / 4 for n>0.
(End)

Extensions

Name simplified by Andrew Howroyd, Aug 14 2020

A248435 Number of length 2+2 0..n arrays with every three consecutive terms having the sum of some two elements equal to twice the third.

Original entry on oeis.org

2, 9, 20, 45, 70, 105, 140, 189, 242, 301, 360, 437, 514, 597, 684, 785, 886, 997, 1108, 1233, 1362, 1497, 1632, 1785, 1938, 2097, 2260, 2437, 2614, 2801, 2988, 3189, 3394, 3605, 3816, 4045, 4274, 4509, 4748, 5001, 5254, 5517, 5780, 6057, 6338, 6625, 6912
Offset: 1

Views

Author

R. H. Hardin, Oct 06 2014

Keywords

Examples

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

Crossrefs

Row 2 of A248433.

Formula

Empirical: a(n) = a(n-1) + a(n-3) - a(n-5) - a(n-7) + a(n-8).
Empirical for n mod 12 = 0: a(n) = (19/6)*n^2 - (5/3)*n + 1
Empirical for n mod 12 = 1: a(n) = (19/6)*n^2 - (5/3)*n + (1/2)
Empirical for n mod 12 = 2: a(n) = (19/6)*n^2 - (5/3)*n - (1/3)
Empirical for n mod 12 = 3: a(n) = (19/6)*n^2 - (5/3)*n - (7/2)
Empirical for n mod 12 = 4: a(n) = (19/6)*n^2 - (5/3)*n + 1
Empirical for n mod 12 = 5: a(n) = (19/6)*n^2 - (5/3)*n - (5/6)
Empirical for n mod 12 = 6: a(n) = (19/6)*n^2 - (5/3)*n + 1
Empirical for n mod 12 = 7: a(n) = (19/6)*n^2 - (5/3)*n - (7/2)
Empirical for n mod 12 = 8: a(n) = (19/6)*n^2 - (5/3)*n - (1/3)
Empirical for n mod 12 = 9: a(n) = (19/6)*n^2 - (5/3)*n + (1/2)
Empirical for n mod 12 = 10: a(n) = (19/6)*n^2 - (5/3)*n + 1
Empirical for n mod 12 = 11: a(n) = (19/6)*n^2 - (5/3)*n - (29/6).
Empirical g.f.: x*(2 + 7*x + 11*x^2 + 23*x^3 + 16*x^4 + 17*x^5 - x^6 + x^7) / ((1 - x)^3*(1 + x)*(1 + x^2)*(1 + x + x^2)). - Colin Barker, Nov 08 2018

A248428 Number of length n+2 0..3 arrays with every three consecutive terms having the sum of some two elements equal to twice the third.

Original entry on oeis.org

16, 20, 24, 28, 36, 44, 52, 68, 84, 100, 132, 164, 196, 260, 324, 388, 516, 644, 772, 1028, 1284, 1540, 2052, 2564, 3076, 4100, 5124, 6148, 8196, 10244, 12292, 16388, 20484, 24580, 32772, 40964, 49156, 65540, 81924, 98308, 131076, 163844, 196612, 262148
Offset: 1

Views

Author

R. H. Hardin, Oct 06 2014

Keywords

Examples

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

Crossrefs

Column 3 of A248433.

Formula

Empirical: a(n) = a(n-1) + 2*a(n-3) - 2*a(n-4).
Empirical g.f.: 4*x*(4 + x + x^2 - 7*x^3) / ((1 - x)*(1 - 2*x^3)). - Colin Barker, Nov 08 2018

A248429 Number of length n+2 0..4 arrays with every three consecutive terms having the sum of some two elements equal to twice the third.

Original entry on oeis.org

29, 45, 69, 101, 165, 261, 389, 645, 1029, 1541, 2565, 4101, 6149, 10245, 16389, 24581, 40965, 65541, 98309, 163845, 262149, 393221, 655365, 1048581, 1572869, 2621445, 4194309, 6291461, 10485765, 16777221, 25165829, 41943045, 67108869, 100663301
Offset: 1

Views

Author

R. H. Hardin, Oct 06 2014

Keywords

Examples

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

Crossrefs

Column 4 of A248433.

Formula

Empirical: a(n) = a(n-1) + 4*a(n-3) - 4*a(n-4).
Empirical g.f.: x*(29 + 16*x + 24*x^2 - 84*x^3) / ((1 - x)*(1 - 4*x^3)). - Colin Barker, Nov 08 2018

A248430 Number of length n+2 0..5 arrays with every three consecutive terms having the sum of some two elements equal to twice the third.

Original entry on oeis.org

42, 70, 118, 198, 342, 590, 1014, 1766, 3062, 5286, 9222, 16006, 27654, 48262, 83782, 144774, 252678, 438662, 758022, 1323014, 2296838, 3969030, 6927366, 12026374, 20782086, 36272134, 62970886, 108816390, 189923334, 329719814, 569769990
Offset: 1

Views

Author

R. H. Hardin, Oct 06 2014

Keywords

Examples

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

Crossrefs

Column 5 of A248433.

Formula

Empirical: a(n) = a(n-1) + 6*a(n-3) - 6*a(n-4) - 4*a(n-6) + 4*a(n-7).
Empirical g.f.: 2*x*(21 + 14*x + 24*x^2 - 86*x^3 - 12*x^4 - 20*x^5 + 56*x^6) / ((1 - x)*(1 - 6*x^3 + 4*x^6)). - Colin Barker, Nov 08 2018

A248431 Number of length n+2 0..6 arrays with every three consecutive terms having the sum of some two elements equal to twice the third.

Original entry on oeis.org

61, 105, 185, 327, 601, 1105, 2021, 3761, 6969, 12815, 23897, 44337, 81597, 152209, 282457, 519895, 969849, 1799825, 3312853, 6180081, 11468921, 21110367, 39381145, 73083121, 134521133, 250947665, 465706137, 857206439, 1599109049, 2967610449
Offset: 1

Views

Author

R. H. Hardin, Oct 06 2014

Keywords

Examples

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

Crossrefs

Column 6 of A248433

Formula

Empirical: a(n) = 8*a(n-3) - 11*a(n-6) + 4*a(n-9).
Empirical g.f.: x*(61 + 105*x + 185*x^2 - 161*x^3 - 239*x^4 - 375*x^5 + 76*x^6 + 108*x^7 + 164*x^8) / ((1 - x)*(1 + x + x^2)*(1 - 7*x^3 + 4*x^6)). - Colin Barker, Nov 08 2018

A248432 Number of length n+2 0..7 arrays with every three consecutive terms having the sum of some two elements equal to twice the third.

Original entry on oeis.org

80, 140, 252, 462, 884, 1684, 3200, 6216, 11944, 22810, 44396, 85402, 163204, 317716, 611248, 1168198, 2274196, 4375320, 8362052, 16278784, 31318664, 59855842, 116523764, 224179214, 428448488, 834077068, 1604674164, 3066832822
Offset: 1

Views

Author

R. H. Hardin, Oct 06 2014

Keywords

Examples

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

Crossrefs

Column 7 of A248433.

Formula

Empirical: a(n) = a(n-1) + 10*a(n-3) - 10*a(n-4) - 22*a(n-6) + 22*a(n-7) + 12*a(n-9) - 12*a(n-10) - a(n-12) + a(n-13).
Empirical g.f.: 2*x*(40 + 30*x + 56*x^2 - 295*x^3 - 89*x^4 - 160*x^5 + 588*x^6 + 58*x^7 + 96*x^8 - 317*x^9 - 5*x^10 - 9*x^11 + 27*x^12) / ((1 - x)*(1 - 10*x^3 + 22*x^6 - 12*x^9 + x^12)). - Colin Barker, Nov 08 2018

A248436 Number of length 3+2 0..n arrays with every three consecutive terms having the sum of some two elements equal to twice the third.

Original entry on oeis.org

2, 9, 24, 69, 118, 185, 252, 357, 470, 593, 716, 881, 1046, 1217, 1400, 1621, 1842, 2081, 2320, 2593, 2874, 3161, 3448, 3785, 4126, 4473, 4828, 5213, 5598, 6005, 6412, 6857, 7310, 7769, 8232, 8737, 9242, 9753, 10272, 10833, 11394, 11973, 12552, 13161, 13782
Offset: 1

Views

Author

R. H. Hardin, Oct 06 2014

Keywords

Examples

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

Crossrefs

Row 3 of A248433.

Formula

Empirical: a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + 2*a(n-5) - a(n-6) + a(n-7) - a(n-11) + a(n-12) - 2*a(n-13) + a(n-14) - a(n-15) + a(n-16) - a(n-17) + a(n-18).
Also a quadratic polynomial plus a constant quasipolynomial with period 840, the first 12 being:
Empirical for n mod 840 = 0: a(n) = (106/15)*n^2 - (178/15)*n + 1
Empirical for n mod 840 = 1: a(n) = (106/15)*n^2 - (178/15)*n + (34/5)
Empirical for n mod 840 = 2: a(n) = (106/15)*n^2 - (178/15)*n + (67/15)
Empirical for n mod 840 = 3: a(n) = (106/15)*n^2 - (178/15)*n - 4
Empirical for n mod 840 = 4: a(n) = (106/15)*n^2 - (178/15)*n + (17/5)
Empirical for n mod 840 = 5: a(n) = (106/15)*n^2 - (178/15)*n + (2/3)
Empirical for n mod 840 = 6: a(n) = (106/15)*n^2 - (178/15)*n + (9/5)
Empirical for n mod 840 = 7: a(n) = (106/15)*n^2 - (178/15)*n - (56/5)
Empirical for n mod 840 = 8: a(n) = (106/15)*n^2 - (178/15)*n - (1/3)
Empirical for n mod 840 = 9: a(n) = (106/15)*n^2 - (178/15)*n + (22/5)
Empirical for n mod 840 = 10: a(n) = (106/15)*n^2 - (178/15)*n + 5
Empirical for n mod 840 = 11: a(n) = (106/15)*n^2 - (178/15)*n - (128/15).
Empirical g.f.: x*(2 + 7*x + 17*x^2 + 52*x^3 + 66*x^4 + 117*x^5 + 124*x^6 + 200*x^7 + 175*x^8 + 222*x^9 + 167*x^10 + 210*x^11 + 118*x^12 + 113*x^13 + 52*x^14 + 54*x^15 - x^16 + x^17) / ((1 - x)^3*(1 + x)*(1 - x + x^2)*(1 + x^2)*(1 + x + x^2)*(1 + x^4)*(1 + x + x^2 + x^3 + x^4)). - Colin Barker, Nov 08 2018

A248437 Number of length 4+2 0..n arrays with every three consecutive terms having the sum of some two elements equal to twice the third.

Original entry on oeis.org

2, 9, 28, 101, 198, 327, 462, 691, 932, 1203, 1474, 1829, 2184, 2551, 2954, 3459, 3964, 4501, 5038, 5653, 6286, 6925, 7564, 8327, 9114, 9907, 10712, 11577, 12442, 13363, 14284, 15307, 16342, 17383, 18454, 19609, 20764, 21925, 23098, 24389, 25680, 27009
Offset: 1

Views

Author

R. H. Hardin, Oct 06 2014

Keywords

Comments

Row 4 of A248433

Examples

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

Formula

Empirical: a(n) = -a(n-4) +a(n-5) +a(n-7) -a(n-8) +a(n-9) +a(n-11) -a(n-12) +a(n-13) +a(n-15) -a(n-21) -a(n-23) +a(n-24) -a(n-25) -a(n-27) +a(n-28) -a(n-29) -a(n-31) +a(n-32) +a(n-36)

A248438 Number of length 5+2 0..n arrays with every three consecutive terms having the sum of some two elements equal to twice the third.

Original entry on oeis.org

2, 9, 36, 165, 342, 601, 884, 1381, 1922, 2533, 3144, 3957, 4770, 5613, 6524, 7697, 8870, 10149, 11428, 12873, 14362, 15857, 17352, 19165, 21026, 22893, 24804, 26841, 28878, 31061, 33244, 35697, 38170, 40649, 43200, 45977, 48754, 51537, 54340, 57421
Offset: 1

Views

Author

R. H. Hardin, Oct 06 2014

Keywords

Comments

Row 5 of A248433

Examples

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

Formula

Empirical: a(n) = a(n-1) -a(n-2) -a(n-6) +2*a(n-7) -3*a(n-8) +3*a(n-9) -a(n-10) +2*a(n-13) -3*a(n-14) +4*a(n-15) -4*a(n-16) +3*a(n-17) -a(n-18) -a(n-20) +3*a(n-21) -4*a(n-22) +4*a(n-23) -3*a(n-24) +2*a(n-25) -a(n-28) +3*a(n-29) -3*a(n-30) +2*a(n-31) -a(n-33) +a(n-34) -a(n-36) +a(n-37) -2*a(n-39) +3*a(n-40) -3*a(n-41) +a(n-42) -2*a(n-45) +3*a(n-46) -4*a(n-47) +4*a(n-48) -3*a(n-49) +a(n-50) +a(n-52) -3*a(n-53) +4*a(n-54) -4*a(n-55) +3*a(n-56) -2*a(n-57) +a(n-60) -3*a(n-61) +3*a(n-62) -2*a(n-63) +a(n-64) +a(n-68) -a(n-69) +a(n-70)
Showing 1-10 of 12 results. Next