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

A347351 Triangle read by rows: T(n,k) is the number of links of length k in a set of all necklaces A000358 of length n, 1 <= k <= n.

Original entry on oeis.org

1, 2, 1, 3, 0, 1, 4, 2, 0, 1, 5, 1, 1, 0, 1, 6, 4, 2, 1, 0, 1, 7, 3, 2, 1, 1, 0, 1, 8, 8, 3, 3, 1, 1, 0, 1, 9, 8, 7, 3, 2, 1, 1, 0, 1, 10, 18, 9, 5, 4, 2, 1, 1, 0, 1, 11, 21, 13, 8, 5, 3, 2, 1, 1, 0, 1, 12, 40, 24, 16, 8, 6, 3, 2, 1, 1, 0, 1, 13, 55, 34, 21, 13, 8, 5, 3, 2, 1, 1, 0, 1
Offset: 0

Views

Author

Maxim Karimov and Vladislav Sulima, Aug 28 2021

Keywords

Comments

Definitions:
1. A link is any 0 in any necklace from A000358 and all 1s following this 0 in this necklace to right until another 0 is encountered.
2. Length of the link is the number of elements in the link.
Sum of all elements n-row is Fibonacci(n-1)+n iff n=1 or n=p (follows from the identity for the sum of the Fibonacci numbers and the formula for the triangle T(n,k)).

Examples

			For k > 0:
   n\k |  1   2   3   4   5   6   7   8   9  10  ...
  -----+---------------------------------------
   1   |  1
   2   |  2   1
   3   |  3   0   1
   4   |  4   2   0   1
   5   |  5   1   1   0   1
   6   |  6   4   2   1   0   1
   7   |  7   3   2   1   1   0   1
   8   |  8   8   3   3   1   1   0   1
   9   |  9   8   7   3   2   1   1   0   1
  10   | 10  18   9   5   4   2   1   1   0   1
  ...
If we continue the calculation for nonpositive k, we get a table in which each row is a Fibonacci sequence, in which term(0) = A113166, term(1) = A034748.
For k <= 0:
   n\k |  0   -1   -2   -3   -4   -5   -6   -7   -8   -9 ...
  -----+------------------------------------------------
   1   |  0    1    1    2    3    5    8   13   21   34 ... A000045
   2   |  1    2    3    5    8   13   21   34   55   89 ... A000045
   3   |  1    4    5    9   14   23   37   60   97  157 ... A000285
   4   |  3    6    9   15   24   39   63  102  165  267 ... A022086
   5   |  3    9   12   21   33   54   87  141  228  369 ... A022379
   6   |  8   14   22   36   58   94  152  246  398  644 ... A022112
   7   |  8   19   27   46   73  119  192  311  503  814 ... A206420
   8   | 17   30   47   77  124  201  325  526  851 1377 ... A022132
   9   | 23   44   67  111  178  289  467  756 1223 1979 ... A294116
  10   | 41   68  109  177  286  463  749 1212 1961 3173 ... A022103
  ...
		

Crossrefs

Programs

  • MATLAB
    function [res] = calcLinks(n,k)
    if k==1
        res=n;
    else
        d=divisors(n);
        res=0;
        for i=1:length(d)
            if d (i) >= k
                res=res+eulerPhi(n/d(i))*fiboExt(d(i)-k-1);
            end
        end
    end
    function [s] = fiboExt(m) % extended fibonacci function (including negative arguments)
    m=sym(m); % for large fibonacci numbers
    if m>=0 || mod(m,2)==1
        s=fibonacci(abs(m));
    else
        s=fibonacci(abs(m))*(-1);
    end
    
  • PARI
    T(n, k) = if (k==1, n, sumdiv(n, d, if (d>=k, eulerphi(n/d)*fibonacci(d-k-1)))); \\ Michel Marcus, Aug 29 2021

Formula

If k=1, T(n,k)=n, otherwise T(n,k) = Sum_{d>=k, d|n} Phi(n/d)*Fibonacci(d-k-1), where Phi=A000010.

A131719 Period 6: repeat [0, 1, 1, 1, 1, 0].

Original entry on oeis.org

0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0
Offset: 0

Views

Author

Paul Curtz, Sep 15 2007

Keywords

Programs

Formula

G.f.: -(x^2+1)*x/(x-1)/(x^2+x+1)/(x^2-x+1). - R. J. Mathar, Nov 14 2007
a(n) = 2/3-cos(Pi*n/3)/2+sqrt(3)*sin(Pi*n/3)/6 -cos(2*Pi*n/3)/6 +sqrt(3)*sin(2*Pi*n/3)/6. - R. J. Mathar, Oct 08 2011
a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) for n>4. - Wesley Ivan Hurt, Jun 19 2016
a(n+3) = A000358(n)(mod 2), for n>0. - John M. Campbell, Jul 08 2016

A093305 Number of binary necklaces of length n with no subsequence 000.

Original entry on oeis.org

1, 2, 3, 4, 5, 9, 11, 19, 29, 48, 75, 132, 213, 369, 627, 1083, 1857, 3244, 5619, 9844, 17205, 30229, 53115, 93701, 165313, 292464, 517831, 918578, 1630933, 2900109, 5161443, 9197251, 16402841, 29283026, 52319379, 93558968, 167427845, 299846737, 537358107, 963651447, 1729192433
Offset: 1

Views

Author

Philippe Deléham, Apr 24 2004

Keywords

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 500.

Crossrefs

Programs

  • Mathematica
    Table[1/n * Sum[EulerPhi[n/d] (d Sum[Sum[Binomial[j, d - 3 k + 2 j] Binomial[k, j], {j, d - 3 k, k}]/k, {k, d}]), {d, Divisors@ n}], {n, 41}] (* Michael De Vlieger, Dec 28 2016, after Vladimir Joseph Stephan Orlovsky at A001644 *)
  • PARI
    N=66;  x='x+O('x^N);
    B(x)=x*(1+x+x^2);
    A=sum(k=1, N, eulerphi(k)/k*log(1/(1-B(x^k))));
    Vec(A)
    /* Joerg Arndt, Aug 06 2012 */

Formula

a(n) = (1/n) * Sum_{d divides n} totient(n/d)*A001644(d).
G.f.: Sum_{k>=1} phi(k)/k * log( 1/(1-B(x^k)) ) where B(x) = x*(1+x+x^2). - Joerg Arndt, Aug 06 2012
a(n) ~ d^n / n, where d = (19 + 3*sqrt(33))^(1/3)/3 + 4/(3*(19 + 3*sqrt(33))^(1/3)) + 1/3 = A058265 = 1.8392867552141611325518... - Vaclav Kotesovec, Jul 13 2019

A110710 Number of ternary necklaces with n beads of each color and no adjacent beads of the same color (i.e., no substrings 00, 11, 22).

Original entry on oeis.org

1, 2, 5, 16, 70, 348, 1948, 11444, 70380, 445944, 2896590, 19186740, 129186596, 881808728, 6089851874, 42482906040, 298976142764, 2120377458900, 15141289233972, 108784152585236, 785869931659980, 5705406374249272
Offset: 0

Views

Author

Max Alekseyev, Aug 05 2005

Keywords

Comments

The number of circular arrangements (counted up to rotations) of n blue, n red and n green items such that there are no adjacent items of the same color. The number of various linear arrangements is given by A110706, A110707 and A110711.

Examples

			For n=2 there are 5 necklaces: 010212, 012012, 012021, 012102, 021021.
		

Crossrefs

Programs

  • Mathematica
    b = Binomial; A110707[n_] := 2*Sum[b[n - 1, k]*(b[n - 1, k]*(b[2*n + 1 - 2*k, n + 1] - 3*b[2*n - 1 - 2*k, n + 1]) + b[n - 1, k + 1]*(b[2*n - 2*k, n + 1] - 3*b[2*n - 2*k - 2, n + 1])), {k,0, n/2}]; a[n_] := DivisorSum[n, A110707[n/#]*EulerPhi[#]&]/(3n); a[0]=1; Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Dec 04 2015, adapted from PARI *)
  • PARI
    { A110707(n) = 2 * sum(k=0,n\2, binomial(n-1,k) * (binomial(n-1,k)*(binomial(2*n+1-2*k,n+1)-3*binomial(2*n-1-2*k,n+1)) + binomial(n-1,k+1)*(binomial(2*n-2*k,n+1)-3*binomial(2*n-2*k-2,n+1)) )); A110710(n) = sumdiv(n,d,A110707(n\d)*eulerphi(d))\(3*n); }

Formula

a(n) = Sum_{d|n} A110707(n/d)*eulerphi(d) / (3n) for n>0, a(0)=1.
a(n) ~ sqrt(3) * 2^(3*n - 1) / (Pi * n^2). - Vaclav Kotesovec, Mar 20 2023

Extensions

a(0)=1 prepended by Alois P. Heinz, Dec 04 2015

A351359 Number of binary necklaces with n beads and at least two consecutive black beads.

Original entry on oeis.org

0, 1, 2, 3, 5, 9, 15, 28, 50, 93, 169, 321, 591, 1118, 2098, 3973, 7501, 14273, 27103, 51722, 98710, 188935, 361937, 694911, 1335471, 2570966, 4954794, 9562165, 18473141, 35730493, 69176559, 134067508, 260062338, 504918961, 981117305, 1907954345
Offset: 1

Views

Author

Marko Riedel, Feb 08 2022

Keywords

Crossrefs

Formula

a(n) = A000031(n) - A000358(n).

A280218 Number of binary necklaces of length n with no subsequence 0000.

Original entry on oeis.org

1, 2, 3, 5, 6, 11, 15, 27, 43, 75, 125, 228, 391, 707, 1262, 2285, 4119, 7525, 13691, 25111, 46033, 84740, 156123, 288529, 533670, 989305, 1835983, 3412885, 6351031, 11834623, 22074821, 41222028, 77048131, 144148859, 269913278, 505826391, 948652695, 1780473001, 3343960175, 6284560319, 11818395345
Offset: 1

Views

Author

Petros Hadjicostas, Dec 29 2016

Keywords

Comments

a(n) is the number of cyclic sequences of length n consisting of zeros and ones that do not contain four consecutive zeros provided we consider as equivalent those sequences that are cyclic shifts of each other.

Examples

			a(5)=6 because we have six binary cyclic sequences of length 5 that avoid four consecutive zeros: 00011, 00101, 00111, 01101, 01111, 11111.
		

Crossrefs

Programs

  • Mathematica
    Table[(1/n) Sum[EulerPhi[n/d] SeriesCoefficient[(4 - 3 x - 2 x^2 - x^3)/(1 - x - x^2 - x^3 - x^4), {x, 0, d}], {d, Divisors@ n}], {n, 41}] (* Michael De Vlieger, Dec 30 2016 *)
  • PARI
    N=44; x='x+O('x^N);
    B(x)=x*(1+x+x^2+x^3);
    Vec(sum(k=1, N, eulerphi(k)/k * log(1/(1-B(x^k))))) \\ Joerg Arndt, Dec 29 2016

Formula

a(n) = (1/n) * Sum_{d divides n} totient(n/d) * A073817(d).
G.f.: Sum_{k>=1} (phi(k)/k) * log(1/(1-B(x^k))) where B(x) = x*(1+x+x^2+x^3).

A119458 Triangle read by rows: T(n,k) is the number of (marked) circular binary words of length n having k occurrences of 00 (0 <= k <= n).

Original entry on oeis.org

1, 1, 1, 3, 0, 1, 4, 3, 0, 1, 7, 4, 4, 0, 1, 11, 10, 5, 5, 0, 1, 18, 18, 15, 6, 6, 0, 1, 29, 35, 28, 21, 7, 7, 0, 1, 47, 64, 60, 40, 28, 8, 8, 0, 1, 76, 117, 117, 93, 54, 36, 9, 9, 0, 1, 123, 210, 230, 190, 135, 70, 45, 10, 10, 0, 1, 199, 374, 440, 396, 286, 187, 88, 55, 11, 11, 0, 1
Offset: 0

Views

Author

Emeric Deutsch, May 20 2006

Keywords

Comments

Sum of entries in row n is 2^n (A000079).
In Carlitz and Scoville (p. 252) the first term is 2.
From Petros Hadjicostas, Jan 05 2019: (Start)
Note that T(n,k) is the number of marked circular binary words of length n having k occurrences of 00 (0 <= k <= n). Let W(n,k) be the number of binary necklaces (= unmarked circular binary words) of length n with exactly k occurrences of the pattern 00 provided wrapping around the circle is allowed when n=1. More precisely, when n=1, we allow the string to wrap around itself on the circle to form a circular string of length 2. We have W(n, k) = A320341(n, k) for 0 <= k <= n.
Fortunately, since T(n=1, k=0) = 1 = T(n=1, k=1), the author of the sequence (indirectly) assumes that the string 0 has one occurrence of the pattern 00 (if allowed to wrap around itself on the circle only once), while the string 1 has zero occurrences of the pattern 00.
It makes sense to define T(n,k) = 0 when k > n. Note that G(z,t) = Sum_{n,k >=0} T(n,k)*z^n*t^k = 1 - z*(d(1-A(z,t))/dz)/(1-A(z,t)), where A(z,t) = z*(t+1) + z^2*(1-t) is the "Flajolet-Soria polynomial (g.f.)" in z of some (difficult to find) linear combinatorial structure that is defined very abstractly at the beginning of their paper and in the book by Flajolet and Sedgewick (2009). (Since the series here converge for z and t close to 0, we have that 1-t is positive for all t in a "small" interval around 0.)
Using the theory in Flajolet and Soria (1991) and the one in Hadjicostas and Zhang (2018), we can prove that the g.f. of the numbers W(n,k) is F(z,t) = Sum_{n >= 1, k >= 0} W(n,k)*z^n*t^k = -Sum_{d>=1} (phi(d)/d)*log(1-A(z^d,t^d)). We can also prove that W(n,k) = (1/n)*Sum_{d|gcd(n,k)} phi(d)*T(n/d, k/d) for n>=1 and 0 <= k <= n. (We omit the details.)
For k=0, we get that T(n, k=0) = A000204(n) and W(n, k=0) = A000358(n) for n >= 1, and the Flajolet-Soria polynomial is A(z,t=0) = z + z^2 (which was discovered by Joerg Arndt).
To get univariate g.f.'s of the sequences (T(n,k): n >= 1) and (W(n, k): n >= 1) when k >= 1, we have to differentiate the previous two g.f.'s k times with respect to t, set t=0, and divide by k!. (Obviously, the log now disappears.)
For k=1, we get T(n, k=1) = A006490(n) and W(n, k=1) = A212804(n-1) = A006490(n)/n for n >= 1.
For k=2, we get T(n, k=2) = A006491(n-1) for n >= 1 (with A006491(0) := 0) and W(n, k=2) = (1/n)*(T(n,2) + I(2|n)*T(n/2,1)) for n >= 1, where I(2|n) = 1 if 2|n, and 0 otherwise.
For k=3, we get T(n, k=3) = A006492(n-2) for n >=1 (with A006492(m) = 0 for m = 1,2) and W(n, k=3) = (1/n)*(T(n,3) + 2*I(3|n)*T(n/3, 1)) for n >= 1.
This theory can be generalized for any pattern P of 0's and 1's provided one discovers the correct "Flajolet-Soria" polynomial A_P(z,t). In other words, if P is a finite pattern of zeros and ones of length L, and we let T_P(n,k) be the number of (marked) circular binary words of length n having k occurrences of P (0 <= k <= n) and we allow strings of length n, with 1 <= n < L, to wrap around themselves on the circle to form a string of length n*ceiling(L/n), then (most probably) we can express the g.f. of T_p(n,k), say G_p(z,t), in the form 1-z*(d(1-A_P(z,t))/dz)/(1-A_P(z,t)). In such a case, if W_P(n,k) is the number of binary necklaces (= unmarked circular binary words) of length n with exactly k occurrences of the pattern P, we have that its generating function is Sum_{n >= 1, k >= 0} W_P(n,k)*z^n*t^k = -Sum_{d>=1} (phi(d)/d)*log(1-A_P(z^d,t^d)). We can also prove that W_P(n,k) = (1/n)*Sum_{d|gcd(n,k)} phi(d)*T_P(n/d, k/d) for n>=1 and 0 <= k <= n.
One final note: it seems that the theory of Flajolet and Soria (1991) applies only to the case k=0 and to the case we consider all k simultaneously. (For fixed k >= 2, W_P(n,k) depends not only on T_P(n,k), but also on all T(n/d, k/d) where d ranges over the common divisors of n and k. Thus, for fixed k >= 2, it seems there is no linear combinatorial structure whose list of cycles of elements corresponds to the collection of necklaces we want.) See also Flajolet and Sedgewick (2009), pp. 84-85 and 729-730.
(End)

Examples

			T(5,3) = 5 because we have 10000, 01000, 00100, 00010 and 00001.
Triangle for T(n,k) begins:
n=0:    1;
n=1:    1,   1;
n=2:    3,   0,   1;
n=3:    4,   3,   0,   1;
n=4:    7,   4,   4,   0,   1;
n=5:   11,  10,   5,   5,   0,  1
n=6:   18,  18,  15,   6,   6,  0,  1;
n=7:   29,  35,  28,  21,   7,  7,  0,  1;
n=8:   47,  64,  60,  40,  28,  8,  8,  0,  1;
n=9:   76, 117, 117,  93,  54, 36,  9,  9,  0, 1;
n=10: 123, 210, 230, 190, 135, 70, 45, 10, 10, 0, 1;
  ...
From _Petros Hadjicostas_, Jan 06 2019: (Start)
If we take the Taylor expansion of g.f. G(z,t) of T(n,k) around z=0, we get G(z,t) = 1 + (1+t)*z + (3+0*t+t^2)*z^2 + (4+3*t+0*t^2+t^3)*z^3 + (7+4*t+4*t^2+0*t^3+t^4)*z^4 +(11+10*t+5*t^2+5*t^3+0*t^4+t^5)*z^5 + ...
One the other hand, if we take the Taylor expansion of the g.f. F(z,t) of W(n,k) = A320341(n, k) around z=0, we get F(z,t) = (1+t)*z + (2+0*t+t^2)*z^2 + (2+t+0*t^2+t^3)*z^3 + (3+t+t^2+0*t^3+t^4)*z^4 + (3+2*t+t^2+t^3+0*t^4+t^5)*z^5 + ...
Triangle for W(n,k) begins:
n=1:    1,  1;
n=2:    2,  0,  1;
n=3:    2,  1,  0,  1;
n=4:    3,  1,  1,  0,  1;
n=5:    3,  2,  1,  1,  0,  1;
n=6:    5,  3,  3,  1,  1,  0,  1;
n=7:    5,  5,  4,  3,  1,  1,  0,  1;
n=8:    8,  8,  8,  5,  4,  1,  1,  0,  1;
n=9:   10, 13, 13, 11,  6,  4,  1,  1,  0, 1;
n=10:  15, 21, 24, 19, 14,  7,  5,  1,  1, 0, 1;
...
For example, for n=4, we have the following marked and unmarked circular binary words (the square brackets denote equivalence classes):
k=0: [1111], [1110,1101,1011,0111], [1010,0101], T(4,0) = 7 and W(4,0) = 3;
k=1: [1100,1001,0011,0110], T(4,1) = 4 and W(4,1) = 1;
k=2: [0001,0010,0100,1000], T(4,2) = 4 and W(4,2) = 1;
k=3: none, T(4,3) = 0 = W(4,3);
k=4: [0000], T(4,4) = 1 = W(4,4).
(End)
		

Crossrefs

Programs

  • Maple
    T:=proc(n,k): if k>n or k<0 then 0 elif n=0 and k=0 then 1 elif n=1 then 1 elif n=2 and k=0 then 3 elif n=2 and k=1 then 0 else T(n-1,k)+T(n-2,k)+T(n-1,k-1)-T(n-2,k-1) fi end: for n from 0 to 12 do seq(T(n,k),k=0..n) od; # yields sequence in triangular form
  • Mathematica
    T[n_, k_] := T[n, k] = Which[k > n || k < 0, 0, n == 0 && k == 0, 1, n == 1, 1, n == 2 && k == 0, 3, n == 2 && k == 1, 0, True, T[n-1, k] + T[n-2, k] + T[n-1, k-1] - T[n-2, k-1]];
    Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 11 2019 *)

Formula

T(n,k) = T(n-1,k) + T(n-2,k) + T(n-1,k-1) - T(n-2,k-1) for n >= 3 and k >= 1.
G.f.: G(z,t) = Sum_{n,k >=0} T(n,k)*z^n*t^k = (1 + z^2 - t*z^2)/(1 - z - z^2 - t*z + t*z^2). [edited by Petros Hadjicostas, Jan 05 2019]
T(n,0) = A000204(n) for n >= 1 (Lucas numbers).
T(n,1) = A006490(n) for n >= 1.
T(n,2) = A006491(n-1) for n >= 1 (with A006491(0):=0).
Sum_{k=0..n} k*T(n,k) = A057711(n).

Extensions

Name was edited by Petros Hadjicostas, Jan 06 2019
Values of T(9,5) and T(9,6) were corrected in the example by Petros Hadjicostas, Jan 06 2019

A320341 Triangle read by rows: T(n,k) is the number of unmarked circular binary words (necklaces) of length n having k occurrences of the pattern 00 (n >= 0 and 0 <= k <= n).

Original entry on oeis.org

1, 1, 1, 2, 0, 1, 2, 1, 0, 1, 3, 1, 1, 0, 1, 3, 2, 1, 1, 0, 1, 5, 3, 3, 1, 1, 0, 1, 5, 5, 4, 3, 1, 1, 0, 1, 8, 8, 8, 5, 4, 1, 1, 0, 1, 10, 13, 13, 11, 6, 4, 1, 1, 0, 1, 15, 21, 24, 19, 14, 7, 5, 1, 1, 0, 1, 19, 34, 40, 36, 26, 17, 8, 5, 1, 1, 0, 1, 31, 55, 71, 67, 54, 34, 22, 9, 6, 1, 1, 0, 1
Offset: 0

Views

Author

Petros Hadjicostas, Jan 07 2019

Keywords

Comments

The array T(n,k) is the number of unmarked circular binary words (necklaces) of length n having exactly k occurrences of 00 (n >= 0 and 0 <= k <= n). Let V(n,k) be the number of marked circular binary words of length n with exactly k occurrences of the pattern 00 provided wrapping around the circle is allowed when n=1. More precisely, when n=1, we allow the string to wrap around itself on the circle to form a circular string of length 2. It turns out that V(n,k) = A119458(n,k). The properties of the array V(n,k) were studied by Carlitz and Scoville (1977).
Both for this array and for array V(n,k) = A119458(n,k) we have T(n=1, k=0) = T(n=1, k=1) = V(n=1, k=0) = V(n=1, k=1) = 1, which means in both arrays we (indirectly) assume that the string 0 has one occurrence of the pattern 00 (if allowed to wrap around itself on the circle only once), while the string 1 has zero occurrences of the pattern 00.
It makes sense to define T(n,k) = 0 = V(n,k) when k > n. Using the theory in Flajolet and Soria (1991), Flajolet and Sedgewick (2009), and Hadjicostas and Zhang (2018), we can prove that the g.f. of the numbers T(n,k) is F(z,t) = Sum_{n >= 0, k >= 0} T(n,k)*z^n*t^k = 1 - Sum_{d>=1} (phi(d)/d)*log(1-A(z^d,t^d)) while the g.f. of the numbers V(n,k) is K(z,t) = 1 - z*(d(1-A(z,t))/dz)/(1-A(z,t)), where A(z,t) = z*(t+1) + z^2*(1-t). (The latter g.f. was proved in Carlitz and Scoville (1977).)
We can also prove that T(n,k) = (1/n)*Sum_{d|gcd(n,k)} phi(d)*V(n/d, k/d) for n>=1 and 0 <= k <= n.
For k=0, we get that T(n, k=0) = A000358(n) and V(n, k=0) = A000204(n) and for n >= 1. To get univariate g.f.'s of the sequences (T(n,k): n >= 1) and (V(n, k): n >= 1) when k >= 1, we have to differentiate the previous two g.f.'s k times with respect to t, set t=0, and divide by k!. (Obviously, the log now disappears from the g.f. of T(n,k).)
For k=1, we get T(n, k=1) = A212804(n-1) = A006490(n)/n and V(n, k=1) = A006490(n) for n >= 1.
For k=2, we get T(n, k=2) = (1/n)*(V(n,2) + I(2|n)*V(n/2,1)) for n >= 1, where I(2|n) = 1 if 2|n, and 0 otherwise. Also, V(n, k=2) = A006491(n-1) for n >= 1 (with A006491(0) := 0).
For k=3, we get T(n, k=3) = (1/n)*(V(n,3) + 2*I(3|n)*V(n/3, 1)) for n >= 1. Also,
V(n, k=3) = A006492(n-2) for n >=1 (with A006492(m) = 0 for m = 1, 2). To get the g.f. for (T(n,k=3): n >= 0), we differentiate F(z,t) three times w.r.t. t, set t=0, and divide by 3! = 6. We get: 2*z^3*(1-z^3)/(3*(1-z^3-z^6)) + z^3*(1-z)^3/(3*(1-z-z^2)^3) = z^3 + 0*z^4 + z^5 + z^6 + 3*z^7 + 5*z^8 + 11*z^9 + 19*z^10 + 36*z^11 + 67*z^12 + 122*z^13 + 222*z^14 + ...
For 0 <= k <= n, T(n,k) - I(k=0) is the number of cyclic compositions of n with exactly k ones, where I(k=0) is 1 if k=0, and 0 otherwise. This can be proved using MacMahon's bijection between binary necklaces of length n and (unmarked) cyclic compositions of n. (We exclude the binary necklace consisting only of 1's, and that is why we need the term I(k=0).)
Given a binary necklace of 0's and 1's with length n (with at least one 0), starting with a 0 and going clockwise, let b_1 be the number of 1's until before the next zero plus one (for the initial 0); starting with the next zero, let b_2 be the number of 1's plus one (for the 2nd 0); continue this process until you reach the last 0 (say the m-th 0), and denote by b_m the number of 1's plus one before the first 0. Then b_1 + b_2 + ... + b_m is a cyclic composition of n. The process can be reversed (since b_1, b_2, ..., b_m >= 1). The only necklace that cannot be obtained from a cyclic composition is the one having all 1's, which we exclude. In the above process, b_i = 1 if and only if the i-th 0 in the above process is followed by 0 (to the right of it on the circle). Hence, for 0 <= k <= n, T(n,k) - I(k=0) is the number of cyclic compositions of n with exactly k ones.
Note that array A105422(n,k) is the linear version of this array: A105422(n,k) is the number of (linear) compositions of n having exactly k parts equal to 1. The denominator of the bivariate g.f. of array A105422(n,k) is indeed 1 - A(z,t), where A(z,t) = z*(t+1) + z^2*(1-t) (see above), and this is no coincidence.

Examples

			Triangle for T(n,k) begins:
n=0:    1;
n=1:    1,  1;
n=2:    2,  0,  1;
n=3:    2,  1,  0,  1;
n=4:    3,  1,  1,  0,  1;
n=5:    3,  2,  1,  1,  0,  1;
n=6:    5,  3,  3,  1,  1,  0,  1;
n=7:    5,  5,  4,  3,  1,  1,  0,  1;
n=8:    8,  8,  8,  5,  4,  1,  1,  0,  1;
n=9:   10, 13, 13, 11,  6,  4,  1,  1,  0, 1;
n=10:  15, 21, 24, 19, 14,  7,  5,  1,  1, 0, 1;
...
If we take the Taylor expansion of g.f. F(z,t) of T(n,k) around z=0, we get F(z,t) = 1 + (1+t)*z + (2+0*t+t^2)*z^2 + (2+t+0*t^2+t^3)*z^3 + (3+t+t^2+0*t^3+t^4)*z^4 + (3+2*t+t^2+t^3+0*t^4+t^5)*z^5 + ...
For example, for n=4, we have the following marked and unmarked circular binary words (the square brackets denote equivalence classes):
k=0: [1111], [1110,1101,1011,0111], [1010,0101], V(4,0) = 7 and T(4,0) = 3;
k=1: [1100,1001,0011,0110], V(4,1) = 4 and T(4,1) = 1;
k=2: [0001,0010,0100,1000], V(4,2) = 4 and T(4,2) = 1;
k=3: none, V(4,3) = 0 = T(4,3);
k=4: [0000], V(4,4) = 1 = T(4,4).
The corresponding cyclic compositions of n=4 under MacMahon's bijection are the following:
k=0 (no 1's): [none], [4], [2+2], T(4,1) - 1 = 3 - 1 = 2;
k=1 (one 1): [1+3], T(4,1) = 1;
k=2 (two 1's): [1+1+2], T(4,2) = 1;
k=3 (three 1's): none, T(4,3) = 0;
k=4 (four 1's): [1+1+1+1], T(4,4) = 1.
		

Crossrefs

Formula

T(n,k) = (1/n)*Sum_{d|gcd(n,k)} phi(d)*A119458(n/d, k/d) for n>=1 and 0 <= k <= n.
G.f.: F(z,t) = Sum_{n >= 0, k >= 0} T(n,k)*z^n*t^k = 1 - Sum_{d>=1} (phi(d)/d)*log(1-A(z^d,t^d)), where A(z,t) = z*(t+1) + z^2*(1-t).

A032190 Number of cyclic compositions of n into parts >= 2.

Original entry on oeis.org

0, 1, 1, 2, 2, 4, 4, 7, 9, 14, 18, 30, 40, 63, 93, 142, 210, 328, 492, 765, 1169, 1810, 2786, 4340, 6712, 10461, 16273, 25414, 39650, 62074, 97108, 152287, 238837, 375166, 589526, 927554, 1459960, 2300347, 3626241, 5721044, 9030450, 14264308, 22542396
Offset: 1

Views

Author

Keywords

Comments

Number of ways to partition n elements into pie slices each with at least 2 elements.
Hackl and Prodinger (2018) indirectly refer to this sequence because their Proposition 2.1 contains the g.f. of this sequence. In the paragraph before this proposition, however, they refer to sequence A000358(n) = a(n) + 1. - Petros Hadjicostas, Jun 04 2019

Crossrefs

a(n) = A000358(n) - 1. Cf. A008965.

Programs

  • Maple
    # formula (5.3) of Daryl Deford for "Number of distinct Lucas tilings of a 1 X n
    # bracelet up to symmetry" in "Enumerating distinct chessboard tilings"
    A032190 := proc(n)
        local a,i,d ;
        a := 0 ;
        for i from 0 to ceil((n-1)/2) do
            for d in numtheory[divisors](i) do
                if modp(igcd(i,n-i),d) = 0 then
                    a := a+(numtheory[phi](d)*binomial((n-i)/d,i/d))/(n-i) ;
                end if;
            end do:
        end do:
        a ;
    end proc:
    seq(A032190(n),n=1..60) ; # R. J. Mathar, Nov 27 2014
  • Mathematica
    nn=40;Apply[Plus,Table[CoefficientList[Series[CycleIndex[CyclicGroup[n],s]/.Table[s[i]->x^(2i)/(1-x^i),{i,1,n}],{x,0,nn}],x],{n,1,nn/2}]] (* Geoffrey Critzer, Aug 10 2013 *)
    A032190[n_] := Module[{a=0, i, d, j, dd}, For[i=1, i <= Ceiling[(n-1)/2], i++, For[dd = Divisors[i]; j=1, j <= Length[dd], j++, d=dd[[j]]; If[Mod[GCD[i, n-i], d] == 0, a = a + (EulerPhi[d]*Binomial[(n-i)/d, i/d])/(n-i)]]]; a]; Table[A032190[n], {n, 1, 60}] (* Jean-François Alcover, Nov 27 2014, after R. J. Mathar *)

Formula

"CIK" (necklace, indistinct, unlabeled) transform of 0, 1, 1, 1...
From Petros Hadjicostas, Sep 10 2017: (Start)
For all the formulas below, assume n >= 1. Here, phi(n) = A000010(n) is Euler's totient function.
a(n) = (1/n) * Sum_{d|n} b(d)*phi(n/d), where b(n) = A001610(n-1).
a(n) = (1/n) * Sum_{d|n} phi(n/d)*(Fibonacci(d-1) + Fibonacci(d+1) - 1) (because of the equation a(n) = A000358(n) - 1 stated in the CROSSREFS section below).
G.f.: -x/(1-x) + Sum_{k>=1} phi(k)/k * log(1/(1-B(x^k))) where B(x) = x*(1+x). (This is a modification of a formula due to Joerg Arndt.)
G.f.: Sum_{k>=1} phi(k)/k * log((1-x^k)/(1-B(x^k))), which agrees with the one in the Encyclopedia of Combinatorial Structures, #764, above. (We have Sum_{n>=1} (phi(n)/n)*log(1-x^n) = -x/(1-x), which follows from the Lambert series Sum_{n>=1} phi(n)*x^n/(1-x^n) = x/(1-x)^2.)
Sum_{d|n} a(d)*d = n*Sum_{d|n} b(d)/d, where b(n) = A001610(n-1).
(End)
a(n) = Sum_{1 <= i <= ceiling((n-1)/2)} [ (1/(n - i)) * Sum_{d|gcd(i, n-i)} phi(d) * binomial((n - i)/d, i/d) ]. (This is a slight variation of DeFord's formula for the number of distinct Lucas tilings of a 1 X n bracelet up to symmetry, where we exclude the case with i = 0 dominoes.) - Petros Hadjicostas, Jun 07 2019

Extensions

Better name from Geoffrey Critzer, Aug 10 2013

A274017 Number of n-bead binary necklaces (no turning over allowed) that avoid the subsequence 110.

Original entry on oeis.org

1, 2, 3, 3, 4, 4, 6, 6, 9, 11, 16, 20, 32, 42, 65, 95, 144, 212, 330, 494, 767, 1171, 1812, 2788, 4342, 6714, 10463, 16275, 25416, 39652, 62076, 97110, 152289, 238839, 375168, 589528, 927556, 1459962, 2300349, 3626243, 5721046, 9030452, 14264310, 22542398, 35646313, 56393863, 89264836, 141358276, 223959712
Offset: 0

Views

Author

Marko Riedel, Jun 06 2016

Keywords

Comments

The pattern in this enumeration must be contiguous (all three values next to each other in one sequence of three letters).
The proofs of all my formulas below become evident once it is realized that A001612(n) gives the number of cyclic sequences of length n consisting of zeros and ones that avoid the pattern 001 (or equivalently, the pattern 110) provided the positions of zeros and ones on a circle are fixed. Everything else follows from the material that can be found in A001612. - Petros Hadjicostas, Jan 11 2017

Examples

			The following necklace
     1-1
    /   \
   0     0
   |     |
   1     1
    \   /
     0-0
contains one instance of the subsequence starting in the upper left corner. Unlike a bracelet, the necklace is oriented.
a(8) = 9: 00000000, 00000001, 00000101, 00001001, 00010001, 00010101, 00100101, 01010101, 11111111.
a(9) = 11: 000000000, 000000001, 000000101, 000001001, 000010001, 000010101, 000100101, 000101001, 001001001, 001010101, 111111111.
		

Crossrefs

Formula

From Petros Hadjicostas, Jan 11 2017: (Start)
For all the formulas below, assume n>=1.
a(n) = 1 + A000358(n). (Notice the different offsets.)
a(n) = 1 + (1/n) * Sum_{d|n} totient(n/d)*(Fibonacci(d-1)+Fibonacci(d+1)).
a(n) = (1/n) * Sum_{d divides n} totient(n/d)*A001612(d).
G.f.: 1/(1-x) + Sum_{k>=1} (phi(k)/k) * log(1/(1-B(x^k))) where B(x) = x*(1+x). (This is a modification of a formula due to Joerg Arndt.)
G.f.: 1 + Sum_{k>=1} (phi(k)/k) * log(1/C(x^k)) where C(x) = (1-x)*(1-B(x)). (End)
a(n) = 1 + (1/n) * Sum_{d|n} A000010(n/d)*A000204(d). [After the second formula above given by Hadjicostas]. - Antti Karttunen, Jan 12 2017
Showing 1-10 of 22 results. Next