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

A276562 Array read by antidiagonals: T(m,n) = number of m-ary words of length n with cyclically adjacent elements differing by 1 or less.

Original entry on oeis.org

1, 1, 2, 1, 4, 3, 1, 8, 7, 4, 1, 16, 15, 10, 5, 1, 32, 35, 22, 13, 6, 1, 64, 83, 54, 29, 16, 7, 1, 128, 199, 134, 73, 36, 19, 8, 1, 256, 479, 340, 185, 92, 43, 22, 9, 1, 512, 1155, 872, 481, 236, 111, 50, 25, 10, 1, 1024, 2787, 2254, 1265, 622, 287, 130, 57, 28, 11
Offset: 1

Views

Author

Andrew Howroyd, Apr 15 2017

Keywords

Comments

All rows are linear recurrences with constant coefficients. See PARI script to obtain generating functions.

Examples

			Array starts:
   1  1  1   1   1    1    1    1     1     1 ...
   2  4  8  16  32   64  128  256   512  1024 ...
   3  7 15  35  83  199  479 1155  2787  6727 ...
   4 10 22  54 134  340  872 2254  5854 15250 ...
   5 13 29  73 185  481 1265 3361  8993 24193 ...
   6 16 36  92 236  622 1658 4468 12132 33146 ...
   7 19 43 111 287  763 2051 5575 15271 42099 ...
   8 22 50 130 338  904 2444 6682 18410 51052 ...
   9 25 57 149 389 1045 2837 7789 21549 60005 ...
  10 28 64 168 440 1186 3230 8896 24688 68958 ...
		

Crossrefs

Programs

  • Mathematica
    T[m_, n_] := Sum[(1 + 2*Cos[j*Pi/(m+1)])^n, {j, 1, m}] // FullSimplify;
    Table[T[m-n+1, n], {m, 1, 11}, {n, m, 1, -1}] // Flatten (* Jean-François Alcover, Jun 06 2017 *)
  • PARI
    \\ from Knopfmacher et al.
    ChebyshevU(n,x) = sum(i=0, n/2, 2*poltchebi(n-2*i,x)) + (n%2-1);
    RowGf(k,x) = 1 + (k*x*(1+3*x) - 2*(k+1)*x*subst(ChebyshevU(k-1,z)/ChebyshevU(k,z),z,(1-x)/(2*x)))/((1+x)*(1-3*x));
    a(m,n)=Vec(RowGf(m,x)+O(x^(n+1)))[n+1];
    for(m=1, 10, print(RowGf(m,x)));
    for(m=1, 10, for(n=1, 9, print1( a(m,n), ", ") ); print(); );

Formula

T(m, n) = Sum_{j=1..m} (1 + 2*cos(j*pi/(m+1)))^n. - Andrew Howroyd, Apr 15 2017

A285281 Array read by antidiagonals: T(m,n) = number of m-ary words of length n with cyclically adjacent elements differing by 3 or less.

Original entry on oeis.org

1, 4, 1, 16, 5, 1, 64, 23, 6, 1, 256, 101, 30, 7, 1, 1024, 467, 138, 37, 8, 1, 4096, 2165, 694, 175, 44, 9, 1, 16384, 10055, 3526, 925, 212, 51, 10, 1, 65536, 46709, 18012, 4977, 1156, 249, 58, 11, 1, 262144, 216995, 92140, 27067, 6428, 1387, 286, 65, 12, 1
Offset: 4

Views

Author

Andrew Howroyd, Apr 15 2017

Keywords

Comments

All rows are linear recurrences with constant coefficients. See PARI script to obtain generating functions.

Examples

			Table starts (m>=4, n>=0):
1  4 16  64  256  1024  4096  16384   65536 ...
1  5 23 101  467  2165 10055  46709  216995 ...
1  6 30 138  694  3526 18012  92140  471566 ...
1  7 37 175  925  4977 27067 147777  808165 ...
1  8 44 212 1156  6428 36338 206942 1183164 ...
1  9 51 249 1387  7879 45663 267367 1575395 ...
1 10 58 286 1618  9330 54994 328058 1973026 ...
1 11 65 323 1849 10781 64325 388749 2371457 ...
1 12 72 360 2080 12232 73656 449440 2770016 ...
		

Crossrefs

Rows 5-32 are A124999, A125316-A125342.

Programs

  • Mathematica
    diff = 3; m0 = diff + 1; mmax = 13;
    TransferGf[m_, u_, t_, v_, z_] := Array[u, m].LinearSolve[IdentityMatrix[m] - z*Array[t, {m, m}], Array[v, m]]
    RowGf[d_, m_, z_] := 1 + z*Sum[TransferGf[m, Boole[# == k] &, Boole[Abs[#1 - #2] <= d] &, Boole[Abs[# - k] <= d] &, z], {k, 1, m}];
    row[m_] := row[m] = CoefficientList[RowGf[diff, m, x] + O[x]^mmax, x];
    T[m_ /; m >= m0, n_ /; n >= 0] := row[m][[n + 1]];
    Table[T[m - n , n], {m, m0, mmax}, {n, m - m0, 0, -1}] // Flatten (* Jean-François Alcover, Jun 16 2017, adapted from PARI *)
  • PARI
    TransferGf(m,u,t,v,z)=vector(m,i,u(i))*matsolve(matid(m)-z*matrix(m,m,i,j,t(i,j)),vectorv(m,i,v(i)));
    RowGf(d,m,z)=1+z*sum(k=1,m,TransferGf(m, i->if(i==k,1,0), (i,j)->abs(i-j)<=d, j->if(abs(j-k)<=d,1,0), z));
    for(m=4, 12, print(RowGf(3,m,x)));
    for(m=4, 12, v=Vec(RowGf(3,m,x) + O(x^9)); for(n=1, length(v), print1( v[n], ", ") ); print(); );

A285266 Array read by antidiagonals: T(m,n) = number of m-ary words of length n with adjacent elements differing by 2 or less.

Original entry on oeis.org

1, 3, 1, 9, 4, 1, 27, 14, 5, 1, 81, 50, 19, 6, 1, 243, 178, 75, 24, 7, 1, 729, 634, 295, 100, 29, 8, 1, 2187, 2258, 1161, 418, 125, 34, 9, 1, 6561, 8042, 4569, 1748, 543, 150, 39, 10, 1, 19683, 28642, 17981, 7310, 2363, 668, 175, 44, 11, 1
Offset: 3

Views

Author

Andrew Howroyd, Apr 15 2017

Keywords

Comments

All rows are linear recurrences with constant coefficients. See PARI script to obtain generating functions.

Examples

			Array starts (m>=3, n>=0):
1  3  9  27  81  243   729  2187   6561 ...
1  4 14  50 178  634  2258  8042  28642 ...
1  5 19  75 295 1161  4569 17981  70763 ...
1  6 24 100 418 1748  7310 30570 127842 ...
1  7 29 125 543 2363 10287 44787 194995 ...
1  8 34 150 668 2986 13362 59816 267802 ...
1  9 39 175 793 3611 16475 75229 343633 ...
1 10 44 200 918 4236 19598 90790 420870 ...
		

Crossrefs

Rows 4-32 are A055099, A126392-A126419.

Programs

  • Mathematica
    diff = 2; m0 = 3; mmax = 12;
    TransferGf[m_, u_, t_, v_, z_] := Array[u, m].LinearSolve[IdentityMatrix[m] - z*Array[t, {m, m}], Array[v, m]]
    RowGf[d_, m_, z_] := 1+z*TransferGf[m, 1&, Boole[Abs[#1-#2] <= d]&, 1&, z];
    row[m_] := row[m] = CoefficientList[RowGf[diff, m, x] + O[x]^mmax, x];
    T[m_ /; m >= m0, n_ /; n >= 0] := row[m][[n + 1]];
    Table[T[m - n , n], {m, m0, mmax}, {n, m - m0, 0, -1}] // Flatten (* Jean-François Alcover, Jun 17 2017, adapted from PARI *)
  • PARI
    TransferGf(m,u,t,v,z)=vector(m,i,u(i))*matsolve(matid(m)-z*matrix(m,m,i,j,t(i,j)),vectorv(m,i,v(i)));
    RowGf(d,m,z)=1+z*TransferGf(m, i->1, (i,j)->abs(i-j)<=d, j->1, z);
    for(m=3, 10, print(RowGf(2,m,x)));
    for(m=3, 10, v=Vec(RowGf(2,m,x) + O(x^9)); for(n=1, length(v), print1( v[n], ", ") ); print(); );

A124828 Number of base 7 circular n-digit numbers with adjacent digits differing by 2 or less.

Original entry on oeis.org

1, 7, 29, 103, 417, 1717, 7229, 30793, 132225, 570649, 2470769, 10719793, 46569777, 202477633, 880792193, 3832748833, 16681516545, 72613292353, 316105114817, 1376159456641, 5991281182977, 26084303730049
Offset: 0

Views

Author

R. H. Hardin, Dec 28 2006

Keywords

Comments

[Empirical] a(base,n)=a(base-1,n)+A005191(n+1) for base>=2.int(n/2)+1.
See A285280 for confirmation of linear recurrence and code to produce sequence; also confirms conjectured g.f. from Colin Barker. - Ray Chandler, Aug 12 2023.

Crossrefs

Cf. Row 7 of A285280.

Formula

G.f.: (1 - 10*x^2 - 20*x^3 + 42*x^4 + 16*x^5 - 20*x^6) / ((1 - x)*(1 - 2*x - 2*x^2)*(1 - 4*x - 2*x^2 + 2*x^3)). - Colin Barker, Jun 03 2017

A124843 Number of base 8 circular n-digit numbers with adjacent digits differing by 2 or less.

Original entry on oeis.org

1, 8, 34, 122, 502, 2098, 8980, 38928, 170382, 750722, 3323554, 14763438, 65736004, 293186252, 1309156946, 5850527002, 26160514526, 117022825786, 523619082772, 2343388805944, 10488943094022, 46952619517170
Offset: 0

Views

Author

R. H. Hardin, Dec 28 2006

Keywords

Comments

[Empirical] a(base,n)=a(base-1,n)+A005191(n+1) for base>=2.int(n/2)+1.
See A285280 for confirmation of linear recurrence and code to produce sequence; also confirms conjectured g.f. from Colin Barker. - Ray Chandler, Aug 12 2023.

Crossrefs

Cf. Row 8 of A285280.

Formula

G.f.: (1 - 15*x^2 - 20*x^3 + 87*x^4 + 16*x^5 - 60*x^6) / ((1 - 3*x - x^2 + 2*x^3)*(1 - 5*x + x^2 + 6*x^3)). - Colin Barker, Jun 03 2017

A124851 Number of base 9 circular n-digit numbers with adjacent digits differing by 2 or less.

Original entry on oeis.org

1, 9, 39, 141, 587, 2479, 10731, 47063, 208547, 931047, 4180239, 18849103, 85269011, 386687375, 1756855951, 7993210831, 36405316227, 165940691695, 756832203759, 3453347063599, 15762537566627, 71964915505967
Offset: 0

Views

Author

R. H. Hardin, Dec 28 2006

Keywords

Comments

[Empirical] a(base,n)=a(base-1,n)+A005191(n+1) for base>=2.int(n/2)+1.
See A285280 for confirmation of linear recurrence and code to produce sequence; also confirms conjectured g.f. from Colin Barker. - Ray Chandler, Aug 12 2023.

Crossrefs

Cf. Row 9 of A285280.

Formula

G.f.: (1 - 21*x^2 - 14*x^3 + 150*x^4 - 16*x^5 - 150*x^6 + 24*x^7 + 28*x^8) / ((1 + x)*(1 - 4*x + 2*x^2)*(1 - 6*x + 5*x^2 + 8*x^3 - 4*x^4 - 2*x^5)). - Colin Barker, Jun 02 2017

A124852 Number of base 10 circular n-digit numbers with adjacent digits differing by 2 or less.

Original entry on oeis.org

1, 10, 44, 160, 672, 2860, 12482, 55198, 246712, 1111372, 5037174, 22940158, 104870790, 480863770, 2210197754, 10178143810, 46942294232, 216761695840, 1001878336772, 4634206919128, 21448419453382, 99316222901062
Offset: 0

Views

Author

R. H. Hardin, Dec 28 2006

Keywords

Comments

[Empirical] a(base,n)=a(base-1,n)+A005191(n+1) for base>=2.int(n/2)+1.
See A285280 for confirmation of linear recurrence and code to produce sequence; also confirms conjectured g.f. from Colin Barker. - Ray Chandler, Aug 12 2023.

Crossrefs

Cf. Row 10 of A285280.

Formula

G.f.: (1 - x - 27*x^2 + 27*x^3 + 201*x^4 - 313*x^5 + 8*x^6 + 112*x^7 - 7*x^8 - 9*x^9) / ((1 - x)*(1 + x)*(1 - 4*x + x^2 + x^3)*(1 - 7*x + 11*x^2 - x^4)). - Colin Barker, Jun 01 2017

A124857 Number of base 11 circular n-digit numbers with adjacent digits differing by 2 or less.

Original entry on oeis.org

1, 11, 49, 179, 757, 3241, 14233, 63333, 284877, 1291697, 5894119, 27031653, 124481521, 575160311, 2664800299, 12374329729, 57568895517, 268238883291, 1251429223153, 5844466935453, 27318547433927, 127784523940077
Offset: 0

Views

Author

R. H. Hardin, Dec 28 2006

Keywords

Comments

[Empirical] a(base,n)=a(base-1,n)+A005191(n+1) for base>=2.int(n/2)+1.
See A285280 for confirmation of linear recurrence and code to produce sequence. - Ray Chandler, Aug 12 2023.

Crossrefs

Cf. Row 11 of A285280.

A124858 Number of base 12 circular n-digit numbers with adjacent digits differing by 2 or less.

Original entry on oeis.org

1, 12, 54, 198, 842, 3622, 15984, 71468, 323042, 1472022, 6751064, 31123148, 144092684, 669468708, 3119587196, 14572658668, 68216250402, 319893194558, 1502357897232, 7064711394284, 33257109397452, 156701323391972
Offset: 0

Views

Author

R. H. Hardin, Dec 28 2006

Keywords

Comments

[Empirical] a(base,n)=a(base-1,n)+A005191(n+1) for base>=2.int(n/2)+1.
See A285280 for confirmation of linear recurrence and code to produce sequence. - Ray Chandler, Aug 12 2023.

Crossrefs

Cf. Row 12 of A285280.

A124864 Number of base 13 circular n-digit numbers with adjacent digits differing by 2 or less.

Original entry on oeis.org

1, 13, 59, 217, 927, 4003, 17735, 79603, 361207, 1652347, 7608009, 35214643, 163703859, 763777807, 3574392251, 16771283857, 78867271271, 371585266531, 1753627967177, 8287756490659, 39216985201477, 185770958749075
Offset: 0

Views

Author

R. H. Hardin, Dec 28 2006

Keywords

Comments

[Empirical] a(base,n)=a(base-1,n)+A005191(n+1) for base>=2.int(n/2)+1.
See A285280 for confirmation of linear recurrence and code to produce sequence. - Ray Chandler, Aug 12 2023.

Crossrefs

Cf. Row 13 of A285280.
Showing 1-10 of 29 results. Next