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.

Previous Showing 21-30 of 45 results. Next

A084708 Number of set partitions up to rotations and reflections.

Original entry on oeis.org

1, 2, 3, 7, 12, 37, 93, 354, 1350, 6351, 31950, 179307, 1071265, 6845581, 46162583, 327731950, 2437753740, 18948599220, 153498350745, 1293123243928, 11306475314467, 102425554299516, 959826755336242, 9290811905391501
Offset: 1

Views

Author

Wouter Meeussen, Jul 02 2003

Keywords

Comments

Combines the symmetry operations of A080107 and A084423.
Equivalently, number of n-bead bracelets using any number of unlabeled (interchangable) colors. - Andrew Howroyd, Sep 25 2017

Examples

			SetPartitions[6] is the first to decompose differently from A084423: 4 cycles of length 1, 2 of 2, 9 of 3, 16 of 6, 6 of 12.
a(7) = 1 + A056357(7) + A056358(7) + A056359(7) + A056360(7) + A056361(7) + 1 = 1 + 8 + 31 + 33 + 16 + 3 + 1 = 93.
		

Crossrefs

Programs

  • Mathematica
    <A080107 *); Table[{Length[ # ], First[ # ]}&/@ Split[Sort[Length/@Split[Sort[First[Sort[Flatten[ {#, Map[Sort, (#/. i_Integer:>w+1-i), 2]}& @(NestList[Sort[Sort/@(#/. i_Integer :> Mod[i+1, w, 1])]&, #, w]), 1]]]&/@SetPartitions[w]]]]], {w, 1, 10}]
    u[0,j_]:=1;u[k_,j_]:=u[k,j]=Sum[Binomial[k-1,i-1]Plus@@(u[k-i,j]#^(i-1)&/@Divisors[j]),{i,k}]; a[n_]:=1/n*Plus@@(EulerPhi[ # ]u[Quotient[n,# ],# ]&/@Divisors[n]); Table[a[n]/2+If[EvenQ[n],u[n/2,2],Sum[Binomial[n/2-1/2,k] u[k,2], {k,0,n/2-1/2}]]/2,{n,40}] (* Wouter Meeussen, Dec 06 2008 *)

Formula

a(n) = (A080107(n)+A084423(n))/2. - Wouter Meeussen and Vladeta Jovovic, Nov 28 2008

Extensions

a(12) from Vladeta Jovovic, Jul 15 2007
More terms from Vladeta Jovovic's formula given in Mathematica line. - Wouter Meeussen, Dec 06 2008

A056294 Number of n-bead necklace structures using a maximum of six different colored beads.

Original entry on oeis.org

1, 2, 3, 7, 12, 43, 126, 539, 2304, 11023, 54682, 284071, 1509852, 8195029, 45080666, 250641895, 1404374248, 7917211349, 44848645458, 255055231763, 1455247360128, 8326191290585, 47752990403134
Offset: 1

Views

Author

Keywords

Comments

Turning over the necklace is not allowed. Colors may be permuted without changing the necklace structure.
The second Mathematica program uses Gilbert and Riordan's recurrence formula, which they recommend for calculations. - Robert A. Russell, Feb 24 2018

References

  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]

Crossrefs

Programs

  • Mathematica
    Adn[d_, n_] := Module[{ c, t1, t2}, t2 = 0; For[c = 1, c <= d, c++, If[Mod[d, c] == 0 , t2 = t2 + (x^c/c)*(E^(c*z) - 1)]]; t1 = E^t2; t1 = Series[t1, {z, 0, n+1}]; Coefficient[t1, z, n]*n!]; Pn[n_] := Module[{ d, e, t1}, t1 = 0; For[d = 1, d <= n, d++, If[Mod[n, d] == 0, t1 = t1 + EulerPhi[d]*Adn[d, n/d]/n]]; t1/(1 - x)]; Pnq[n_, q_] := Module[{t1}, t1 = Series[Pn[n], {x, 0, q+1}] ; Coefficient[t1, x, q]]; a[n_] := Pnq[n, 6]; Table[Print[an = a[n]]; an, {n, 1, 23}] (* Jean-François Alcover, Oct 04 2013, after N. J. A. Sloane's Maple code *)
    Adn[d_, n_] := Adn[d, n] = If[1==n, DivisorSum[d, x^# &], Expand[Adn[d, 1] Adn[d, n-1] + D[Adn[d, n-1], x] x]];
    Table[SeriesCoefficient[DivisorSum[n, EulerPhi[#] Adn[#, n/#] &] /(n (1 - x)), {x, 0, 6}], {n, 1, 40}] (* Robert A. Russell, Feb 24 2018 *)
    From Robert A. Russell, May 29 2018: (Start)
    Table[(1/n) DivisorSum[n, EulerPhi[#] Which[Divisible[#, 60], 6 StirlingS2[n/#+5, 6] - 90 StirlingS2[n/#+4, 6] + 510 StirlingS2[n/#+3, 6] - 1350 StirlingS2[n/#+2, 6] + 1644 StirlingS2[n/#+1, 6] - 720 StirlingS2[n/#, 6], Divisible[#, 30], 5 StirlingS2[n/#+5, 6] - 77 StirlingS2[n/#+4, 6] + 451 StirlingS2[n/#+3, 6] - 1243 StirlingS2[n/#+2, 6] + 1584 StirlingS2[n/#+1, 6] - 720 StirlingS2[n/#, 6], Divisible[#, 20], 4 StirlingS2[n/#+5, 6] - 62 StirlingS2[n/#+4, 6] + 364 StirlingS2[n/#+3, 6] - 998 StirlingS2[n/#+2, 6] + 1252 StirlingS2[n/#+1, 6] - 560 StirlingS2[n/#, 6], Divisible[#, 15], 3 StirlingS2[n/#+5, 6] - 48 StirlingS2[n/#+4, 6] + 291 StirlingS2[n/#+3, 6] - 825 StirlingS2[n/#+2, 6] + 1074 StirlingS2[n/#+1, 6] - 495 StirlingS2[n/#, 6], Divisible[#, 12], 5 StirlingS2[n/#+5, 6] - 76 StirlingS2[n/#+4, 6] + 439 StirlingS2[n/#+3, 6] - 1196 StirlingS2[n/#+2, 6] + 1524 StirlingS2[n/#+1, 6] - 720 StirlingS2[n/#, 6], Divisible[#, 10], 3 StirlingS2[n/#+5, 6] - 49 StirlingS2[n/#+4, 6] + 305 StirlingS2[n/#+3, 6] - 891 StirlingS2[n/#+2, 6] + 1192 StirlingS2[n/#+1, 6] - 560 StirlingS2[n/#, 6], Divisible[#, 6], 4 StirlingS2[n/#+5, 6] - 63 StirlingS2[n/#+4, 6] + 380 StirlingS2[n/#+3, 6] - 1089 StirlingS2[n/#+2, 6] + 1464 StirlingS2[n/#+1, 6] - 720 StirlingS2[n/#, 6], Divisible[#, 5], 2 StirlingS2[n/#+5, 6] - 33 StirlingS2[n/#+4, 6] + 209 StirlingS2[n/#+3, 6] - 629 StirlingS2[n/#+2, 6] + 886 StirlingS2[n/#+1, 6] - 455 StirlingS2[n/#, 6], Divisible[#, 4], 3 StirlingS2[n/#+5, 6] - 48 StirlingS2[n/#+4, 6] + 293 StirlingS2[n/#+3, 6] - 844 StirlingS2[n/#+2, 6] + 1132 StirlingS2[n/#+1, 6] - 560 StirlingS2[n/#, 6], Divisible[#, 3], 2 StirlingS2[n/#+5, 6] - 34 StirlingS2[n/#+4, 6] + 220 StirlingS2[n/#+3, 6] - 671 StirlingS2[n/#+2, 6] + 954 StirlingS2[n/#+1, 6] - 495 StirlingS2[n/#, 6], Divisible[#, 2], 2 StirlingS2[n/#+5, 6] - 35 StirlingS2[n/#+4, 6] + 234 StirlingS2[n/#+3, 6] - 737 StirlingS2[n/#+2, 6] + 1072 StirlingS2[n/#+1, 6] - 560 StirlingS2[n/#, 6], True, StirlingS2[n/#+5, 6] - 19 StirlingS2[n/#+4, 6] + 138 StirlingS2[n/#+3, 6] - 475 StirlingS2[n/#+2, 6] + 766 StirlingS2[n/#+1, 6] - 455 StirlingS2[n/#, 6]] &], {n, 1, 40}]
    mx = 40; Drop[CoefficientList[Series[1-Sum[(EulerPhi[d] / d) Which[ Divisible[d, 60], Log[1-6x^d], Divisible[d, 30], (3 Log[1-6x^d] + Log[1-2x^d]) / 4, Divisible[d, 20], (5 Log[1-6x^d] + 2 Log[1-3x^d]) / 9, Divisible[d, 15], (5 Log[1-6x^d] + 3 Log[1-4x^d] + 3 Log[1-2x^d]) / 16, Divisible[d, 12], (4 Log[1-6x^d] + Log[1-x^d]) / 5, Divisible[d, 10], (11 Log[1-6x^d] + 8 Log[1-3x^d] + 9 Log[1-2x^d]) / 36, Divisible[d, 6], (11 Log[1-6x^d] + 5 Log[1-2x^d] + 4 Log[1-x^d]) / 20, Divisible[d, 5], (29 Log[1-6x^d] + 3 Log[1-4x^d] + 8 Log[1-3x^d] + 27 Log[1-2x^d] + 24 Log[1-x^d]) / 144, Divisible[d, 4], (16 Log[1-6x^d] + 10 Log[1-3x^d] + 9 Log[1-x^d]) / 45, Divisible[d, 3], (9 Log[1-6x^d] + 15 Log[1-4x^d] + 15 Log[1-2x^d] + 16 Log[1-x^d]) / 80, Divisible[d, 2], (19 Log[1-6x^d] + 40 Log[1-3x^d] + 45 Log[1-2x^d] + 36 Log[1-x^d]) / 180, True, (Log[1-6 x^d] + 15 Log[1-4 x^d] + 40 Log[1-3 x^d] + 135 Log[1-2 x^d] + 264 Log[1-x^d]) / 720], {d, 1, mx}], {x, 0, mx}], x], 1]
    (End)

Formula

Use de Bruijn's generalization of Polya's enumeration theorem as discussed in reference.
From Robert A. Russell, May 29 2018: (Start)
a(n) = (1/n)*Sum_{d|n} phi(d) * ([d==0 mod 60] * (6*S2(n/d + 5, 6) - 90*S2(n/d + 4, 6) + 510*S2(n/d + 3, 6) - 1350*S2(n/d + 2, 6) + 1644*S2(n/d + 1, 6) - 720*S2(n/d, 6)) + [d==30 mod 60] * (5*S2(n/d + 5, 6) - 77*S2(n/d + 4, 6) + 451*S2(n/d + 3, 6) - 1243*S2(n/d + 2, 6) + 1584*S2(n/d + 1, 6) - 720*S2(n/d, 6)) + [d==20 mod 60 | d==40 mod 60] * (4*S2(n/d + 5, 6) - 62*S2(n/d + 4, 6) + 364*S2(n/d + 3, 6) - 998*S2(n/d + 2, 6) + 1252*S2(n/d + 1, 6) - 560*S2(n/d, 6)) + [d==15 mod 60 | d==45 mod 60] * (3*S2(n/d + 5, 6) - 48*S2(n/d + 4, 6) + 291*S2(n/d + 3, 6) - 825*S2(n/d + 2, 6) + 1074*S2(n/d + 1, 6) - 495*S2(n/d, 6)) + [d mod 60 in {12,24,36,48}] * (5*S2(n/d + 5, 6) - 76*S2(n/d + 4, 6) + 439*S2(n/d + 3, 6) - 1196*S2(n/d + 2, 6) + 1524*S2(n/d + 1, 6) - 720*S2(n/d, 6)) + [d=10 mod 60 | d==50 mod 60] * (3*S2(n/d +5 , 6) - 49*S2(n/d + 4, 6) + 305*S2(n/d + 3, 6) - 891*S2(n/d + 2, 6) + 1192*S2(n/d + 1, 6) - 560*S2(n/d, 6)) + [d mod 60 in {6,18,42,54}] * (4*S2(n/d + 5, 6) - 63*S2(n/d + 4, 6) + 380*S2(n/d + 3, 6) - 1089*S2(n/d + 2, 6) + 1464*S2(n/d + 1, 6) - 720*S2(n/d, 6)) + [d mod 60 in {5,25,35,55}] * (2*S2(n/d + 5, 6) - 33*S2(n/d + 4, 6) + 209*S2(n/d + 3, 6) - 629*S2(n/d + 2, 6) + 886*S2(n/d + 1, 6) - 455*S2(n/d, 6)) + [d mod 60 in {4,8,16,28,32,44,52,56}] * (3*S2(n/d + 5, 6) - 48*S2(n/d + 4, 6) + 293*S2(n/d + 3, 6) - 844*S2(n/d + 2, 6) + 1132*S2(n/d + 1, 6) - 560*S2(n/d, 6)) + [d mod 60 in {3,9,21,27,33,39,51,57}] * (2*S2(n/d + 5, 6) - 34*S2(n/d + 4, 6) + 220*S2(n/d + 3, 6) - 671*S2(n/d + 2, 6) + 954*S2(n/d + 1, 6) - 495*S2(n/d, 6)) + [d mod 60 in {2,14,22,26,34,38,46,58}] * (2*S2(n/d + 5, 6) - 35*S2(n/d + 4, 6) + 234*S2(n/d + 3, 6) - 737*S2(n/d + 2, 6) + 1072*S2(n/d + 1, 6) - 560*S2(n/d, 6)) + [d mod 60 in {1,7,11,13,17,19,23,29,31,37,41,43,47,49,53,59}] *
(S2[n/d + 5, 6) - 19*S2(n/d + 4, 6) + 138*S2(n/d + 3, 6) -
475*S2(n/d + 2, 6) + 766*S2(n/d + 1,6) - 455*S2(n/d, 6))), where S2(n,k) is the Stirling subset number, A008277.
G.f.: 1 - Sum_{d>0} (phi(d) / d) * ([d==0 mod 60] * log(1-6x^d) + [d==30 mod 60] * (3*log(1-6x^d) + log(1-2x^d)) / 4 + [d==20 mod 60 | d==40 mod 60] * (5*log(1-6x^d) + 2*log(1-3x^d)) / 9 + [d==15 mod 60 | d==45 mod 60] * (5*log(1-6x^d) + 3*log(1-4x^d) + 3*log(1-2x^d)) / 16 + [d mod 60 in {12,24,36,48}] * (4*log(1-6x^d) + log(1-x^d)) / 5 + [d=10 mod 60 | d==50 mod 60] * (11*log(1-6x^d) + 8*log(1-3x^d) + 9*log(1-2x^d)) / 36 + [d mod 60 in {6,18,42,54}] * (11*log(1-6x^d) + 5*log(1-2x^d) + 4*log(1-x^d)) / 20 + [d mod 60 in {5,25,35,55}] * (29*log(1-6x^d) + 3*log(1-4x^d) + 8*log(1-3x^d) + 27*log(1-2x^d) + 24*log(1-x^d)) / 144 + [d mod 60 in {4,8,16,28,32,44,52,56}] * (16*log(1-6x^d) + 10*log(1-3x^d) + 9*log(1-x^d)) / 45 + [d mod 60 in {3,9,21,27,33,39,51,57}] * (9*log(1-6x^d) + 15*log(1-4x^d) + 15*log(1-2x^d) + 16*log(1-x^d)) / 80 + [d mod 60 in {2,14,22,26,34,38,46,58}] * (19*log(1-6x^d) + 40*log(1-3x^d) + 45*log(1-2x^d) + 36*log(1-x^d)) / 180 + [d mod 60 in {1,7,11,13,17,19,23,29,31,37,41,43,47,49,53,59}] * (log(1-6x^d) + 15*log(1-4x^d) + 40*log(1-3x^d) + 135*log(1-2x^d) + 264*log(1-x^d)) / 720).
(End)

A056296 Number of n-bead necklace structures using exactly three different colored beads.

Original entry on oeis.org

0, 0, 1, 2, 5, 18, 43, 126, 339, 946, 2591, 7254, 20125, 56450, 158355, 446618, 1262225, 3580686, 10181479, 29032254, 82968843, 237645250, 682014587, 1960981598, 5647919645, 16292761730, 47069104613, 136166703562, 394418199725, 1143822046786, 3320790074371
Offset: 1

Views

Author

Keywords

Comments

Turning over the necklace is not allowed. Colors may be permuted without changing the necklace structure.

References

  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]

Crossrefs

Column 3 of A152175.

Programs

  • Mathematica
    Adn[d_, n_] := Adn[d, n] = If[1==n, DivisorSum[d, x^# &], Expand[Adn[d, 1] Adn[d, n-1] + D[Adn[d, n-1], x] x]];
    Table[Coefficient[DivisorSum[n, EulerPhi[#] Adn[#, n/#] &]/n , x, 3], {n, 1, 40}] (* Robert A. Russell, Feb 23 2018 *)
    Table[(1/n) DivisorSum[n, EulerPhi[#] Which[Divisible[#,6], StirlingS2[n/#+2,3] - StirlingS2[n/#+1,3], Divisible[#,3], StirlingS2[n/#+2,3] - 3 StirlingS2[n/#+1,3] + 3 StirlingS2[n/#,3], Divisible[#,2], 2 StirlingS2[n/#+1,3] - 2 StirlingS2[n/#,3], True, StirlingS2[n/#,3]] &],{n, 1, 40}] (* Robert A. Russell, May 29 2018*)
    mx = 40; Drop[CoefficientList[Series[-Sum[(EulerPhi[d] / d) Which[ Divisible[d, 6], Log[1 - 3x^d] - Log[1 - 2x^d], Divisible[d, 3] , (Log[1 - 3x^d] - Log[1 - 2x^d] + Log[1 - x^d]) / 2, Divisible[d, 2], (2 Log[1 - 3x^d] - 3 Log[1 - 2x^d]) / 3, True, (Log[1 - 3x^d] - 3Log[1 - 2x^d] + 3 Log[1 - x^d]) / 6], {d, 1, mx}], {x, 0, mx}], x], 1] (* Robert A. Russell, May 29 2018 *)

Formula

a(n) = A002076(n) - A000013(n).
From Robert A. Russell, May 29 2018: (Start)
a(n) = (1/n) * Sum_{d|n} phi(d) * ([d==0 mod 6] * (S2(n/d + 2, 3) - S2(n/d + 1, 3)) + [d==3 mod 6] * (S2(n/d + 2, 3) - 3*S2(n/d + 1, 3) + 3*S2(n/d, 3)) + [d==2 mod 6 | d==4 mod 6] * (2*S2(n/d + 1, 3) - 2*S2(n/d, 3)) + [d==1 mod 6 | d=5 mod 6] * S2(n/d, 3)), where S2(n,k) is the Stirling subset number, A008277.
G.f.: -Sum_{d>0} (phi(d) / d) * ([d==0 mod 6] * (log(1-3x^d) - log(1-x^d)) + [d==3 mod 6] * (log(1-3x^d) - log(1-2x^d) + log(1-x^d)) / 2 + [d==2 mod 6 | d==4 mod 6] * (2*log(1-3x^d) - 3*log(1-2x^d)) / 3 + [d==1 mod 6 | d=5 mod 6] * (log(1-3x^d) - 3*log(1-2x^d) + 3*log(1-x^d)) / 6).
(End)

A115118 Number of imprimitive (periodic) n-bead binary necklaces with beads of 2 colors where the colors may be swapped but turning over is not allowed.

Original entry on oeis.org

0, 0, 1, 1, 2, 1, 3, 1, 4, 2, 5, 1, 10, 1, 11, 5, 20, 1, 36, 1, 58, 11, 95, 1, 196, 4, 317, 30, 598, 1, 1153, 1, 2068, 95, 3857, 13, 7488, 1, 13799, 317, 26288, 1, 50531, 1, 95422, 1124, 182363, 1, 351764, 10, 671144, 3857, 1290874, 1, 2492820, 97, 4794104, 13799, 9256397, 1, 17923218, 1, 34636835, 49968, 67110932, 319
Offset: 0

Views

Author

Valery A. Liskovets, Jan 17 2006

Keywords

Comments

a(p) = 1 for prime p. Presumably a(n) = A115121(n) = A066656(n)/2 for odd n.

Crossrefs

Programs

  • Mathematica
    a[n_] := If[n == 0, 0, Sum[EulerPhi[2d] 2^(n/d) - Boole[OddQ[d]] MoebiusMu[d] 2^(n/d), {d, Divisors[n]}]/(2n)];
    Array[a, 66, 0] (* Jean-François Alcover, Aug 29 2019 *)
  • PARI
    a(n) = if (n==0, 0, (sumdiv(n, d, eulerphi(2*d) * 2^(n/d)) - sumdiv(n, d, (d%2)*(moebius(d)*2^(n/d))))/(2*n)); \\ Michel Marcus, Oct 21 2017

Formula

a(n) = A000013(n) - A000048(n).
a(n) = Sum_{k=2..n} A385665(n,k). - Tilman Piesk, Aug 03 2025

Extensions

More terms from Antti Karttunen, Oct 21 2017

A385665 Triangle read by rows: T(n,k) is the number of 2n-bead balanced bicolor necklaces that can be rotated into their complements in k different ways.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 2, 1, 0, 1, 3, 0, 0, 0, 1, 5, 1, 1, 0, 0, 1, 9, 0, 0, 0, 0, 0, 1, 16, 2, 0, 1, 0, 0, 0, 1, 28, 0, 1, 0, 0, 0, 0, 0, 1, 51, 3, 0, 0, 1, 0, 0, 0, 0, 1, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 170, 5, 2, 1, 0, 1, 0, 0, 0, 0, 0, 1, 315, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Tilman Piesk, Jul 06 2025

Keywords

Comments

Let X = A003239, Y = A000013, Z = A000048.
Rotations producing the complementary and the same necklace: CR and SR
There are X(n) balanced bicolor necklaces (BBN) of length 2n. (Central numbers of A047996.)
Y(n) among them are self-complementary (SCBBN). (They can be rotated so that all beads change color.)
Z(n) among those are primitive (not periodic). Each has a unique CR and SR. (SR is trivial rotation.)
The other Y(n)-Z(n) = A115118(n) SCBBN have multiple CR and SR.
T(n,k) SCBBN have k different CR and SR.
Column 1 is Z. The other columns have the same positive entries, each preceded by k-1 zeros.
One could add a column 0 to this triangle, whose entries would be X(n)-Y(n) = 2*A386388(n).
Triangle A385666 does the same for SR of all BBN.

Examples

			Triangle begins:
      k    1  2  3  4  5  6  7  8  9 10 11 12 12 14 15 16     A000013(n)
  n
  1        1  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .             1
  2        1  1  .  .  .  .  .  .  .  .  .  .  .  .  .  .             2
  3        1  .  1  .  .  .  .  .  .  .  .  .  .  .  .  .             2
  4        2  1  .  1  .  .  .  .  .  .  .  .  .  .  .  .             4
  5        3  .  .  .  1  .  .  .  .  .  .  .  .  .  .  .             4
  6        5  1  1  .  .  1  .  .  .  .  .  .  .  .  .  .             8
  7        9  .  .  .  .  .  1  .  .  .  .  .  .  .  .  .            10
  8       16  2  .  1  .  .  .  1  .  .  .  .  .  .  .  .            20
  9       28  .  1  .  .  .  .  .  1  .  .  .  .  .  .  .            30
 10       51  3  .  .  1  .  .  .  .  1  .  .  .  .  .  .            56
 11       93  .  .  .  .  .  .  .  .  .  1  .  .  .  .  .            94
 12      170  5  2  1  .  1  .  .  .  .  .  1  .  .  .  .           180
 13      315  .  .  .  .  .  .  .  .  .  .  .  1  .  .  .           316
 14      585  9  .  .  .  .  1  .  .  .  .  .  .  1  .  .           596
 15     1091  .  3  .  1  .  .  .  .  .  .  .  .  .  1  .          1096
 16     2048 16  .  2  .  .  .  1  .  .  .  .  .  .  .  1          2068
Examples for n=4 with necklaces of length 8:
T(4, 1) = 2 necklaces can be rotated into their complements in k=1 way:
 00001111 can be turned into 11110000 by rotating 4 places to the right.
 00101101 can be turned into 11010010 by rotating 4 places to the right.
T(4, 2) = 1 necklace can be rotated into its complement in k=2 ways:
 00110011 can be turned into 11001100 by rotating 2 or 6 places to the right.
T(4, 4) = 1 necklace can be rotated into its complement in k=4 ways:
 01010101 can be turned into 10101010 by rotating 1, 3, 5 or 7 places to the right.
		

Crossrefs

Formula

T(n,k) = A000048(n/k) iff n divisible by k, otherwise 0.

A091967 a(n) is the n-th term of sequence A_n, ignoring the offset, or -1 if A_n has fewer than n terms.

Original entry on oeis.org

0, 2, 1, 0, 2, 3, 0, 6, 6, 4, 44, 1, 180, 42, 16, 1096, 7652, 13781, 8, 24000, 119779, 458561, 152116956851941670912, 1054535, -53, 26, 27, 59, 4806078, 2, 35792568, 3010349, 2387010102192469724605148123694256128, 2, 0, -53, 43, 0, -4097, 173, 37338, 111111111111111111111111111111111111111111, 30402457, 413927966
Offset: 1

Views

Author

Proposed by several people, including Jeff Burch and Michael Joseph Halm

Keywords

Comments

This version ignores the offset of A_n and just counts from the beginning of the terms shown in the OEIS entry.
Thus a(8) = 6 because A_8 begins 1,1,2,2,3,4,5,6,... [even though A_8(8) is really 7].
The value a(n) = -1 could arise in two different ways, but it will be easy to decide which. - N. J. A. Sloane, Nov 27 2016
From M. F. Hasler, Sep 22 2013: (Start)
The value of a(91967) can be chosen at will.
Note that this sequence may change if the initial terms in A_n are altered, which does happen from time to time, usually because of the addition of an initial term.
After a(47), currently unknown, the sequence continues with a(48) = A48(47) = 1497207322929, a(49) = A49(48) = unknown, a(50) = A50(49) = unknown, a(51) = A51(50) = 1125899906842625, a(52)=97, a(53) = -1 (since A000053 has only 29 terms). (End)
a(58) = A000058(57) = 138752...985443 (29334988649136302 digits) is too large to include in the b-file. - Pontus von Brömssen, May 21 2022

Examples

			a(1) = 0 since A000001 has offset 0, and begins with A000001(0) = 0.
a(26) = 26 because the 26th term of A000026 = 26.
		

Crossrefs

Extensions

Corrected and extended by Jud McCranie; further extended by N. J. A. Sloane and E. M. Rains, Dec 08 1998
Corrected and extended by N. J. A. Sloane, May 25 2005
a(26), a(36) and a(42) corrected by M. F. Hasler, Jan 30 2009
a(43) and a(44) added by Daniel Sterman, Nov 27 2016
a(1) corrected by N. J. A. Sloane, Nov 27 2016 at the suggestion of Daniel Sterman
Definition and comments changed by N. J. A. Sloane, Nov 27 2016

A386388 a(n) is the number of complement pairs of 2n-bead balanced bicolor necklaces.

Original entry on oeis.org

0, 0, 0, 1, 3, 11, 36, 118, 395, 1337, 4598, 15986, 56270, 199854, 716132, 2584754, 9391051, 34315811, 126040590, 465062362, 1723070794, 6407806952, 23910175804, 89493721076, 335912391966, 1264105728842, 4768446886764, 18027215662284, 68291878325138
Offset: 0

Views

Author

Tilman Piesk, Jul 20 2025

Keywords

Comments

A003239(n) is the number of 2n-bead balanced bicolor necklaces, and A000013(n) is the number of those that are self-complementary (i.e., can be rotated so that all beads change color). Their difference 2*a(n) is the number of those that are not self-complementary. a(n) is the number pairs of distinct complements.
Doubled entries: 0, 0, 0, 2, 6, 22, 72, 236, 790, 2674, 9196, 31972, 112540, 399708, 1432264, ...

Examples

			  n  | A003239(n) A000013(n) | 2*a(n)      a(n)
  0  |         1          1  |     0         0
  1  |         1          1  |     0         0
  2  |         2          2  |     0         0
  3  |         4          2  |     2         1
  4  |        10          4  |     6         3
  5  |        26          4  |    22        11
  6  |        80          8  |    72        36
  7  |       246         10  |   236       118
  8  |       810         20  |   790       395
  9  |      2704         30  |  2674      1337
 10  |      9252         56  |  9196      4598
Examples for n=4 with necklaces of length 8:
A000013(4) = 4 necklaces are self-complementary:
 00001111, 00110011, 01010101, 00101101 (compare A385665)
There are a(n) = 3 pairs of complementary necklaces:
 (00110101, 00101011), (00100111, 00011011), (00010111, 00011101)
		

Crossrefs

Programs

  • Mathematica
    a[0]=0;a[n_]:=( Sum[ EulerPhi[n/k]*Binomial[2k, k]/(2n), {k, Divisors[n]}]- Fold[ #1 + EulerPhi[2#2]2^(n/#2)/(2n) &, 0, Divisors[n]])/2;Array[a,29,0] (* James C. McMahon, Jul 30 2025 *)

Formula

a(n) = (A003239(n) - A000013(n)) / 2.

A045675 Number of 2n-bead balanced binary necklaces which are not equivalent to their reverse, complement or reversed complement.

Original entry on oeis.org

0, 0, 0, 0, 0, 8, 32, 168, 616, 2380, 8472, 30760, 109644, 394816, 1420784, 5149948, 18736744, 68553728, 251902032, 929814984, 3445433608, 12814382620, 47817551136, 178982546512, 671813695340, 2528191984504, 9536849826816
Offset: 0

Views

Author

Keywords

Comments

The number of 2n-bead balanced binary necklaces is A003239(n). The number which are equivalent to their reverse, complement and reversed complement are respectively A128014(n), A000013(n) and A011782(n). - Andrew Howroyd, Sep 28 2017

Crossrefs

Programs

  • Mathematica
    a3239[n_] := If[n==0, 1, Sum[EulerPhi[n/k]*Binomial[2k, k]/(2n), {k, Divisors[n]}]];
    a128014[n_] := SeriesCoefficient[(1 + x)/Sqrt[1 - 4 x^2], {x, 0, n}];
    a11782[n_] := SeriesCoefficient[(1 - x)/(1 - 2x), {x, 0, n}];
    a13[n_] := If[n==0, 1, Sum[(EulerPhi[2d]*2^(n/d)), {d, Divisors[n]}]/(2n)];
    a45674[n_] := a45674[n] = If[n==0, 1, If[EvenQ[n], 2^(n/2-1) + a45674[n/2], 2^((n-1)/2)]];
    a[n_] := a3239[n] - a128014[n] - a13[n] - a11782[n] + 2 a45674[n];
    a /@ Range[0, 100] (* Jean-François Alcover, Sep 23 2019 *)

Formula

a(n) = A003239(n) - A128014(n) - A000013(n) - A011782(n) + 2*A045674(n). - Andrew Howroyd, Sep 28 2017

A306898 a(n) = Sum_{d|n} 2^d*phi(2*n/d).

Original entry on oeis.org

2, 8, 12, 32, 40, 96, 140, 320, 540, 1120, 2068, 4320, 8216, 16688, 32880, 66176, 131104, 263376, 524324, 1050880, 2097480, 4198480, 8388652, 16786368, 33554600, 67125344, 134218836, 268468928, 536870968, 1073809920, 2147483708, 4295099648, 8589938808, 17180131456, 34359739120, 68720011776
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    See A306888.
  • Mathematica
    Table[DivisorSum[n, 2^# *EulerPhi[2 n/#] &], {n, 36}] (* Michael De Vlieger, Mar 18 2019 *)
  • PARI
    a(n) = sumdiv(n, d, 2^d*eulerphi(2*n/d)); \\ Michel Marcus, Mar 16 2019

Formula

a(n) = 2 * n * A000013(n). - Seiichi Manyama, Jul 14 2023

A000208 Number of even sequences with period 2n.

Original entry on oeis.org

1, 1, 3, 4, 12, 28, 94, 298, 1044, 3658, 13164, 47710, 174948, 645436, 2397342, 8948416, 33556500, 126324496, 477225962, 1808414182, 6871973952, 26178873448, 99955697946, 382438918234, 1466015854100, 5629499869780
Offset: 0

Views

Author

Keywords

Comments

These are binary sequences (sequences of 1's and 0's), and two sequences are considered the same if one can be transformed into the other by translation and/or exchanging 1 and 0. A periodic sequence can be represented by enclosing one period in parentheses (for example, (00011011)). Even sequences contain an even number of 1's and an even number of 0's. - Michael B. Porter, Dec 22 2019

Examples

			For n=2, the sequences of length 2n=4 are (0000), (0001), (0011), and (0101). The other 12 possibilities are equivalent - for example, the sequence (1001) is a translation of (0011), and the sequence (1101) is equivalent to (0001) by exchanging 1's and 0's and then translating. Since three of these have an even number of 1's, a(2) = 3. - _Michael B. Porter_, Dec 22 2019
		

References

  • 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).

Crossrefs

Programs

  • Haskell
    a000208 n = a000208_list !! n
    a000208_list = map (`div` 2) $ concat $ transpose
       [zipWith (+) a000116_list $ bis a000116_list, bis $ tail a000116_list]
       where bis (x:_:xs) = x : bis xs
    -- Reinhard Zumkeller, Jul 08 2013
  • Mathematica
    a[0] = 1; a13[0] = 1; a13[n_] := Fold[#1 + EulerPhi[2*#2]*(2^(n/#2)/(2*n)) & , 0, Divisors[n]]; a[(n_)?OddQ] := (a13[2*(n + 1)] + a13[n + 1])/2; a[(n_)?EvenQ] := a13[2*(n + 1)]/2; Table[a[n], {n, 0, 24}] (* Jean-François Alcover, Sep 01 2011, after PARI prog. *)
  • PARI
    {A000208(n)=if(n%2==0,(A000013(2*n)+A000013(n))/2, A000013(2*n)/2)}
    

Formula

a(n) = (A000013(2*n) + A000013(n))/2 if n is even, A000013(2*n)/2 if n is odd. - Randall L Rathbun, Jan 11 2002
a(2*n) = (A000116(2*n) + A000116(n)) / 2; a(2*n+1) = A000116(2*n+1) / 2. - Reinhard Zumkeller, Jul 08 2013

Extensions

More terms from Randall L Rathbun, Jan 11 2002
Previous Showing 21-30 of 45 results. Next