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.

A220062 Number A(n,k) of n length words over k-ary alphabet, where neighboring letters are neighbors in the alphabet; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 0, 0, 1, 3, 2, 0, 0, 1, 4, 4, 2, 0, 0, 1, 5, 6, 6, 2, 0, 0, 1, 6, 8, 10, 8, 2, 0, 0, 1, 7, 10, 14, 16, 12, 2, 0, 0, 1, 8, 12, 18, 24, 26, 16, 2, 0, 0, 1, 9, 14, 22, 32, 42, 42, 24, 2, 0, 0, 1, 10, 16, 26, 40, 58, 72, 68, 32, 2, 0, 0
Offset: 0

Views

Author

Alois P. Heinz, Dec 03 2012

Keywords

Comments

Equivalently, the number of walks of length n-1 on the path graph P_k. - Andrew Howroyd, Apr 17 2017

Examples

			A(5,3) = 12: there are 12 words of length 5 over 3-ary alphabet {a,b,c}, where neighboring letters are neighbors in the alphabet: ababa, ababc, abcba, abcbc, babab, babcb, bcbab, bcbcb, cbaba, cbabc, cbcba, cbcbc.
Square array A(n,k) begins:
  1,  1,  1,  1,  1,   1,   1,   1, ...
  0,  1,  2,  3,  4,   5,   6,   7, ...
  0,  0,  2,  4,  6,   8,  10,  12, ...
  0,  0,  2,  6, 10,  14,  18,  22, ...
  0,  0,  2,  8, 16,  24,  32,  40, ...
  0,  0,  2, 12, 26,  42,  58,  74, ...
  0,  0,  2, 16, 42,  72, 104, 136, ...
  0,  0,  2, 24, 68, 126, 188, 252, ...
		

Crossrefs

Columns k=0, 2-10 give: A000007, A040000, A029744(n+2) for n>0, A006355(n+3) for n>0, A090993(n+1) for n>0, A090995(n-1) for n>2, A129639, A153340, A153362, A153360.
Rows 0-6 give: A000012, A001477, A005843(k-1) for k>0, A016825(k-2) for k>1, A008590(k-2) for k>2, A113770(k-2) for k>3, A063164(k-2) for k>4.
Main diagonal gives: A102699.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1,
          `if`(i=0, add(b(n-1, j, k), j=1..k),
          `if`(i>1, b(n-1, i-1, k), 0)+
          `if`(i b(n, 0, k):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i == 0, Sum[b[n-1, j, k], {j, 1, k}], If[i>1, b[n-1, i-1, k], 0] + If[iJean-François Alcover, Jan 19 2015, after Alois P. Heinz *)
  • 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)));
    ColGf(m,z)=1+z*TransferGf(m, i->1, (i,j)->abs(i-j)==1, j->1, z);
    a(n,k)=Vec(ColGf(k,x) + O(x^(n+1)))[n+1];
    for(n=0, 7, for(k=0, 7, print1( a(n,k), ", ") ); print(); );
    \\ Andrew Howroyd, Apr 17 2017

A208671 T(n,k) = number of 2n-bead necklaces labeled with numbers 1..k allowing reversal, with neighbors differing by exactly 1.

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 3, 3, 1, 0, 4, 5, 4, 1, 0, 5, 7, 8, 6, 1, 0, 6, 9, 12, 14, 8, 1, 0, 7, 11, 16, 23, 24, 13, 1, 0, 8, 13, 20, 32, 44, 47, 18, 1, 0, 9, 15, 24, 41, 65, 97, 89, 30, 1, 0, 10, 17, 28, 50, 86, 152, 212, 187, 46, 1, 0, 11, 19, 32, 59, 107, 208, 360, 512, 396, 78, 1, 0, 12, 21, 36
Offset: 1

Views

Author

R. H. Hardin, Feb 29 2012

Keywords

Comments

Table starts
.0.1..2...3...4...5....6....7....8....9...10..11..12..13.14.15.16
.0.1..3...5...7...9...11...13...15...17...19..21..23..25.27.29
.0.1..4...8..12..16...20...24...28...32...36..40..44..48.52
.0.1..6..14..23..32...41...50...59...68...77..86..95.104
.0.1..8..24..44..65...86..107..128..149..170.191.212
.0.1.13..47..97.152..208..264..320..376..432.488
.0.1.18..89.212.360..514..669..824..979.1134
.0.1.30.187.512.937.1398.1866.2335.2804

Examples

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

Crossrefs

Column 3 is A000029.

Formula

T(n,k) = (2*A208727(n) + A220062(n+1,k))/4. - Andrew Howroyd, Mar 19 2017

A208724 Number of 2n-bead necklaces labeled with numbers 1..5 not allowing reversal, with neighbors differing by exactly 1.

Original entry on oeis.org

4, 7, 12, 25, 52, 131, 316, 835, 2196, 5935, 16108, 44369, 122644, 341803, 956636, 2690845, 7596484, 21524543, 61171660, 174342217, 498112276, 1426419859, 4093181692, 11767920119, 33891544420, 97764131647, 282429537948, 817028472961, 2366564736724, 6863038218843
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Examples

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

Crossrefs

Column 5 of A208727.

Programs

Formula

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

Extensions

a(15)-a(30) from Andrew Howroyd, Mar 18 2017

A208722 Number of 2n-bead necklaces labeled with numbers 1..n not allowing reversal, with neighbors differing by exactly 1.

Original entry on oeis.org

0, 1, 4, 15, 52, 210, 796, 3175, 12468, 49288, 194140, 766110, 3019224, 11905330, 46938192, 185111095, 730148332, 2880799554, 11369141308, 44881708072, 177229210656, 700047776214, 2765947680124, 10931565973950, 43215517211240, 170888480306500
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Examples

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

Crossrefs

Diagonal of A208727.

Extensions

a(13)-a(26) from Andrew Howroyd, Mar 18 2017

A208723 Number of 2n-bead necklaces labeled with numbers 1..4 not allowing reversal, with neighbors differing by exactly 1.

Original entry on oeis.org

3, 5, 8, 15, 27, 60, 123, 285, 648, 1529, 3603, 8680, 20883, 50825, 124056, 304575, 750123, 1855100, 4600203, 11442087, 28527448, 71292605, 178526883, 447919420, 1125750147, 2833906685, 7144450568, 18036423975, 45591631803, 115381823348
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Examples

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

Crossrefs

Column 4 of A208727.

Formula

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

Extensions

a(26)-a(30) from Andrew Howroyd, Mar 18 2017

A208725 Number of 2n-bead necklaces labeled with numbers 1..6 not allowing reversal, with neighbors differing by exactly 1.

Original entry on oeis.org

5, 9, 16, 35, 78, 210, 551, 1569, 4475, 13078, 38465, 114584, 343026, 1034471, 3134135, 9540969, 29154478, 89407073, 275016292, 848329872, 2623322133, 8130714643, 25252366057, 78577560856, 244933963301, 764707458720, 2391026407058, 7486342546939
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Examples

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

Crossrefs

Column 6 of A208727.

Formula

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

Extensions

a(17)-a(28) from Andrew Howroyd, Mar 18 2017

A208726 Number of 2n-bead necklaces labeled with numbers 1..7 not allowing reversal, with neighbors differing by exactly 1.

Original entry on oeis.org

6, 11, 20, 45, 104, 290, 796, 2366, 7076, 21684, 66996, 209594, 659560, 2090590, 6659120, 21312716, 68476512, 220798322, 714144612, 2316303916, 7531662344, 24545750474, 80160395804, 262280793024, 859662037240, 2822180991508, 9278652591844, 30547892144882
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Examples

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

Crossrefs

Column 7 of A208727.

Extensions

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