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

A052308 Triangle: matrix inverse of A052307.

Original entry on oeis.org

1, -1, 1, 0, -1, 1, 0, 0, -1, 1, 0, 1, -1, -1, 1, 0, 0, 1, -1, -1, 1, 0, -1, 2, 1, -2, -1, 1, 0, -1, 0, 2, 1, -2, -1, 1, 0, 0, -4, 2, 4, 1, -3, -1, 1, 0, 4, -7, -4, 6, 4, 0, -3, -1, 1, 0, 8, -2, -14, -2, 7, 7, 0, -4, -1, 1, 0, 2, 24, -16, -30, 3, 17, 5, -1, -4, -1, 1, 0, -34, 85, 19
Offset: 0

Views

Author

Christian G. Bower, Dec 15 1999

Keywords

Examples

			1; -1,1; 0,-1,1; 0,0,-1,1; 0,1,-1,-1,1; ...
		

Crossrefs

Column 1 in A052309.

A052310 Triangle read by rows: matrix square of A052307.

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 4, 3, 2, 1, 6, 5, 5, 2, 1, 8, 7, 8, 5, 2, 1, 13, 12, 17, 11, 7, 2, 1, 18, 17, 27, 21, 14, 7, 2, 1, 30, 29, 54, 44, 37, 17, 9, 2, 1, 46, 45, 92, 86, 75, 44, 22, 9, 2, 1, 78, 77, 178, 176, 178, 107, 67, 25, 11, 2, 1, 126, 125, 315, 343, 370, 254, 163, 78, 30, 11, 2
Offset: 0

Views

Author

Christian G. Bower, Dec 15 1999

Keywords

Examples

			1; 2,1; 3,2,1; 4,3,2,1; 6,5,5,2,1; ...
		

A051168 Triangular array T(h,k) for 0 <= k <= h read by rows: T(h,k) = number of binary Lyndon words with k ones and h-k zeros.

Original entry on oeis.org

1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 3, 2, 1, 0, 0, 1, 3, 5, 5, 3, 1, 0, 0, 1, 3, 7, 8, 7, 3, 1, 0, 0, 1, 4, 9, 14, 14, 9, 4, 1, 0, 0, 1, 4, 12, 20, 25, 20, 12, 4, 1, 0, 0, 1, 5, 15, 30, 42, 42, 30, 15, 5, 1, 0, 0, 1, 5, 18, 40, 66, 75, 66, 40, 18, 5, 1, 0, 0, 1, 6
Offset: 0

Views

Author

Keywords

Comments

T(h,k) is the number of classes of aperiodic binary words of k ones and h-k zeros; words u,v are in the same class if v is a cyclic permutation of u (e.g., u=111000, v=110001) and a word is aperiodic if not a juxtaposition of 2 or more identical subwords.
T(2n, n), T(2n+1, n), T(n, 3) match A022553, A000108, A001840, respectively. Row sums match A001037.
From R. J. Mathar, Jul 31 2008: (Start)
This triangle may also be regarded as the square array A(r,n), the n-th term of the r-th Witt transform of the all-1 sequence, r >= 1, n >= 0, read by antidiagonals:
This array begins as follows:
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9
0 1 2 3 5 7 9 12 15 18 22 26 30 35 40 45 51 57 63
0 1 2 5 8 14 20 30 40 55 70 91 112 140 168 204 240 285 330
0 1 3 7 14 25 42 66 99 143 200 273 364 476 612 775 969 1197 1463
0 1 3 9 20 42 75 132 212 333 497 728 1026 1428 1932 2583 3384 4389 5598
0 1 4 12 30 66 132 245 429 715 1144 1768 2652 3876 5537 7752 10659 14421 19228
0 1 4 15 40 99 212 429 800 1430 2424 3978 6288 9690 14520 21318 30624 43263 60060
0 1 5 18 55 143 333 715 1430 2700 4862 8398 13995 22610 35530 54477 81719 120175
0 1 5 22 70 200 497 1144 2424 4862 9225 16796 29372 49742 81686 130750 204248
0 1 6 26 91 273 728 1768 3978 8398 16796 32065 58786 104006 178296 297160 482885
0 1 6 30 112 364 1026 2652 6288 13995 29372 58786 112632 208012 371384 643842
0 1 7 35 140 476 1428 3876 9690 22610 49742 104006 208012 400023 742900 1337220
0 1 7 40 168 612 1932 5537 14520 35530 81686 178296 371384 742900 1432613 2674440
...
It is essentially symmetric: A(r,r+i) = A(r,r-i+1).
Some of the diagonals are:
A(r,r+1): A000108
A(r,r): A022553
A(r,r-1): A000108
A(r,r+2): A000150
A(r,r+3): A050181
A(r,r+4): A050182
A(r,r+5): A050183
A(r,r-2): A000150 (End)
Fredman (1975) proved that the number S(n, k, v) of vectors (a_0, ..., a_{n-1}) of nonnegative integer components that satisfy a_0 + ... + a_{n-1} = k and Sum_{i=0..n-1} i*a_i = v (mod n) is given by S(n, k, v) = (1/(n + k)) * Sum_{d | gcd(n, k)} A054533(d, v) * binomial((n + k)/d, k/d) = S(k, n, v). This was also proved by Elashvili et al. (1999), who also proved that S(n, k, v) = Sum_{d | gcd(n, k, v)} S(n/d, k/d, 1). Here, S(n, k, 1) = T(n + k, k). - Petros Hadjicostas, Jul 09 2019

Examples

			Triangle begins with:
h=0: 1
h=1: 1, 1
h=2: 0, 1, 0
h=3: 0, 1, 1, 0
h=4: 0, 1, 1, 1,  0
h=5: 0, 1, 2, 2,  1,  0
h=6: 0, 1, 2, 3,  2,  1, 0
h=7: 0, 1, 3, 5,  5,  3, 1, 0
h=8: 0, 1, 3, 7,  8,  7, 3, 1, 0
h=9: 0, 1, 4, 9, 14, 14, 9, 4, 1, 0
...
T(6,3) counts classes {111000},{110100},{110010}, each of 6 aperiodic. The class {100100} contains 3 periodic words, counted by T(3,1) as {100}, consisting of 3 aperiodic words 100,010,001.
		

Crossrefs

Columns 1-11: A000012, A004526(n-1), A001840(n-4), A006918(n-4), A011795(n-1), A011796(n-6), A011797(n-1), A031164(n-9), A011845, A032168, A032169. See also A000150.

Programs

  • Maple
    A := proc(r,n) local gf,d,genf; genf := 1/(1-x) ; gf := 0 ; for d in numtheory[divisors](r) do gf := gf + numtheory[mobius](d)*(subs(x= x^d,genf))^(r/d) ; od: gf := expand(gf/r) ; coeftayl(gf,x=0,n) ; end proc:
    A051168 := proc(n,k) if n<=1 then 1; elif n=0 or n=k then 0; else A(n-k,k) ; end if;
    end proc:
    seq(seq(A051168(n,k),k=0..n),n=0..10) ; # R. J. Mathar, Mar 29 2011
  • Mathematica
    Table[If[n===0,1,1/n Plus@@(MoebiusMu[ # ]Binomial[n/#,k/# ]&/@ Divisors[GCD[n,k]])],{n,0,12},{k,0,n}] (* Wouter Meeussen, Jul 20 2008 *)
  • PARI
    {T(n, k) = local(A, ps, c); if( k<0 || k>n, 0, if( n==0 && k==0, 1, A = x * O(x^n) + y * O(y^n); ps = 1 - x - y + A; for( m=1, n, for( i=0, m, c = polcoeff( polcoeff(ps, i, x), m-i, y); if( m==n && i==k, break(2), ps *= (1 -y^(m-i) * x^i + A)^c))); -c))} /* Michael Somos, Jul 03 2004 */
    
  • PARI
    T(n,k) = if (n==0, 1, (1/n) * sumdiv(gcd(n,k), d, moebius(d) * binomial(n/d,k/d)));
    tabl(nn) = for (n=0, nn, for (k=0, n, print1(T(n, k), ", ")); print); \\ Michel Marcus, May 16 2018

Formula

T(h, k) = 1 for (h, k) in {(0, 0), (1, 0), (1, 1)}; T(h, k) = 0 if h >= 2 and k = 0 or k = h. Otherwise, T(h, k) = (1/h)*(C(h, k)-S(h, k)), where S(h, k) = Sum_{d <= 2, d|h, d|k} (h/d)*T(h/d, k/d).
1 - x - y = Product_{i,j} (1 - x^i * y^j)^T(i+j, j) where i >= 0, j >= 0 are not both zero. - Michael Somos, Jul 03 2004
The prime rows are given by (1+x)^p/p with noninteger coefficients rounded to zero. E.g., for h = 2 below, (1 + x)^2/2 = (1 + 2*x + x^2)/2 = 0.5 + x + 0.5*x^2 gives (0,1,0). - Tom Copeland, Oct 21 2014
T(n,k) = (1/n) * Sum_{d | gcd(n,k)} mu(d) * binomial(n/d, k/d), for n > 0. - Andrew Howroyd, Mar 26 2017
From Petros Hadjicostas, Jun 16 2019: (Start)
O.g.f. for column k >= 1: (x^k/k) * Sum_{d|k} mu(d)/(1 - x^d)^(k/d).
Bivariate o.g.f.: Sum_{n,k >= 0} T(n, k)*x^n*y^k = 1 - Sum_{d >= 1} (mu(d)/d) *log(1 - x^d * (1 + y^d)).
(End)

A000029 Number of necklaces with n beads of 2 colors, allowing turning over (these are also called bracelets).

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 13, 18, 30, 46, 78, 126, 224, 380, 687, 1224, 2250, 4112, 7685, 14310, 27012, 50964, 96909, 184410, 352698, 675188, 1296858, 2493726, 4806078, 9272780, 17920860, 34669602, 67159050, 130216124, 252745368, 490984488, 954637558, 1857545300
Offset: 0

Views

Author

Keywords

Comments

"Necklaces with turning over allowed" are usually called bracelets. - Joerg Arndt, Jun 10 2016

Examples

			For n=2, the three bracelets are AA, AB, and BB. For n=3, the four bracelets are AAA, AAB, ABB, and BBB. - _Robert A. Russell_, Sep 24 2018
		

References

  • J. L. Fisher, Application-Oriented Algebra (1977), ISBN 0-7002-2504-8, circa p. 215.
  • Martin Gardner, "New Mathematical Diversions from Scientific American" (Simon and Schuster, New York, 1966), pages 245-246.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • N. Zagaglia Salvi, Ordered partitions and colourings of cycles and necklaces, Bull. Inst. Combin. Appl., 27 (1999), 37-40.

Crossrefs

Row sums of triangle in A052307, second column of A081720, column 2 of A051137.
Cf. A000011, A000013, A000031 (turning over not allowed), A001371 (primitive necklaces), A059076, A164090.

Programs

  • Maple
    with(numtheory): A000029 := proc(n) local d,s; if n = 0 then return 1 else if n mod 2 = 1 then s := 2^((n-1)/2) else s := 2^(n/2-2)+2^(n/2-1) fi; for d in divisors(n) do s := s+phi(d)*2^(n/d)/(2*n) od; return s; fi end:
  • Mathematica
    a[0] := 1; a[n_] := Fold[#1 + EulerPhi[#2]2^(n/#2)/(2n) &, If[OddQ[n], 2^((n - 1)/2), 2^(n/2 - 1) + 2^(n/2 - 2)], Divisors[n]]
    mx=40;CoefficientList[Series[(1-Sum[ EulerPhi[n]*Log[1-2*x^n]/n,{n,mx}]+(1+x)^2/(1-2*x^2))/2,{x,0,mx}],x] (* Herbert Kociemba, Nov 02 2016 *)
    a[0] = 1; a[n_] := (1/4)*(Mod[n, 2] + 3)*2^Quotient[n, 2] + DivisorSum[n, EulerPhi[#]*2^(n/#)&]/(2*n); Array[a, 36, 0] (* Jean-François Alcover, Nov 05 2017 *)
  • PARI
    a(n)=if(n<1,!n,(n%2+3)/4*2^(n\2)+sumdiv(n,d,eulerphi(n/d)*2^d)/2/n)
    
  • Python
    from sympy import divisors, totient
    def a(n):
        return 1 if n<1 else ((2**(n//2+1) if n%2 else 3*2**(n//2-1)) + sum(totient(n//d)*2**d for d in divisors(n))//n)//2
    print([a(n) for n in range(51)]) # Indranil Ghosh, Apr 23 2017

Formula

a(n) = Sum_{d divides n} phi(d)*2^(n/d)/(2*n) + either 2^((n - 1)/2) if n odd or 2^(n/2 - 1) + 2^(n/2 - 2) if n even.
G.f.: (1 - Sum_{n>=1} phi(n)*log(1 - 2*x^n)/n + (1 + x)^2/(1 - 2*x^2))/2. - Herbert Kociemba, Nov 02 2016
Equals (A000031 + A164090) / 2 = A000031 - A059076 = A059076 + A164090. - Robert A. Russell, Sep 24 2018
From Richard L. Ollerton, May 04 2021: (Start)
a(0) = 1; a(n) = Sum_{k=1..n} 2^gcd(n,k)/(2*n) + either 2^((n - 1)/2) if n odd or 2^(n/2 - 1) + 2^(n/2 - 2) if n even.
a(0) = 1; a(n) = A000031(n)/2 + (2^floor((n+1)/2) + 2^ceiling((n+1)/2))/4. See A051137. (End)

Extensions

More terms from Christian G. Bower

A047996 Triangle read by rows: T(n,k) is the (n,k)-th circular binomial coefficient, where 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 3, 4, 3, 1, 1, 1, 1, 3, 5, 5, 3, 1, 1, 1, 1, 4, 7, 10, 7, 4, 1, 1, 1, 1, 4, 10, 14, 14, 10, 4, 1, 1, 1, 1, 5, 12, 22, 26, 22, 12, 5, 1, 1, 1, 1, 5, 15, 30, 42, 42, 30, 15, 5, 1, 1, 1, 1, 6, 19, 43, 66, 80, 66, 43, 19, 6, 1, 1, 1, 1, 6, 22
Offset: 0

Views

Author

Keywords

Comments

Equivalently, T(n,k) = number of necklaces with k black beads and n-k white beads (binary necklaces of weight k).
The same sequence arises if we take the table U(n,k) = number of necklaces with n black beads and k white beads and read it by antidiagonals (cf. A241926). - Franklin T. Adams-Watters, May 02 2014
U(n,k) is also equal to the number of ways to express 0 as a sum of k elements in Z/nZ. - Jens Voß, Franklin T. Adams-Watters, N. J. A. Sloane, Apr 30 2014 - May 05 2014. See link ("A Note on Modular Partitions and Necklaces") for proof.
The generating function for column k is given by the substitution x_j -> x^j/(1-x^j) in the cycle index of the Symmetric Group of order k. - R. J. Mathar, Nov 15 2018
From Petros Hadjicostas, Jul 12 2019: (Start)
Regarding the comments above by Voss, Adams-Watters, and Sloane, note that Fredman (1975) proved that the number S(n, k, v) of vectors (a_0, ..., a_{n-1}) of nonnegative integer components that satisfy a_0 + ... + a_{n-1} = k and Sum_{i=0..n-1} i*a_i = v (mod n) is given by S(n, k, v) = (1/(n + k)) * Sum_{d | gcd(n, k)} A054535(d, v) * binomial((n + k)/d, k/d) = S(k, n, v).
This result was also proved by Elashvili et al. (1999), who also proved that S(n, k, v) = Sum_{d | gcd(n, k, v)} S(n/d, k/d, 1). Here, S(n, k, 0) = A241926(n, k) = U(n, k) = T(n + k, k) (where T(n, k) is the current array). Also, S(n, k, 1) = A245558(n, k). See also Panyushev (2011) for more general results and for generating functions.
Finally, note that A054535(d, v) = c_d(v) = Sum_{s | gcd(d,v)} s*Moebius(d/s). These are the Ramanujan sums, which equal also the von Sterneck function c_d(v) = phi(d) * Moebius(d/gcd(d, v))/phi(d/gcd(d, v)). We have A054535(d, v) = A054534(v, d).
It would be interesting to see whether there is a proof of the results by Fredman (1975), Elashvili et al. (1999), and Panyushev (2011) for a general v using Molien series as it is done by Sloane (2014) for the case v = 0 (in which case, A054535(d, 0) = phi(d)). (Even though the columns of array A054535(d, v) start at v = 1, we may start the array at column v = 0 as well.)
(End)
U(n, k) is the number of equivalence classes of k-tuples of residues modulo n, identifying those that differ componentwise by a constant and those that differ by a permutation. - Álvar Ibeas, Sep 21 2021

Examples

			Triangle starts:
[ 0]  1,
[ 1]  1,  1,
[ 2]  1,  1,  1,
[ 3]  1,  1,  1,  1,
[ 4]  1,  1,  2,  1,  1,
[ 5]  1,  1,  2,  2,  1,  1,
[ 6]  1,  1,  3,  4,  3,  1,  1,
[ 7]  1,  1,  3,  5,  5,  3,  1,  1,
[ 8]  1,  1,  4,  7, 10,  7,  4,  1,  1,
[ 9]  1,  1,  4, 10, 14, 14, 10,  4,  1,  1,
[10]  1,  1,  5, 12, 22, 26, 22, 12,  5,  1, 1,
[11]  1,  1,  5, 15, 30, 42, 42, 30, 15,  5, 1, 1,
[12]  1,  1,  6, 19, 43, 66, 80, 66, 43, 19, 6, 1, 1, ...
		

References

  • N. G. de Bruijn, Polya's theory of counting, in: Applied Combinatorial Mathematics (E. F. Beckenbach, ed.), John Wiley and Sons, New York, 1964, pp. 144-184 (implies g.f. for this triangle).
  • Richard Stanley, Enumerative Combinatorics, 2nd. ed., Vol 1, Chapter I, Problem 105, pp. 122 and 168, discusses the number of subsets of Z/nZ that add to 0. - N. J. A. Sloane, May 06 2014
  • J. Voß, Posting to Sequence Fans Mailing List, April 30, 2014.
  • H. S. Wilf, personal communication to N. J. A. Sloane, Nov., 1990.
  • See A000031 for many additional references and links.

Crossrefs

Row sums: A000031. Columns 0-12: A000012, A000012, A004526, A007997(n+5), A008610, A008646, A032191-A032197.
See A037306 and A241926 for essentially identical triangles.
See A245558, A245559 for a closely related array.

Programs

  • Maple
    A047996 := proc(n,k) local C,d; if k= 0 then return 1; end if; C := 0 ; for d in numtheory[divisors](igcd(n,k)) do C := C+numtheory[phi](d)*binomial(n/d,k/d) ; end do: C/n ; end proc:
    seq(seq(A047996(n,k),k=0..n),n=0..10) ; # R. J. Mathar, Apr 14 2011
  • Mathematica
    t[n_, k_] := Total[EulerPhi[#]*Binomial[n/#, k/#] & /@ Divisors[GCD[n, k]]]/n; t[0, 0] = 1; Flatten[Table[t[n, k], {n, 0, 13}, {k, 0, n}]] (* Jean-François Alcover, Jul 19 2011, after given formula *)
  • PARI
    p(n) = if(n<=0, n==0, 1/n * sum(i=0,n-1, (x^(n/gcd(i,n))+1)^gcd(i,n) ));
    for (n=0,17, print(Vec(p(n)))); /* print triangle */
    /* Joerg Arndt, Sep 28 2012 */
    
  • PARI
    T(n,k) = if(n<=0, n==0, 1/n * sumdiv(gcd(n,k), d, eulerphi(d)*binomial(n/d,k/d) ) );
    /* print triangle: */
    { for (n=0, 17, for (k=0, n, print1(T(n,k),", "); ); print(); ); }
    /* Joerg Arndt, Oct 21 2012 */

Formula

T(n, k) = (1/n) * Sum_{d | (n, k)} phi(d)*binomial(n/d, k/d).
T(2*n,n) = A003239(n); T(2*n+1,n) = A000108(n). - Philippe Deléham, Jul 25 2006
G.f. for row n (n>=1): (1/n) * Sum_{i=0..n-1} ( x^(n/gcd(i,n)) + 1 )^gcd(i,n). - Joerg Arndt, Sep 28 2012
G.f.: Sum_{n, k >= 0} T(n, k)*x^n*y^k = 1 - Sum_{s>=1} (phi(s)/s)*log(1-x^s*(1+y^s)). - Petros Hadjicostas, Oct 26 2017
Product_{d >= 1} (1 - x^d - y^d) = Product_{i,j >= 0} (1 - x^i*y^j)^T(i+j, j), where not both i and j are zero. (It follows from Somos' infinite product for array A051168.) - Petros Hadjicostas, Jul 12 2019

Extensions

Name edited by Petros Hadjicostas, Nov 16 2017

A005232 Expansion of (1-x+x^2)/((1-x)^2*(1-x^2)*(1-x^4)).

Original entry on oeis.org

1, 1, 3, 4, 8, 10, 16, 20, 29, 35, 47, 56, 72, 84, 104, 120, 145, 165, 195, 220, 256, 286, 328, 364, 413, 455, 511, 560, 624, 680, 752, 816, 897, 969, 1059, 1140, 1240, 1330, 1440, 1540, 1661, 1771, 1903, 2024, 2168, 2300, 2456, 2600, 2769, 2925, 3107, 3276
Offset: 0

Views

Author

Keywords

Comments

Also number of n X 2 binary matrices under row and column permutations and column complementations (if offset is 0).
Also Molien series for certain 4-D representation of dihedral group of order 8.
With offset 4, number of bracelets (turnover necklaces) of n-bead of 2 colors with 4 red beads. - Washington Bomfim, Aug 27 2008
From Vladimir Shevelev, Apr 23 2011: (Start)
Also number of non-equivalent necklaces of 4 beads each of them painted by one of n colors.
The sequence solves the so-called Reis problem about convex k-gons in case k=4 (see our comment to A032279). (End)
Number of 2 X 2 matrices with nonnegative integer values totaling n under row and column permutations. - Gabriel Burns, Nov 08 2016
From Petros Hadjicostas, Jan 12 2019: (Start)
By "necklace", Vladimir Shevelev (above) means "turnover necklace", i.e., a bracelet. Zagaglia Salvi (1999) also uses this terminology: she calls a bracelet "necklace" and a necklace "cycle".
According to Cyvin et al. (1997), the sequence (a(n): n >= 0) consists of "the total numbers of isomers of polycyclic conjugated hydrocarbons with q + 1 rings and q internal carbons in one ring (class Q_q)", where q = 4 and n is the hydrogen content (i.e., we count certain isomers of C_{n+2*q} H_n with q = 4 and n >= 0). (End)

Examples

			G.f. = 1 + x + 3*x^2 + 4*x^3 + 8*x^4 + 10*x^5 + 16*x^6 + 20*x^7 + 29*x^8 + ...
There are 8 4 X 2 matrices up to row and column permutations and column complementations:
  [1 1] [1 0] [1 0] [0 1] [0 1] [0 1] [0 1] [0 0]
  [1 1] [1 1] [1 0] [1 0] [1 0] [1 0] [0 1] [0 1]
  [1 1] [1 1] [1 1] [1 1] [1 0] [1 0] [1 0] [1 0]
  [1 1] [1 1] [1 1] [1 1] [1 1] [1 0] [1 0] [1 1].
There are 8 2 X 2 matrices of nonnegative integers totaling 4 up to row and column permutations:
  [4 0] [3 1] [2 2] [2 1] [2 1] [3 0] [2 0] [1 1]
  [0 0] [0 0] [0 0] [0 1] [1 0] [1 0] [2 0] [1 1].
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • N. Zagaglia Salvi, Ordered partitions and colourings of cycles and necklaces, Bull. Inst. Combin. Appl., 27 (1999), 37-40.

Crossrefs

Row n=2 of A343875.
Column k=4 of A052307.

Programs

  • Maple
    A005232:=-(-1-z-2*z**3+2*z**2+z**7-2*z**6+2*z**4)/(z**2+1)/(1+z)**2/(z-1)**4; # conjectured by Simon Plouffe in his 1992 dissertation; gives sequence apart from an initial 1
  • Mathematica
    k = 4; Table[(Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n + Binomial[If[OddQ[n], n - 1, n - If[OddQ[k], 2, 0]]/2, If[OddQ[k], k - 1, k]/2])/2, {n, k, 50}] (* Robert A. Russell, Sep 27 2004 *)
    CoefficientList[ Series[(1 - x + x^2)/((1 - x)^2(1 - x^2)(1 - x^4)), {x, 0, 51}], x] (* Robert G. Wilson v, Mar 29 2006 *)
    LinearRecurrence[{2,0,-2,2,-2,0,2,-1},{1,1,3,4,8,10,16,20},60] (* Harvey P. Dale, Oct 24 2012 *)
    k=4 (* Number of red beads in bracelet problem *); CoefficientList[Series[(1/k Plus@@(EulerPhi[#] (1-x^#)^(-(k/#))&/@Divisors[k])+(1+x)/(1-x^2)^Floor[(k+2)/2])/2,{x,0,50}],x] (* Herbert Kociemba, Nov 04 2016 *)
  • PARI
    {a(n) = (n^3 + 9*n^2 + (32-9*(n%2))*n + [48, 15, 36, 15][n%4+1]) / 48}; \\ Michael Somos, Feb 01 2007
    
  • PARI
    {a(n) = my(s=1); if( n<-5, n = -6-n; s=-1); if( n<0, 0, s * polcoeff( (1 - x + x^2) / ((1 - x)^2 * (1 - x^2) * (1 - x^4)) + x * O(x^n), n))}; \\ Michael Somos, Feb 01 2007
    
  • PARI
    a(n) = round((n^3 +9*n^2 +(32-9*(n%2))*n)/48 +0.6) \\ Washington Bomfim, Jul 17 2008
    
  • PARI
    a(n) = ceil((n+1)*(2*n^2+16*n+39+9*(-1)^n)/96) \\ Tani Akinari, Aug 23 2013
    
  • Python
    a=lambda n: sum((k//2+1)*((n-k)//2+1) for k in range((n-1)//2+1))+(n+1)%2*(((n//4+1)*(n//4+2))//2)  # Gabriel Burns, Nov 08 2016

Formula

G.f.: (1+x^3)/((1-x)*(1-x^2)^2*(1-x^4)).
G.f.: (1/8)*(1/(1-x)^4+3/(1-x^2)^2+2/(1-x)^2/(1-x^2)+2/(1-x^4)). - Vladeta Jovovic, Aug 05 2000
Euler transform of length 6 sequence [ 1, 2, 1, 1, 0, -1 ]. - Michael Somos, Feb 01 2007
a(2n+1) = A006918(2n+2)/2;
a(2n) = (A006918(2n+1) + A008619(n))/2.
a(n) = -a(-6 - n) for all n in Z. - Michael Somos, Feb 05 2011
From Vladimir Shevelev, Apr 22 2011: (Start)
if n == 0 (mod 4), then a(n) = n*(n^2-3*n+8)/48;
if n == 1, 3 (mod 4), then a(n) = (n^2-1)*(n-3)/48;
if n == 2 (mod 4), then a(n) = (n-2)*(n^2-n+6)/48. (End)
a(n) = 2*a(n-1) - 2*a(n-3) + 2*a(n-4) - 2*a(n-5) + 2*a(n-7) - a(n-8) with a(0) = 1, a(1) = 1, a(2) = 3, a(3) = 4, a(4) = 8, a(5) = 10, a(6) = 16, a(7) = 20. - Harvey P. Dale, Oct 24 2012
a(n) = ((n+3)*(2*n^2+12*n+19+9*(-1)^n) + 6*(-1)^((2*n-1+(-1)^n)/4)*(1+(-1)^n))/96. - Luce ETIENNE, Mar 16 2015
a(n) = |A128498(n)| + |A128498(n-3)|. - R. J. Mathar, Jun 11 2019

Extensions

Sequence extended by Christian G. Bower

A037306 Triangle T(n,k) read by rows: the number of compositions of n into k parts, modulo cyclic shifts.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 3, 4, 3, 1, 1, 1, 3, 5, 5, 3, 1, 1, 1, 4, 7, 10, 7, 4, 1, 1, 1, 4, 10, 14, 14, 10, 4, 1, 1, 1, 5, 12, 22, 26, 22, 12, 5, 1, 1, 1, 5, 15, 30, 42, 42, 30, 15, 5, 1, 1, 1, 6, 19, 43, 66, 80, 66, 43, 19, 6, 1, 1, 1, 6, 22, 55, 99, 132, 132, 99, 55, 22, 6, 1
Offset: 1

Views

Author

Jens Voß, Jun 30 2001

Keywords

Comments

Triangle obtained from A047996 by dropping the first column (k=0), and row (n=0).
T(n, k) = number of different ways the number n can be expressed as ordered sums of k positive integers, counting only once those ordered sums that can be transformed into each other by a cyclic permutation.
These might be described as cyclic compositions, or more loosely as cyclic partitions. - N. J. A. Sloane, Sep 05 2012

Examples

			Triangle begins
  1;
  1,  1;
  1,  1,  1;
  1,  2,  1,  1;
  1,  2,  2,  1,  1;
  1,  3,  4,  3,  1,  1;
  1,  3,  5,  5,  3,  1,  1;
  1,  4,  7, 10,  7,  4,  1,  1;
  1,  4, 10, 14, 14, 10,  4,  1,  1;
  1,  5, 12, 22, 26, 22, 12,  5,  1,  1;
  1,  5, 15, 30, 42, 42, 30, 15,  5,  1,  1;
T(6,3) = 4, since there are 4 essentially different ways 1+1+4, 1+2+3, 1+3+2 and 2+2+2 of expressing 6 as a sum of 3 summands (all others can be obtained by cyclically permuting the summands in one of the above sums).
		

References

  • N. Zagaglia Salvi, Ordered partitions and colourings of cycles and necklaces, Bull. Inst. Combin. Appl., 27 (1999), 37-40.

Crossrefs

A047996 and A241926 are essentially identical to this entry.
Cf. A008965 (row sums), A000010, A007318, A027750, A215251, A004526 (column 2), A007997 (column 3), A008610 (column 4), A008646 (column 5), A032191 (column 6).
See A245558, A245559 for a closely related array.
See A052307 for compositions modulo cyclic shifts and reversal.

Programs

  • Haskell
    a037306 n k = div (sum $ map f $ a027750_row $ gcd n k) n where
       f d = a000010 d * a007318' (div n d) (div k d)
    a037306_row n = map (a037306 n) [1..n]
    a037306_tabl = map a037306_row [1..]
    -- Reinhard Zumkeller, Feb 06 2014
    
  • Maple
    A037306 := proc(n,k) local a,d; a := 0; for d in numtheory[divisors]( igcd(n,k)) do a := a+numtheory[phi](d)*binomial(n/d,k/d); end do: a/n; end proc:
    seq(seq(A037306(n,k), k=1..n), n=1..20); # R. J. Mathar, Jun 11 2011
  • Mathematica
    t[n_, k_] := Total[EulerPhi[#]*Binomial[n/#, k/#] & /@ Divisors[GCD[n, k]]]/n; Flatten[Table[t[n, k], {n, 13}, {k, n}]] (* Jean-François Alcover, Sep 08 2011, after formula *)
    nn=15;f[list_]:=Select[list,#>0&];Map[f,Transpose[Table[Drop[CoefficientList[Series[CycleIndex[CyclicGroup[n],s]/.Table[s[i]->x^i/(1-x^i),{i,1,n}],{x,0,nn}],x],1],{n,1,nn}]]]//Grid  (* Geoffrey Critzer, Oct 30 2012 *)
  • PARI
    T(n, k) = sumdiv(gcd(n,k), d, eulerphi(d)*binomial(n/d, k/d))/n; \\ Michel Marcus, Feb 10 2016

Formula

T(n,k) = (Sum_{d|gcd(n,k)} phi(d)*binomial(n/d,k/d))/n, where phi = A000010 = Euler's totient function. Also T(n,k) = A047996(n,k). - Paul Weisenhorn, Apr 06 2011

Extensions

More terms from David Wasserman, Mar 11 2002
Comments, reference, example from Paul Weisenhorn, Dec 18 2010

A005513 Number of n-bead bracelets (turnover necklaces) of two colors with 6 red beads and n-6 black beads.

Original entry on oeis.org

1, 1, 4, 7, 16, 26, 50, 76, 126, 185, 280, 392, 561, 756, 1032, 1353, 1782, 2277, 2920, 3652, 4576, 5626, 6916, 8372, 10133, 12103, 14448, 17063, 20128, 23528, 27474, 31824, 36822, 42315, 48564, 55404, 63133, 71554, 81004
Offset: 6

Views

Author

Keywords

Comments

From Vladimir Shevelev, Apr 23 2011: (Start)
Also number of non-equivalent (turnover) necklaces of 6 beads each of them painted by one of n colors.
The sequence solves the so-called Reis problem about convex k-gons in case k=6 (see our comment to A032279).
(End)
Also number of reverse invariant anonymous and neutral equivalence classes of preference profiles with 3 alternatives and (n-6) agents (IANC model). - Alexander Karpov, Apr 12 2018
Also the number of weighted cubic graphs with weight n derived from one of the 2 cubic graphs on 6 vertices (contributing to A321306). - R. J. Mathar, Nov 05 2018

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • N. Zagaglia Salvi, Ordered partitions and colourings of cycles and necklaces, Bull. Inst. Combin. Appl., 27 (1999), 37-40.

Crossrefs

Column k=6 of A052307.

Programs

  • Maple
    A005513 := proc(n) if n mod 6 = 0 then (24*binomial(n-1,5)+3*(n+1)*(n-2)*(n-4)+16*n)/288 elif n mod 6 = 3 then (24*binomial(n-1,5)+3*(n-1)*(n-3)*(n-5)+16*n-48)/288 elif n mod 6 = 2 or n mod 6 = 4 then (8*binomial(n-1,5)+(n+1)*(n-2)*(n-4))/96 elif n mod 6 = 1 or n mod 6 = 5 then (8*binomial(n-1,5)+(n-1)*(n-3)*(n-5))/96 fi: end: seq(A005513(n),n=6..44); # Johannes W. Meijer, Aug 11 2011
  • Mathematica
    k = 6; Table[(Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n + Binomial[If[OddQ[n], n - 1, n - If[OddQ[k], 2, 0]]/2, If[OddQ[k], k - 1, k]/2])/2, {n, k, 50}] (* Robert A. Russell, Sep 27 2004 *)
    k=6; CoefficientList[Series[x^k*(1/k Plus@@(EulerPhi[#] (1-x^#)^(-(k/#))&/@Divisors[k])+(1+x)/(1-x^2)^Floor[(k+2)/2])/2,{x,0,50}],x] (* Herbert Kociemba, Nov 04 2016 *)
    CoefficientList[Series[(1/12) (1/(1 - x)^6 + 4/(1 - x^2)^3 + 2/(1 - x^3)^2 + 3/((1 - x)^2 (1 - x^2)^2) + 2/(1 - x^6)), {x, 0, 43}], x] (* Vincenzo Librandi, Apr 24 2018 *)

Formula

S. J. Cyvin et al. (1997) give a g.f.
G.f.: (x^6/12)*(1/(1-x)^6+4/(1-x^2)^3+2/(1-x^3)^2+3/((1-x)^2*(1-x^2)^2)+2/(1-x^6)). - Vladeta Jovovic, Feb 28 2007
G.f.: x^6*(1-x+x^2+x^3+2*x^4+2*x^6+x^8-x^5) / ( (x^2-x+1)*(1+x+x^2)^2*(1+x)^3*(x-1)^6 ). - R. J. Mathar, Sep 18 2011
From Vladimir Shevelev, Apr 23 2011: (Start)
if n==0 mod 6, a(n)=(24*C(n-1,5)+3*(n+1)*(n-2)*(n-4)+16*n)/288;
if n==3 mod 6, a(n)=(24*C(n-1,5)+3*(n-1)*(n-3)*(n-5)+16*n-48)/288;
if n==2,4 mod 6, a(n)=(8*C(n-1,5)+(n+1)*(n-2)*(n-4))/96;
if n==1,5 mod 6, a(n)=(8*C(n-1,5)+(n-1)*(n-3)*(n-5))/96.
(End)

Extensions

Sequence extended and description corrected by Christian G. Bower
Name edited by Petros Hadjicostas, Jan 10 2019

A007123 Number of connected unit interval graphs with n nodes; also number of bracelets (turnover necklaces) with n black beads and n-1 white beads.

Original entry on oeis.org

1, 1, 2, 4, 10, 26, 76, 232, 750, 2494, 8524, 29624, 104468, 372308, 1338936, 4850640, 17685270, 64834550, 238843660, 883677784, 3282152588, 12233309868, 45741634536, 171530482864, 644953425740, 2430975800876, 9183681736376, 34766785487152, 131873995933480
Offset: 1

Views

Author

Keywords

Comments

Also number of rooted planar general trees (of n vertices or n-1 edges) up to reflection. - Antti Karttunen, Aug 09 2002 (For the correspondence with bracelets, start by considering Raney's lemma as explained by Graham, Knuth & Patashnik.)
Number of connected lattice path matroids on n elements up to isomorphism.
a(n) = number of noncrossing set partitions of [n] up to reflection (i<->n+1-i). Example: a(4) counts 123, 1-23, 13-2, 1-2-3 but not 12-3 because it is the reflection of 1-23. - David Callan, Oct 08 2005
From Vladimir Shevelev, Apr 23 2011: (Start)
Also number of non-equivalent necklaces of n beads, each of which is painted by one of 2*n-1 colors.
The sequence solves the so-called Reis problem about convex k-gons in case N=2*n-1, k=n. H. Gupta (1979) gave a full solution; I gave a short proof of Gupta's result and showed an equivalence of this problem and each of the following problems: the problem of enumerating the bracelets of n beads of 2 colors, k of them black, and the problem of enumerating the necklaces of k beads, each painted by one of n colors.
a(n) is an essentially unimprovable upper estimate for the number of distinct values of the permanent in (0,1)-circulants of order 2*n-1 with n 1's in every row. (End)
The number of Dyck paths of semilength n-1 up to reversal; that is, the number of Dyck paths of semilength n-1, treating as identical a path and that path when traveled in reverse order. - Noah A Rosenberg, Jan 28 2019

Examples

			x + x^2 + 2*x^3 + 4*x^4 + 10*x^5 + 26*x^6 + 76*x^7 + 232*x^8 + 750*x^9 + ...
		

References

  • S. R. Finch, Mathematical Constants, Cambridge, 2003, Section 5.6.7.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 345 & 346.
  • R. W. Robinson, personal communication.
  • R. W. Robinson, Numerical implementation of graph counting algorithms, AGRC Grant, Math. Dept., Univ. Newcastle, Australia, 1980.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Occurs as row 164 in A073201.
Next-to-center columns of triangle A052307.
Equal to A001405 plus A006079.

Programs

  • Mathematica
    f[k_Integer, n_] := (Plus @@ (EulerPhi[ # ]Binomial[n/#, k/# ] & /@ Divisors[GCD[n, k]])/n + Binomial[(n - If[OddQ@n, 1, If[OddQ@k, 2, 0]])/2, (k - If[OddQ@k, 1, 0])/2])/2 (* Robert A. Russell, Sep 27 2004 *)
    Table[ f[n, 2n - 1], {n, 10}]
    (* Comment from Wouter Meeussen, Feb 02 2013, added by N. J. A. Sloane, Feb 02 2013: To get lists of the necklaces in Mathematica, use (if n=4, say):
    <
    				
  • PARI
    {a(n) = if( n<1, 0, (2 * binomial(n-1, (n-1)\2) + binomial(2*n, n) / (2*n - 1)) / 4)} /* Michael Somos, Apr 16 2012 */
    
  • Python
    from sympy import catalan, binomial, floor
    def a(n): return 1 if n==1 else (catalan(n - 1) + binomial(n - 1, floor((n - 1)/2)))/2 # Indranil Ghosh, Jun 03 2017

Formula

a(n+1) = (Catalan(n) + binomial(n, floor(n/2)))/2 = (A000108(n) + A001405(n))/2. - Antti Karttunen, Aug 09 2002
G.f.: (1 + 2*x - sqrt(1 - 4*x)*sqrt(1 - 4*x^2))/(4*sqrt(1 - 4*x^2)).
G.f.: (sqrt((1 + 2*x) / (1 - 2*x)) - sqrt(1 - 4*x)) / 4. - Michael Somos, Apr 16 2012
a(n) = (A063886(n) - A002420(n)) / 4. - Michael Somos, Apr 16 2012
D-finite with recurrence n*(n-1)*(n-4)*a(n) - 4*(n-1)*(n^2-5*n+5)*a(n-1) - 4*(n-2)*(n^2-7*n+11)*a(n-2) + 8*(2*n-7)*(n-2)*(n-3)*a(n-3)=0. - R. J. Mathar, Aug 22 2018

Extensions

Extended by Christian G. Bower
Edited by Jon E. Schoenfield, Feb 14 2015

A032279 Number of bracelets (turnover necklaces) of n beads of 2 colors, 5 of them black.

Original entry on oeis.org

1, 1, 3, 5, 10, 16, 26, 38, 57, 79, 111, 147, 196, 252, 324, 406, 507, 621, 759, 913, 1096, 1298, 1534, 1794, 2093, 2421, 2793, 3199, 3656, 4152, 4706, 5304, 5967, 6681, 7467, 8311, 9234, 10222, 11298, 12446, 13691, 15015, 16445
Offset: 5

Views

Author

Keywords

Comments

From Vladimir Shevelev, Apr 23 2011: (Start)
Also number of non-equivalent necklaces of 5 beads each of them painted by one of n colors.
The sequence solves the so-called Reis problem about convex k-gons in case k=5. The full solution was given by H. Gupta (1979); I gave a short proof of Gupta's result and showed an equivalence of this problem and every one of the following problems: enumerating the bracelets of n beads of 2 colors, k of them black, and enumerating the necklaces of k beads each of them painted by one of n colors.
a(n) is an essentially unimprovable upper estimate for the number of distinct values of the permanent in (0,1)-circulants of order n with five 1's in every row. (End)
a(n+5) is the number of symmetry-allowed, linearly-independent terms at n-th order in the series expansion of the T_1 X h vibronic perturbation matrix, H(Q) (cf. Dunn & Bates). - Bradley Klee, Jul 20 2015
From Petros Hadjicostas, Jul 17 2018: (Start)
Let (c(n): n >= 1) be a sequence of nonnegative integers and let C(x) = Sum_{n>=1} c(n)*x^n be its g.f. Let k be a positive integer. Let a_k = (a_k(n): n >= 1) be the output sequence of the DIK[k] transform of sequence (c(n): n >= 1), and let A_k(x) = Sum_{n>=1} a_k(n)*x^n be its g.f. See Christian G. Bower's web link below. It can be proved that, when k is odd, A_k(x) = ((1/k)*Sum_{d|k} phi(d)*C(x^d)^(k/d) + C(x^2)^((k-1)/2)*C(x))/2.
For this sequence, k = 5, c(n) = 1 for all n >= 1, and C(x) = x/(1-x). Thus, a(n) = a_5(n) for all n >= 1. Since a_k(n) = 0 for 1 <= n <= k-1, the offset of this sequence is n = k = 5. Applying the formula for the g.f. of DIK[5] of (c(n): n >= 1) with C(x) = x/(1-x) and k = 5, we get A(x) = A_5(x) = x^5*((1/5)*Sum_{d|5} phi(d)*(1-x^d)^(-5/d) + (1+x)/(1-x^2)^3)/2, which obviously equals the g.f. in the formula section below.
The g.f. is also a special case of Herbert Kociemba's formula that is valid for both even and odd k: A_k(x) = x^k*((1/k)*Sum_{d|k} phi(d)*(1-x^d)^(-k/d) + (1+x)/(1-x^2)^Floor[(k+2)/2])/2.
Here, a(n) is defined to be the number of n-bead bracelets of two colors with 5 black beads and n-5 white beads. But it is also the number of dihedral compositions of n with 5 positive parts. (This statement is equivalent to Vladimir Shevelev's statement above that a(n) is the "number of non-equivalent necklaces of 5 beads each of them painted by one of n colors." By "necklaces" he means "turnover necklaces". See paragraph (2) of Section 2 in his 2004 paper in the Indian Journal of Pure and Applied Mathematics.)
Two cyclic compositions of n (with k = 5 parts) belong to the same equivalence class corresponding to a dihedral composition of n if and only if one can be obtained from the other by a rotation or reversal of order. (End)

Examples

			From _Petros Hadjicostas_, Jul 17 2018: (Start)
Every n-bead bracelet of two colors such that 5 beads are black and n-5 are white can be transformed into a dihedral composition of n with 5 positive parts in the following way. Start with one B bead and go in one direction (say clockwise) until you reach the next B bead. Continue this process until you come back to the original B bead.
Let b_i be the number of beads from B bead i until you reach the last W bead before B bead i+1 (or B bead 1). Here, b_i = 1 iff there are no W beads between B bead i and B bead i+1 (or B bead 5 and B bead 1). Then b_1 + b_2 + b_3 + b_4 + b_5 = n, and we get a dihedral composition of n. (Of course, b_2 + b_3 + b_4 + b_5 + b_1 and b_5 + b_4 + b_3 + b_2 + b_1 belong to the same equivalence class of the dihedral composition b_1 + b_2 + b_3 + b_4 + b_5.)
For example, a(8) = 5, and we have the following bracelets with 5 B beads and 3 W beads. Next to the bracelets we list the corresponding dihedral compositions of n with k=5 parts (they must be viewed on a circle):
BBBBBWWW <-> 1+1+1+1+4
BBBBWBWW <-> 1+1+1+2+3
BBWBBBWW <-> 1+2+1+1+3
BWBBWBWB <-> 2+1+2+2+1
BWBWBWBB <-> 2+2+2+1+1
(End)
		

References

  • N. Zagaglia Salvi, Ordered partitions and colourings of cycles and necklaces, Bull. Inst. Combin. Appl., 27 (1999), 37-40.

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(1-x+2*x^3-x^5+x^6)/((1-x)^2*(1-x^2)^2*(1-x^5))); // Vincenzo Librandi, Sep 07 2013
  • Maple
    seq(floor(n^4/240 + n^3/24 + 5*n^2/24 + 25*n/48 + 1 + (-1)^n*n/16), n=0..100); # Robert Israel, Jul 22 2015
  • Mathematica
    k = 5; Table[(Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n + Binomial[If[OddQ[n], n - 1, n - If[OddQ[k], 2, 0]]/2, If[OddQ[k], k - 1, k]/2])/2, {n, k, 50}] (* Robert A. Russell, Sep 27 2004 *)
    CoefficientList[Series[(1 - x + 2 x^3 - x^5 + x^6) / ((1 - x)^2 (1 - x^2)^2 (1 - x^5)), {x, 0, 50}], x] (* Vincenzo Librandi, Sep 07 2013 *)
    k=5 (* Number of black beads in bracelet problem *); CoefficientList[Series[x^k*(1/k Plus@@(EulerPhi[#] (1-x^#)^(-(k/#))&/@Divisors[k])+(1+x)/(1-x^2)^Floor[(k+2)/2])/2,{x,0,50}],x] (* Herbert Kociemba, Nov 04 2016 *)
  • PARI
    a(n) = round((n^4 -10*n^3 +50*n^2 -(110+30*(1-n%2))*n)/240 +3/5) \\ Washington Bomfim, Jul 17 2008
    

Formula

"DIK[ 5 ]" (necklace, indistinct, unlabeled, 5 parts) transform of 1, 1, 1, 1, ...
G.f.: x^5*(1-x+2*x^3-x^5+x^6)/((1-x)^2*(1-x^2)^2*(1-x^5)). - corrected for offset 5 by Robert Israel, Jul 22 2015
From Vladimir Shevelev, Apr 23 2011: (Start)
Put s(n,k,d)=1, if n == k (mod d), and 0, otherwise. Then
a(n) = (2/5)*s(n,0,5) + (n-1)*(n-3)*((n-2)*(n-4) + 15)/240, if n is odd >= 5;
a(n) = (2/5)*s(n,0,5) + (n-2)*(n-4)*((n-1)*(n-3) + 15)/240, if n is even >= 5. (End)
a(n+5) = floor(n^4/240 + n^3/24 + 5*n^2/24 + 25*n/48 + 1 + (-1)^n*n/16). - Robert Israel, Jul 22 2015
a(n) = (A008646(n-5) + A119963(n, 5))/2 = (A008646(n-5) + C(floor((n-1)/2), 2))/2 for n >= 5. - Petros Hadjicostas, Jul 17 2018
Showing 1-10 of 26 results. Next