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 10 results.

A000358 Number of binary necklaces of length n with no subsequence 00, excluding the necklace "0".

Original entry on oeis.org

1, 2, 2, 3, 3, 5, 5, 8, 10, 15, 19, 31, 41, 64, 94, 143, 211, 329, 493, 766, 1170, 1811, 2787, 4341, 6713, 10462, 16274, 25415, 39651, 62075, 97109, 152288, 238838, 375167, 589527, 927555, 1459961, 2300348, 3626242, 5721045, 9030451, 14264309, 22542397, 35646312, 56393862, 89264835, 141358275
Offset: 1

Views

Author

Keywords

Comments

a(n) is also the number of inequivalent compositions of n into parts 1 and 2 where two compositions are considered to be equivalent if one is a cyclic rotation of the other. a(6)=5 because we have: 2+2+2, 2+2+1+1, 2+1+2+1, 2+1+1+1+1, 1+1+1+1+1+1. - Geoffrey Critzer, Feb 01 2014
Moebius transform is A006206. - Michael Somos, Jun 02 2019

Examples

			G.f. = x + 2*x^2 + 2*x^3 + 3*x^4 + 3*x^5 + 5*x^6 + 5*x^7 + 8*x^8 + 10*x^9 + ... - _Michael Somos_, Jun 02 2019
Binary necklaces are: 1; 01, 11; 011, 111; 0101, 0111, 1111; 01010, 01011, 01111. - _Michael Somos_, Jun 02 2019
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 499.
  • T. Helleseth and A. Kholosha, Bent functions and their connections to combinatorics, in Surveys in Combinatorics 2013, edited by Simon R. Blackburn, Stefanie Gerke, Mark Wildon, Camb. Univ. Press, 2013.

Crossrefs

Column k=0 of A320341.

Programs

  • Maple
    A000358 := proc(n) local sum; sum := 0; for d in divisors(n) do sum := sum + phi(n/d)*(fibonacci(d+1)+fibonacci(d-1)) od; RETURN(sum/n); end;
    with(combstruct); spec := {A=Union(zero,Cycle(one),Cycle(Prod(zero,Sequence(one,card>0)))),one=Atom,zero=Atom}; seq(count([A,spec,unlabeled],size=i),i=1..30);
  • Mathematica
    nn=48;Drop[Map[Total,Transpose[Map[PadRight[#,nn]&,Table[ CoefficientList[ Series[CycleIndex[CyclicGroup[n],s]/.Table[s[i]->x^i+x^(2i),{i,1,n}],{x,0,nn}],x],{n,0,nn}]]]],1] (* Geoffrey Critzer, Feb 01 2014 *)
    max = 50; B[x_] := x*(1+x); A = Sum[EulerPhi[k]/k*Log[1/(1-B[x^k])], {k, 1, max}]/x + O[x]^max; CoefficientList[A, x] (* Jean-François Alcover, Feb 08 2016, after Joerg Arndt *)
    Table[1/n * Sum[EulerPhi[n/d] Total@ Map[Fibonacci, d + # & /@ {-1, 1}], {d, Divisors@ n}], {n, 47}] (* Michael De Vlieger, Dec 28 2016 *)
    a[ n_] := If[ n < 1, 0, DivisorSum[n, EulerPhi[n/#] LucasL[#] &]/n]; (* Michael Somos, Jun 02 2019 *)
  • PARI
    N=66;  x='x+O('x^N);
    B(x)=x*(1+x);
    A=sum(k=1, N, eulerphi(k)/k*log(1/(1-B(x^k))));
    Vec(A)
    /* Joerg Arndt, Aug 06 2012 */
    
  • PARI
    {a(n) = if( n<1, 0, sumdiv(n, d, eulerphi(n/d) * (fibonacci(d+1) + fibonacci(d-1)))/n)}; /* Michael Somos, Jun 02 2019 */
    
  • Python
    from sympy import totient, lucas, divisors
    def A000358(n): return (n&1^1)+sum(totient(n//k)*(lucas(k)-((k&1^1)<<1)) for k in divisors(n,generator=True))//n # Chai Wah Wu, Sep 23 2023

Formula

a(n) = (1/n) * Sum_{ d divides n } totient(n/d) [ Fib(d-1)+Fib(d+1) ].
G.f.: Sum_{k>=1} phi(k)/k * log( 1/(1-B(x^k)) ) where B(x)=x*(1+x). - Joerg Arndt, Aug 06 2012
a(n) ~ ((1+sqrt(5))/2)^n / n. - Vaclav Kotesovec, Sep 12 2014
a(n) = Sum_{0 <= i <= ceiling((n-1)/2)} [ (1/(n - i)) * Sum_{d|gcd(i, n-i)} phi(d) * binomial((n - i)/d, i/d) ]. (This is DeFord's formula for the number of distinct Lucas tilings of a 1 X n bracelet up to symmetry, even though in the paper he refers to sequence A032192(n) = a(n) - 1.) - Petros Hadjicostas, Jun 07 2019

A053618 a(n) = ceiling(binomial(n,4)/n).

Original entry on oeis.org

0, 0, 0, 1, 1, 3, 5, 9, 14, 21, 30, 42, 55, 72, 91, 114, 140, 170, 204, 243, 285, 333, 385, 443, 506, 575, 650, 732, 819, 914, 1015, 1124, 1240, 1364, 1496, 1637, 1785, 1943, 2109, 2285, 2470, 2665, 2870, 3086, 3311, 3548, 3795, 4054, 4324
Offset: 1

Views

Author

N. J. A. Sloane, Mar 25 2000

Keywords

Crossrefs

Programs

  • Magma
    [Ceiling(Binomial(n,4)/n): n in [1..60]]; // G. C. Greubel, May 16 2019
    
  • Mathematica
    CoefficientList[Series[x^4*(1-x+x^2)*(1-x+x^2+x^4)/((1-x)^3*(1-x^8)), {x,0,60}], x] (* G. C. Greubel, May 16 2019 *)
  • PARI
    concat([0,0,0], Vec(x^4*(x^2-x+1)*(x^4+x^2-x+1) / ((x-1)^4*(x+1)*(x^2+1)*(x^4+1)) + O(x^60))) \\ Colin Barker, Jan 20 2015
    
  • Sage
    [ceil(binomial(n,4)/n) for n in (1..60)] # G. C. Greubel, May 16 2019

Formula

a(n) = ( 2*n^3 - 12*n^2 + 22*n - 3 + 9*(-1)^n + 3*(1+(-1)^n)*(-1)^(n*(n-1)/2) - 6*(1 + (-1)^n)*(-1)^floor(n/4) )/48. - Luce ETIENNE, Jan 20 2015
G.f.: x^4*(1 - x + x^2)*(1 - x + x^2 + x^4)/((1-x)^3*(1-x^8)). - Colin Barker, Jan 20 2015

A032193 Number of necklaces with 8 black beads and n-8 white beads.

Original entry on oeis.org

1, 1, 5, 15, 43, 99, 217, 429, 810, 1430, 2438, 3978, 6310, 9690, 14550, 21318, 30667, 43263, 60115, 82225, 111041, 148005, 195143, 254475, 328756, 420732, 534076, 672452, 840652, 1043460, 1287036, 1577532, 1922741
Offset: 8

Views

Author

Keywords

Comments

The g.f. is Z(C_8,x)/x^8, the 8-variate cycle index polynomial for the cyclic group C_8, with substitution x[i]->1/(1-x^i), i=1,...,8. Therefore by Polya enumeration a(n+8) is the number of cyclically inequivalent 8-necklaces whose 8 beads are labeled with nonnegative integers such that the sum of labels is n, for n=0,1,2,... See A102190 for Z(C_8,x). See the comment in A032191 on the equivalence of this problem with the one given in the `Name' line. - Wolfdieter Lang, Feb 15 2005
From Petros Hadjicostas, Aug 31 2018: (Start)
The CIK[k] transform of sequence (c(n): n>=1) has generating function A_k(x) = (1/k)*Sum_{d|k} phi(d)*C(x^d)^{k/d}, where C(x) = Sum_{n>=1} c(n)*x^n is the g.f. of (c(n): n>=1).
When c(n) = 1 for all n >= 1, we get C(x) = x/(1-x) and A_k(x) = (x^k/k)*Sum_{d|k} phi(d)*(1-x^d)^{-k/d}, which is the g.f. of the number a_k(n) of necklaces of n beads of 2 colors with k of them black and n-k of them white.
Using Taylor expansions, we can easily prove that a_k(n) = (1/k)*Sum_{d|gcd(n,k)} phi(d)*binomial(n/d - 1, k/d - 1) = (1/n)*Sum_{d|gcd(n,k)} phi(d)*binomial(n/d, k/d), which is Robert A. Russell's formula in the Mathematica code below.
For this sequence k = 8, and thus we get the formulae below.
(End)

Crossrefs

Programs

  • Mathematica
    k = 8; Table[Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n, {n, k, 30}] (* Robert A. Russell, Sep 27 2004 *)
    CoefficientList[Series[1/8*(1/(1 - x)^8 + 1/(1 - x^2)^4 + 2/(1 - x^4)^2 + 4/(1 - x^8)^1),{x, 0, 30}], x] (* Stefano Spezia, Sep 01 2018 *)

Formula

"CIK[ 8 ]" (necklace, indistinct, unlabeled, 8 parts) transform of 1, 1, 1, 1...
G.f.: (x^8)*(1-3*x+5*x^2+3*x^3-4*x^4+4*x^5+6*x^6-4*x^7+7*x^8-x^9+x^10+x^11)/((1-x)^4*(1-x^2)^2*(1-x^4)*(1-x^8)).
G.f.: 1/8*x^8*(1/(1-x)^8+1/(1-x^2)^4+2/(1-x^4)^2+4/(1-x^8)^1). - Herbert Kociemba, Oct 22 2016
a(n) = (1/8)*Sum_{d|gcd(n,8)} phi(d)*binomial(n/d - 1, 8/d - 1) = (1/n)*Sum_{d|gcd(n,8)} phi(d)*binomial(n/d, 8/d). - Petros Hadjicostas, Aug 31 2018

A053731 a(n) = ceiling(binomial(n,8)/n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 15, 42, 99, 215, 429, 805, 1430, 2431, 3978, 6299, 9690, 14535, 21318, 30645, 43263, 60088, 82225, 111004, 148005, 195098, 254475, 328697, 420732, 534006, 672452, 840565, 1043460, 1286934, 1577532, 1922618
Offset: 1

Views

Author

N. J. A. Sloane, Mar 25 2000

Keywords

Crossrefs

Cf. Sequences of the form ceiling(binomial(n,k)/n): A000012 (k=1), A004526 (k=2), A007997 (k=3), A008646 (k=5), A032192 (k=7), A053618 (k=4), A053643 (k=6), this sequence (k=8), A053733 (k=9).

Programs

  • Magma
    [Ceiling(Binomial(n,8)/n): n in [1..45]]; // G. C. Greubel, Sep 06 2019
    
  • Maple
    seq(ceil(binomial(n,8)/n), n=1..45); # G. C. Greubel, Sep 06 2019
  • Mathematica
    Table[Ceiling[Binomial[n, 8]/n], {n, 45}] (* G. C. Greubel, Sep 06 2019 *)
  • PARI
    vector(45, n, ceil(binomial(n,8)/n)) \\ G. C. Greubel, Sep 06 2019
    
  • Sage
    [ceil(binomial(n,8)/n) for n in (1..45)] # G. C. Greubel, Sep 06 2019

A032194 Number of necklaces with 9 black beads and n-9 white beads.

Original entry on oeis.org

1, 1, 5, 19, 55, 143, 335, 715, 1430, 2704, 4862, 8398, 14000, 22610, 35530, 54484, 81719, 120175, 173593, 246675, 345345, 476913, 650325, 876525, 1168710, 1542684, 2017356, 2615104, 3362260, 4289780, 5433736, 6835972
Offset: 9

Views

Author

Keywords

Comments

The g.f. is Z(C_9,x)/x^9, the 9-variate cycle index polynomial for the cyclic group C_9, with substitution x[i]->1/(1-x^i), i=1,...,9. Therefore by Polya enumeration a(n+9) is the number of cyclically inequivalent 9-necklaces whose 9 beads are labeled with nonnegative integers such that the sum of labels is n, for n=0,1,2,... See A102190 for Z(C_9,x). See the comment in A032191 on the equivalence of this problem with the one given in the `Name' line. - Wolfdieter Lang, Feb 15 2005

Crossrefs

Programs

  • Mathematica
    k = 9; Table[Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n, {n, k, 30}] (* Robert A. Russell, Sep 27 2004 *)

Formula

"CIK[ 9 ]" (necklace, indistinct, unlabeled, 9 parts) transform of 1, 1, 1, 1...
G.f.: (x^9)*(1-5*x+14*x^2-18*x^3+21*x^4-21*x^5+25*x^6 -21*x^7 +21*x^8 -18*x^9 +14*x^10 -5*x^11 +x^12) / ((1-x)^6*(1-x^3)^2*(1-x^9)).
G.f.: (1/9)*x^9*(1/(1-x)^9+2/(1-x^3)^3+6/(1-x^9)^1). - Herbert Kociemba, Oct 22 2016

A053733 a(n) = ceiling(binomial(n,9)/n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 19, 55, 143, 334, 715, 1430, 2702, 4862, 8398, 13997, 22610, 35530, 54480, 81719, 120175, 173587, 246675, 345345, 476905, 650325, 876525, 1168700, 1542684, 2017356, 2615092, 3362260, 4289780, 5433722
Offset: 1

Views

Author

N. J. A. Sloane, Mar 25 2000

Keywords

Crossrefs

Cf. Sequences of the form ceiling(binomial(n,k)/n): A000012 (k=1), A004526 (k=2), A007997 (k=3), A008646 (k=5), A032192 (k=7), A053618 (k=4), A053643 (k=6), A053731 (k=8), this sequence (k=9).

Programs

  • Magma
    [Ceiling(Binomial(n,9)/n): n in [1..40]]; // G. C. Greubel, Sep 06 2019
    
  • Maple
    seq(ceil(binomial(n,9)/n), n=1..40); # G. C. Greubel, Sep 06 2019
  • Mathematica
    Table[Ceiling[Binomial[n, 9]/n], {n, 40}] (* G. C. Greubel, Sep 06 2019 *)
  • PARI
    vector(40, n, ceil(binomial(n,9)/n)) \\ G. C. Greubel, Sep 06 2019
    
  • Sage
    [ceil(binomial(n,9)/n) for n in (1..40)] # G. C. Greubel, Sep 06 2019

A347974 Triangle read by rows: T(n, k) is the number of k-dimensional subspaces in (F_8)^n, counted up to coordinate permutation (n >= 0, 0 <= k <= n).

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 17, 17, 1, 1, 47, 242, 47, 1, 1, 113, 3071, 3071, 113, 1, 1, 245, 34477, 232290, 34477, 245, 1, 1, 491, 341633, 16665755, 16665755, 341633, 491, 1, 1, 920, 3022045, 1073874283, 8241549097, 1073874283, 3022045, 920, 1, 1, 1635, 24145695
Offset: 0

Views

Author

Álvar Ibeas, Sep 21 2021

Keywords

Comments

Columns can be computed by a method analogous to that of Fripertinger for isometry classes of linear codes, disallowing scalar transformation of individual coordinates.
Regarding the formula for column k = 1, note that A241926(q - 1, n) counts, up to coordinate permutation, one-dimensional subspaces of (F_q)^n generated by a vector with no zero component.

Examples

			Triangle begins:
  k:  0    1    2    3    4    5
      --------------------------
n=0:  1
n=1:  1    1
n=2:  1    5    1
n=3:  1   17   17    1
n=4:  1   47  242   47    1
n=5:  1  113 3071 3071  113    1
There are 9 = A022172(2, 1) one-dimensional subspaces in (F_8)^2. Among them, <(1, 1)> is invariant by coordinate swap and the rest are grouped in orbits of size two. Hence, T(2, 1) = 5.
		

Crossrefs

Formula

T(n, 1) = T(n - 1, 1) + A032192(n + 7).

A032195 Number of necklaces with 10 black beads and n-10 white beads.

Original entry on oeis.org

1, 1, 6, 22, 73, 201, 504, 1144, 2438, 4862, 9252, 16796, 29414, 49742, 81752, 130752, 204347, 312455, 468754, 690690, 1001603, 1430715, 2016144, 2804880, 3856892, 5245128, 7060984, 9414328, 12440668, 16301164
Offset: 10

Views

Author

Keywords

Comments

The g.f. is Z(C_10,x)/x^10, the 10-variate cycle index polynomial for the cyclic group C_10, with substitution x[i]->1/(1-x^i), i=1,...,10. By Polya enumeration, a(n+10) is the number of cyclically inequivalent 10-necklaces whose 10 beads are labeled with nonnegative integers such that the sum of labels is n, for n=0,1,2,... See A102190 for Z(C_10,x). See the comment in A032191 on the equivalence of this problem with the one given in the `Name' line. - Wolfdieter Lang, Feb 15 2005

Crossrefs

Programs

  • Mathematica
    k = 10; Table[Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n, {n, k, 30}] (* Robert A. Russell, Sep 27 2004 *)

Formula

"CIK[ 10 ]" (necklace, indistinct, unlabeled, 10 parts) transform of 1, 1, 1, 1...
G.f.: (x^10)*(1-3*x+4*x^2+12*x^3-8*x^4-x^5+31*x^6-4*x^8+16*x^9 +11*x^10 +3*x^11+8*x^12+4*x^13+4*x^14+x^15+x^16) /((1-x)^4*(1-x^2)^4 *(1-x^5)*(1-x^10)).
G.f.: (1/10)*x^10*(1/(1 - x)^10 + 1/(1 - x^2)^5 + 4/(1 - x^5)^2 + 4/(1 - x^10)^1). - Herbert Kociemba, Oct 22 2016

A032196 Number of necklaces with 11 black beads and n-11 white beads.

Original entry on oeis.org

1, 1, 6, 26, 91, 273, 728, 1768, 3978, 8398, 16796, 32066, 58786, 104006, 178296, 297160, 482885, 766935, 1193010, 1820910, 2731365, 4032015, 5864750, 8414640, 11920740, 16689036, 23107896, 31666376, 42975796
Offset: 11

Views

Author

Keywords

Comments

The g.f. is Z(C_11,x)/x^11, the 11-variate cycle index polynomial for the cyclic group C_11, with substitution x[i]->1/(1-x^i), i=1..11. By Polya enumeration, a(n+11) is the number of cyclically inequivalent 11-necklaces whose 11 beads are labeled with nonnegative integers such that the sum of labels is n, for n=0,1,2,... See A102190 for Z(C_11,x). See the comment in A032191 on the equivalence of this problem with the one given in the `Name' line. - Wolfdieter Lang, Feb 15 2005

Crossrefs

Programs

  • Mathematica
    k = 11; Table[Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n, {n, k, 30}] (* Robert A. Russell, Sep 27 2004 *)
    DeleteCases[CoefficientList[Series[(x^11) (1 - 9 x + 41 x^2 - 109 x^3 + 191 x^4 - 229 x^5 + 191 x^6 - 109 x^7 + 41 x^8 - 9 x^9 + x^10)/((1 - x)^10 (1 - x^11)), {x, 0, 39}], x], 0] (* Michael De Vlieger, Oct 10 2016 *)

Formula

"CIK[ 11 ]" (necklace, indistinct, unlabeled, 11 parts) transform of 1, 1, 1, 1...
G.f.: (x^11) * (1 - 9*x + 41*x^2 - 109*x^3 + 191*x^4 - 229*x^5 + 191*x^6 - 109*x^7 + 41*x^8 - 9*x^9 + x^10) / ((1-x)^10 * (1-x^11)).
a(n) = ceiling(binomial(n, 11)/n) (conjecture Wolfdieter Lang).
From Herbert Kociemba, Oct 11 2016: (Start)
This conjecture indeed is true.
Sketch of proof:
There are binomial(n,11) ways to place the 11 black beads in the necklace with n beads. If n is not divisible by 11 there are no necklaces with a rotational symmetry. So exactly n necklaces are equivalent up to rotation and there are binomial(n,11)/n = ceiling(binomial(n,11)/n) equivalence classes.
If n is divisible by 11 the only way to get a necklace with rotational symmetry is to space out the 11 black beads evenly. There are n/11 ways to do this and all ways are equivalent up to rotation. So there are binomial(n,11) - n/11 unsymmetric necklaces which give binomial(n,11)/n - 1/11 equivalence classes. If we add the single symmetric equivalence class we get Binomial(n,11)/n - 1/11 + 1 which also is ceiling(binomial(n,11)/n). (End)
G.f.: (10/(1 - x^11) + 1/(1 - x)^11)*x^11/11. - Herbert Kociemba, Oct 16 2016

A032197 Number of necklaces with 12 black beads and n-12 white beads.

Original entry on oeis.org

1, 1, 7, 31, 116, 364, 1038, 2652, 6310, 14000, 29414, 58786, 112720, 208012, 371516, 643856, 1086601, 1789515, 2883289, 4552275, 7056280, 10752060, 16128424, 23841480, 34769374, 50067108, 71250060, 100276894, 139672312
Offset: 12

Views

Author

Keywords

Comments

The g.f. is Z(C_12,x)/x^12, the 12-variate cycle index polynomial for the cyclic group C_12, with substitution x[i]->1/(1-x^i), i=1,...,12. Therefore by Polya enumeration a(n+12) is the number of cyclically inequivalent 12-necklaces whose 12 beads are labeled with nonnegative integers such that the sum of labels is n, for n=0,1,2,... See A102190 for Z(C_12,x). See the comment in A032191 on the equivalence of this problem with the one given in the `Name' line. - Wolfdieter Lang, Feb 15 2005

Crossrefs

Programs

  • Mathematica
    k = 12; Table[Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n, {n, k, 30}] (* Robert A. Russell, Sep 27 2004 *)

Formula

"CIK[ 12 ]" (necklace, indistinct, unlabeled, 12 parts) transform of 1, 1, 1, 1...
G.f.: (x^12)*(1-3*x+7*x^2+9*x^3+18*x^4+38*x^5+72*x^6+92*x^7+168*x^8+160*x^9+238*x^10+230*x^11+296*x^12+234*x^13+330*x^14+248*x^15+284*x^16+238*x^17+230*x^18+166*x^19+172*x^20+78*x^21+80*x^22+38*x^23+21*x^24+7*x^25+3*x^26+x^27) /((1+x)*(1-x)*(1-x^2)*(1-x^3)*(1-x)^5*(1+x+x^2)*(1-x^4)^2*(1-x^6)*(1-x^12)). - Wolfdieter Lang, Feb 15 2005 (see comment)
G.f.: 1/12 x^12 ((1 - x)^-12 + (1 - x^2)^-6 + 2 (1 - x^3)^-4 + 2 (1 - x^4)^-3 + 2 (1 - x^6)^-2 + 4 (1 - x^12)^-1). - Herbert Kociemba, Oct 22 2016
Showing 1-10 of 10 results.