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-7 of 7 results.

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

A208772 Number of n-bead necklaces labeled with numbers 1..3 not allowing reversal, with no adjacent beads differing by more than 1.

Original entry on oeis.org

3, 5, 7, 12, 19, 39, 71, 152, 315, 685, 1479, 3294, 7283, 16359, 36791, 83312, 189123, 431393, 986247, 2262308, 5200851, 11985863, 27676615, 64034954, 148406243, 344507805, 800902879, 1864502926, 4346071603, 10142619039, 23696518919, 55420734752, 129742923475, 304014655205, 712985901943, 1673486556648
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Comments

Allowing arbitrary differences between the first and last bead gives A215327. [Joerg Arndt, Aug 08 2012]

Examples

			All solutions for n=4:
..1....2....2....2....1....1....1....3....2....1....2....1
..2....2....3....2....1....2....1....3....3....2....2....1
..1....3....2....2....2....3....1....3....3....2....2....1
..2....3....3....3....2....2....1....3....3....2....2....2
		

Crossrefs

Column 3 of A208777.
Cf. A215335 (cyclically smooth Lyndon words with 3 colors).

Programs

  • Mathematica
    sn[n_, k_] := 1/n*Sum[ Sum[ EulerPhi[j]*(1 + 2*Cos[i*Pi/(k + 1)])^(n/j), {j, Divisors[n]}], {i, 1, k}]; Table[sn[n, 3], {n, 1, 36}] // FullSimplify (* Jean-François Alcover, Oct 31 2017, after Joerg Arndt *)
  • PARI
    /* from the Knopfmacher et al. reference */
    default(realprecision,99); /* using floats */
    sn(n,k)=1/n*sum(i=1,k,sumdiv(n,j,eulerphi(j)*(1+2*cos(i*Pi/(k+1)))^(n/j)));
    vector(66,n, round(sn(n,3)) )
    /* Joerg Arndt, Aug 09 2012 */

Formula

a(n) = Sum_{ d | n } A215335(d). - Joerg Arndt, Aug 13 2012
a(n) = (1/n) * Sum_{d | n} totient(n/d) * A124696(n). - Andrew Howroyd, Mar 18 2017

A208773 Number of n-bead necklaces labeled with numbers 1..4 not allowing reversal, with no adjacent beads differing by more than 1.

Original entry on oeis.org

4, 7, 10, 18, 30, 65, 128, 293, 658, 1544, 3622, 8711, 20924, 50889, 124150, 304718, 750334, 1855429, 4600696, 11442853, 28528618, 71294416, 178529670, 447923761, 1125756860, 2833917147, 7144466842, 18036449390, 45591671454, 115381885423, 292329164912, 741411257693, 1882219950046, 4782783122992, 12163730636250
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Examples

			All solutions for n=3:
..2....4....1....2....1....2....3....3....1....3
..2....4....1....2....1....3....3....4....2....3
..3....4....2....2....1....3....3....4....2....4
		

Crossrefs

Column 4 of A208777.
Cf. A215336 (cyclically smooth Lyndon words with 4 colors).

Programs

  • Mathematica
    sn[n_, k_] := 1/n*Sum[ Sum[ EulerPhi[j]*(1 + 2*Cos[i*Pi/(k + 1)])^(n/j), {j, Divisors[n]}], {i, 1, k}]; Table[sn[n, 4], {n, 1, 35}] // FullSimplify (* Jean-François Alcover, Oct 31 2017, after Joerg Arndt *)
  • PARI
    /* from the Knopfmacher et al. reference */
    default(realprecision,99); /* using floats */
    sn(n,k)=1/n*sum(i=1,k,sumdiv(n,j,eulerphi(j)*(1+2*cos(i*Pi/(k+1)))^(n/j)));
    vector(66,n, round(sn(n,4)) )
    /* Joerg Arndt, Aug 09 2012 */

Formula

a(n) = Sum_{ d | n } A215336(d). - Joerg Arndt, Aug 13 2012
a(n) = (1/n) * Sum_{d | n} totient(n/d) * A124697(n). - Andrew Howroyd, Mar 18 2017

A208774 Number of n-bead necklaces labeled with numbers 1..5 not allowing reversal, with no adjacent beads differing by more than 1.

Original entry on oeis.org

5, 9, 13, 24, 41, 91, 185, 435, 1009, 2445, 5945, 14813, 36977, 93465, 237313, 606465, 1556033, 4010205, 10367897, 26891385, 69930457, 182302161, 476262761, 1246710303, 3269321393, 8587489185, 22590646417, 59511087087, 156973954865, 414552479249, 1096017973385, 2900753690865, 7684758676201, 20377462520193
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Examples

			All solutions for n=3:
..5....1....3....2....2....4....4....4....1....3....2....3....1
..5....1....4....2....2....4....5....4....1....3....3....3....2
..5....1....4....3....2....5....5....4....2....3....3....4....2
		

Crossrefs

Column 5 of A208777.
Cf. A215337 (cyclically smooth Lyndon words with 5 colors).

Programs

  • Mathematica
    sn[n_, k_] := 1/n*Sum[DivisorSum[n, EulerPhi[#]*(1 + 2*Cos[i*Pi/(k + 1)])^(n/#)&], {i, 1, k}]; Table[sn[n, 5], {n, 1, 34}] // Simplify (* Jean-François Alcover, Oct 31 2017, after Joerg Arndt *)
  • PARI
    /* from the Knopfmacher et al. reference */
    default(realprecision,99); /* using floats */
    sn(n,k)=1/n*sum(i=1,k,sumdiv(n,j,eulerphi(j)*(1+2*cos(i*Pi/(k+1)))^(n/j)));
    vector(66,n, round(sn(n,5)) )
    /* Joerg Arndt, Aug 09 2012 */

Formula

a(n) = Sum_{ d | n } A215337(d). - Joerg Arndt, Aug 13 2012
a(n) = (1/n) * Sum_{d | n} totient(n/d) * A124698(n). - Andrew Howroyd, Mar 18 2017

A208776 Number of n-bead necklaces labeled with numbers 1..7 not allowing reversal, with no adjacent beads differing by more than 1.

Original entry on oeis.org

7, 13, 19, 36, 63, 143, 299, 719, 1711, 4249, 10611, 27144, 69727, 181467, 475147, 1253475, 3324103, 8862889, 23729747, 63791064, 172066959, 465577215, 1263208683, 3435919395, 9366558151, 25585896137, 70019831931, 191943278804, 526978629663, 1448862872667, 3988658225035, 10993823704779, 30335737469495, 83793424341677
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Examples

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

Crossrefs

Column 7 of A208777.
Cf. A215338 (cyclically smooth Lyndon words with 7 colors).

Programs

  • Mathematica
    sn[n_, k_] := 1/n*Sum[ DivisorSum[n, EulerPhi[#]*(1 + 2*Cos[i*Pi/(k + 1)])^(n/#) &], {i, 1, k}]; Table[sn[n, 7], {n, 1, 34}] // FullSimplify (* Jean-François Alcover, Oct 31 2017, after Joerg Arndt *)
  • PARI
    /* from the Knopfmacher et al. reference */
    default(realprecision,99); /* using floats */
    sn(n,k)=1/n*sum(i=1,k,sumdiv(n,j,eulerphi(j)*(1+2*cos(i*Pi/(k+1)))^(n/j)));
    vector(66,n, round(sn(n,7)) )
    /* Joerg Arndt, Aug 09 2012 */

Formula

a(n) = Sum_{ d | n } A215338(d). - Joerg Arndt, Aug 13 2012
a(n) = (1/n) * Sum_{d | n} totient(n/d) * A124700(n). - Andrew Howroyd, Mar 18 2017

A208775 Number of n-bead necklaces labeled with numbers 1..6 not allowing reversal, with no adjacent beads differing by more than 1.

Original entry on oeis.org

6, 11, 16, 30, 52, 117, 242, 577, 1360, 3347, 8278, 20978, 53346, 137422, 355978, 928731, 2434580, 6414014, 16961468, 45017417, 119840582, 319916277, 856089572, 2295950281, 6169664562, 16608996492, 44785220118, 120942143132, 327053057574, 885545659155, 2400570958904, 6514679288762, 17697582670400, 48122529680805
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Examples

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

Crossrefs

Column 6 of A208777.

Programs

  • Mathematica
    sn[n_, k_] := 1/n*Sum[ Sum[ EulerPhi[j]*(1 + 2*Cos[i*Pi/(k + 1)])^(n/j), {j, Divisors[n]}], {i, 1, k}]; Table[sn[n, 6], {n, 1, 34}] // FullSimplify (* Jean-François Alcover, Oct 31 2017, after Joerg Arndt *)
  • PARI
    /* from the Knopfmacher et al. reference */
    default(realprecision,99); /* using floats */
    sn(n,k)=1/n*sum(i=1,k,sumdiv(n,j,eulerphi(j)*(1+2*cos(i*Pi/(k+1)))^(n/j)));
    vector(66,n, round(sn(n,6)) )
    /* Joerg Arndt, Aug 09 2012 */

Formula

a(n) = (1/n) * Sum_{d | n} totient(n/d) * A124699(n). - Andrew Howroyd, Mar 18 2017

A208771 Number of n-bead necklaces labeled with numbers 1..n not allowing reversal, with no adjacent beads differing by more than 1.

Original entry on oeis.org

1, 3, 7, 18, 41, 117, 299, 861, 2413, 6955, 19943, 57974, 168013, 489789, 1428611, 4177232, 12226997, 35847123, 105200351, 309086838, 908931221, 2675276801, 7880255915, 23228969891, 68518137777, 202231890207, 597228362551, 1764663912122
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Examples

			All solutions for n=3:
..2....3....1....1....2....1....2
..3....3....2....1....2....1....2
..3....3....2....2....3....1....2
		

Crossrefs

Diagonal of A208777.

Extensions

a(19)-a(28) from Andrew Howroyd, Mar 18 2017
Showing 1-7 of 7 results.