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

A263656 Number of length-2n central circular binary strings without zigzags (see reference for precise definition).

Original entry on oeis.org

0, 0, 4, 6, 12, 30, 70, 168, 412, 1014, 2514, 6270, 15702, 39468, 99516, 251586, 637500, 1618638, 4117102, 10488684, 26758762, 68354250, 174810354, 447533586, 1146836662, 2941443180, 7550434480, 19395863358, 49859516292, 128252962434, 330101861850
Offset: 0

Views

Author

Felix Fröhlich, Oct 23 2015

Keywords

Comments

See page 6 in the reference.
A zigzag is a substring which is either 010 or 101. The central binary strings are those that contain an equal number of 0's and 1's.

Examples

			For n=3 the 6 strings are 000111, 001110, 011100, 111000, 110001, 100011.
		

Crossrefs

Main diagonal of A263655.

Programs

  • Mathematica
    a[n_ /; n < 6] := {0, 0, 4, 6, 12, 30}[[n + 1]]; a[n_] := a[n] = (-(3*(n - 6)*a[n - 6]) + (7*n - 37)*a[n - 5] - 6*a[n - 4] + (7*n - 27)*a[n - 3] - 4*(n - 4)*a[n - 2] + 3*(n - 1)*a[n - 1])/n;
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Oct 08 2017, after Andrew Howroyd *)

Formula

a(n) = (1/n)*(3*(n-1)*a(n-1) - 4*(n-4)*a(n-2) + (7*n-27)*a(n-3) - 6*a(n-4) + (7*n-37)*a(n-5) - 3*(n-6)*a(n-6)) for n >= 6. - Andrew Howroyd, Feb 26 2017

Extensions

corrected a(1) and a(17)-a(30) from Andrew Howroyd, Feb 26 2017

A263655 Table T(m, n) of number of circular binary strings with m ones and n zeros without zigzags, read by antidiagonals (see reference for precise definition).

Original entry on oeis.org

0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 4, 0, 1, 1, 0, 5, 5, 0, 1, 1, 0, 6, 6, 6, 0, 1, 1, 0, 7, 7, 7, 7, 0, 1, 1, 0, 8, 8, 12, 8, 8, 0, 1, 1, 0, 9, 9, 18, 18, 9, 9, 0, 1, 1, 0, 10, 10, 25, 30, 25, 10, 10, 0, 1, 1, 0, 11, 11, 33, 44, 44, 33, 11, 11, 0, 1
Offset: 0

Views

Author

Felix Fröhlich, Oct 23 2015

Keywords

Comments

See page 5, figure 1 in the reference.
A zigzag is a substring which is either 010 or 101.

Examples

			Table starts:
0 1  1  1  1   1   1   1   1    1    1    1    1 ...
1 0  0  0  0   0   0   0   0    0    0    0    0 ...
1 0  4  5  6   7   8   9  10   11   12   13   14 ...
1 0  5  6  7   8   9  10  11   12   13   14   15 ...
1 0  6  7 12  18  25  33  42   52   63   75   88 ...
1 0  7  8 18  30  44  60  78   98  120  144  170 ...
1 0  8  9 25  44  70 104 147  200  264  340  429 ...
1 0  9 10 33  60 104 168 255  368  510  684  893 ...
1 0 10 11 42  78 147 255 412  629  918 1292 1765 ...
1 0 11 12 52  98 200 368 629 1014 1558 2300 3283 ...
1 0 12 13 63 120 264 510 918 1558 2514 3885 5786 ...
		

Crossrefs

Main diagonal is A263656. Antidiagonal sums are A007039.

Programs

  • Mathematica
    max = 11;
    U[r_, k_] := Binomial[r - k + 2*Floor[k/3], Floor[k/3]];
    V[r_, k_] := Binomial[r - Ceiling[k/2] - 1, Floor[k/2]];
    T[0, 0] = T[1, 1] = 0;
    T[0, ] = T[, 0] = 1;
    T[n_ /; n >= 2, m_] /; m <= n := T[n, m] = Switch[m, 1, 0, 2, n + 2, 3, n + 3, _, Sum[ U[m, k]*U[n, k] - 2*V[m, k]*V[n, k]*(-1)^k, {k, 0, max-3}]];
    T[n_, m_] /; m > n := T[m, n];
    Table[T[n - k, k], {n, 0, max}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 01 2018, after Andrew Howroyd *)

Formula

From Andrew Howroyd, Feb 26 2017: (Start)
T(n,m) = Sum_{k>=0} U(m,k)*U(n,k) - 2*V(m,k)*V(n,k)*(-1)^k
where U(r,k)=binomial(r-k+2*floor(k/3), floor(k/3)), V(r,k)=binomial(r-ceiling(k/2)-1, floor(k/2)).
T(n,0)=1 for n>=1, T(n,1)=0 for n>=1, T(n,2)=n+2 for n>=2, T(n,3)=n+3 for n>=2.
T(n,4)=(n-1)*(n+4)/2 for n>=3, T(n,5)=(n-2)*(n+5) for n>=3. (End)

Extensions

a(66)-a(77) from Andrew Howroyd, Feb 26 2017

A263658 Number of (0, 1)-necklaces with n zeros and n ones without zigzags (see reference for precise definition).

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 7, 12, 27, 57, 128, 285, 659, 1518, 3561, 8389, 19936, 47607, 114397, 276018, 669035, 1627491, 3973106, 9728991, 23892779, 58828866, 145201423, 359182693, 890350290, 2211257973, 5501701981, 13711368630, 34225162345, 85555609119, 214166692430, 536810116905
Offset: 0

Views

Author

Felix Fröhlich, Oct 23 2015

Keywords

Comments

See page 16 in the reference.
A zigzag is a substring which is either 010 or 101. The necklaces 01 and 10 are considered to be with a zigzag. Necklaces do not allow turnover.

Examples

			For n=2 the necklace is 0011.
For n=3 the necklace is 000111.
For n=4 the necklaces are 00001111, 00110011.
For n=5 the necklaces are 0000011111, 0001110011, 0001100111.
		

Crossrefs

Main diagonal of A263657.

Programs

  • Mathematica
    (* b = A263656 *)
    b[n_ /; n < 6] := {0, 0, 4, 6, 12, 30}[[n + 1]];
    b[n_] := b[n] = (1/n)*(3*(n - 1)*b[n - 1] - 4*(n - 4)*b[n - 2] + (7*n - 27)*b[n - 3] - 6*b[n - 4] + (7*n - 37)*b[n - 5] - 3*(n - 6)*b[n - 6]);
    a[0] = 0;
    a[n_] := (1/n)*DivisorSum[n, EulerPhi[n/#] * b[#]/2&];
    Array[a, 36, 0] (* Jean-François Alcover, Sep 11 2017, after Andrew Howroyd *)

Formula

a(n) = (1/n) * Sum_{d | n} totient(n/d) * A263656(d) / 2. - Andrew Howroyd, Feb 26 2017

Extensions

Offset corrected and a(21)-a(35) from Andrew Howroyd, Feb 26 2017

A263659 Number of (0, 1)-necklaces of length n without zigzags (see reference for precise definition).

Original entry on oeis.org

0, 2, 2, 2, 3, 4, 5, 6, 8, 10, 15, 20, 31, 42, 64, 94, 143, 212, 329, 494, 766, 1170, 1811, 2788, 4341, 6714, 10462, 16274, 25415, 39652, 62075, 97110, 152288, 238838, 375167, 589528, 927555, 1459962, 2300348, 3626242, 5721045
Offset: 0

Views

Author

Felix Fröhlich, Oct 23 2015

Keywords

Comments

See page 16 in the reference.
A zigzag is a substring which is either 010 or 101. The necklaces 01 and 10 are considered to be with a zigzag. Necklaces do not allow turnover.

Examples

			For n=5 the necklaces are 00000, 11111, 00011, 00111 so a(5)=4.
		

Crossrefs

Antidiagonal sums of A263657.

Programs

  • Mathematica
    (* b = A007039 *) b[n_ /; n<4] = 2; b[4] = 6; b[n_] := b[n] = 2*b[n-1] - b[n-2] + b[n-4];
    a[0] = 0; a[n_] := (1/n) * DivisorSum[n, EulerPhi[n/#] * b[#]&];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Oct 08 2017, after Andrew Howroyd *)

Formula

a(n) = (1/n) * Sum_{d | n} totient(n/d) * A007039(d). - Andrew Howroyd, Feb 26 2017

Extensions

a(25)-a(40) from Andrew Howroyd, Feb 26 2017
Showing 1-4 of 4 results.