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

A063672 Sequence A019320 in binary.

Original entry on oeis.org

10, 1, 11, 111, 101, 11111, 11, 1111111, 10001, 1001001, 1011, 11111111111, 1101, 1111111111111, 101011, 10010111, 100000001, 11111111111111111, 111001, 1111111111111111111, 11001101, 100100110111, 1010101011
Offset: 0

Views

Author

Antti Karttunen, Aug 03 2001

Keywords

Crossrefs

Programs

  • Maple
    map(convert, A019320,binary); or up to n=104 with: map(convert,[seq(Phi_pos_terms(j,2)-Phi_neg_terms(j,2),j=0..104)],binary);
  • Mathematica
    A063672[n_] := If[n == 0, 10, FromDigits[IntegerDigits[Cyclotomic[n, 2], 2]]];
    Array[A063672, 30, 0] (* Paolo Xausa, Feb 26 2024 *)

A063698 Positions of negative coefficients in cyclotomic polynomial Phi_n(x), converted from binary to decimal. (The constant term in the least significant bit (bit-0), the term x in the next bit (bit-1) and so on).

Original entry on oeis.org

0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 10, 0, 4, 0, 42, 146, 0, 0, 8, 0, 68, 2322, 682, 0, 16, 0, 2730, 0, 1092, 0, 56, 0, 0, 599186, 43690, 8726850, 64, 0, 174762, 9585810, 4112, 0, 792, 0, 279620, 2101256, 2796202, 0, 256, 0, 32800, 2454267026, 4473924, 0, 512
Offset: 0

Views

Author

Antti Karttunen, Aug 03 2001

Keywords

Comments

Maple procedures Phi_pos_terms and Phi_neg_terms are modeled after the formula given in Lam and Leung paper and they compute correct results for all integers x > 1 and for all n with at most two distinct odd prime factors (that is, up to n=104). Other procedures as in A063696 and A063694.

Crossrefs

A013594, A063696 gives the positions of the positive and A063697 the nonzero terms. This sequence in binary: A063699. A019320[n] = A063696[n]-A063698[n] for up to n=104

Programs

  • Maple
    with(numtheory); [seq(Phi_neg_terms(j,2),j=0..104)];
    Phi_neg_terms := proc(n,x) local a,m,p,q,e,f,r,s; if(n < 2) then RETURN(n); fi; a := op(2, ifactors(n)); m := nops(a); p := a[1][1]; e := a[1][2]; if(1 = m) then RETURN(0); fi; if(2 = m) then q := a[2][1]; f := a[2][2]; r := inv_p_mod_q(p,q)-1; s := inv_p_mod_q(q,p)-1;
    RETURN( x^((s+1)*(q^f)*(p^(e-1))) * x^((r+1)*(p^e)*(q^(f-1))) * x^(-((p^e) * (q^f))) * (`if`((p-2)=s,1,(((x^((p-s-1)*((q^f)*(p^(e-1)))))-1)/((x^((q^f)*(p^(e-1))))-1)))) * (`if`((q-2)=r,1,(((x^((q-r-1)*((p^e)*(q^(f-1)))))-1)/((x^((p^e)*(q^(f-1))))-1)))) ); fi;
    if((3 = m) and (2 = p)) then if(1 = e) then RETURN(every_other_pos(Phi_neg_terms(n/2,x),x,0)+every_other_pos(Phi_pos_terms(n/2,x),x,1)); else RETURN(dilate(Phi_neg_terms((n/(2^(e-1))),x),x,2^(e-1))); fi; else printf(`Cannot handle argument %a with >=3 distinct odd prime factors!\n`,n); RETURN(0); fi; end;
  • Mathematica
    a[n_] := 2^(Flatten[Position[CoefficientList[Cyclotomic[n, x], x], ?Negative]] - 1) // Total; a[0] = 0; Table[a[n], {n, 0, 60}] (* _Jean-François Alcover, Mar 05 2016 *)
  • PARI
    a(n)=my(p); if(n<1, 0, p=polcyclo(n); sum(i=0, n, 2^i*(polcoeff(p, i)<0))) \\ Michel Marcus, Mar 05 2016

A063671 Positions of nonzero coefficients in cyclotomic polynomial Phi_n(x), A063670 in binary.

Original entry on oeis.org

10, 11, 11, 111, 101, 11111, 111, 1111111, 10001, 1001001, 11111, 11111111111, 10101, 1111111111111, 1111111, 110111011, 100000001, 11111111111111111, 1001001, 1111111111111111111, 101010101, 1101101011011, 11111111111
Offset: 0

Views

Author

Antti Karttunen, Aug 03 2001

Keywords

Comments

a(0) could also be 1. - T. D. Noe, Oct 29 2007

Examples

			Phi_15(x) = x^8 - x^7 + x^5 - x^4 + x^3 - x + 1, thus the 1-bits of a(15) are at positions 0,1,3,4,5,7 and 8, thus we get a(15) = 110111011.
		

Crossrefs

Programs

  • Maple
    map(convert, A063670,binary);
  • Mathematica
    a[n_] := FromDigits[Abs[CoefficientList[Cyclotomic[n, x], x]]]; a[0]=10;Table[a[n], {n, 0, 22}] (* Jean-François Alcover, Nov 02 2016 *)

Formula

a(n) = A063697(n) (the positive terms) + A063699(n) (the negative terms) (computed in any base, up to n=104).

A063696 Positions of positive coefficients in cyclotomic polynomial Phi_n(x), converted from binary to decimal.

Original entry on oeis.org

0, 2, 3, 7, 5, 31, 5, 127, 17, 73, 21, 2047, 17, 8191, 85, 297, 257, 131071, 65, 524287, 273, 4681, 1365, 8388607, 257, 1082401, 5461, 262657, 4369, 536870911, 387, 2147483647, 65537, 1198665, 87381, 17454241, 4097, 137438953471, 349525
Offset: 0

Views

Author

Antti Karttunen, Aug 03 2001

Keywords

Comments

Maple procedures Phi_pos_terms and Phi_neg_terms are modeled after the formula given in Lam and Leung paper and they compute correct results for all integers x > 1 and for all n with at most two distinct odd prime factors (that is, up to n=104). Other procedures as in A063698 and A063694.

Crossrefs

Cf. A013594, A063697 (binary version), A063698 (negative terms), A063670 (nonzero terms).
A019320(n) = a(n) - A063698(n) for up to n=104.

Programs

  • Maple
    with(numtheory); [seq(Phi_pos_terms(j,2),j=0..104)];
    inv_p_mod_q := (p,q) -> op(2,op(1,msolve(p*x=1,q))); # Find's p's inverse modulo q.
    dilate := proc(nn,x,e) local n,i,s; n := nn; i := 0; s := 0; while(n > 0) do s := s + (((x^e)^i)*(n mod x)); n := floor(n/x); i := i+1; od; RETURN(s); end;
    Phi_pos_terms := proc(n,x) local a,m,p,q,e,f,r,s; if(n < 2) then RETURN(x); fi; a := op(2, ifactors(n)); m := nops(a); p := a[1][1]; e := a[1][2]; if(1 = m) then RETURN(((x^(p^e))-1)/((x^(p^(e-1)))-1)); fi; if(2 = m) then q := a[2][1]; f := a[2][2]; r := inv_p_mod_q(p,q)-1; s := inv_p_mod_q(q,p)-1; RETURN( (`if`(0=s,1,(((x^((s+1)*((q^f)*(p^(e-1)))))-1)/((x^((q^f)*(p^(e-1))))-1)))) * (`if`(0=r,1,(((x^((r+1)*((p^e)*(q^(f-1)))))-1)/((x^((p^e)*(q^(f-1))))-1)))) ); fi; if((3 = m) and (2 = p)) then if(1 = e) then RETURN(every_other_pos(Phi_pos_terms(n/2,x),x,0)+every_other_pos(Phi_neg_terms(n/2,x),x,1)); else RETURN(dilate(Phi_pos_terms((n/(2^(e-1))),x),x,2^(e-1))); fi; else printf(`Cannot handle argument %a with three or more distinct odd prime factors!\n`,n); RETURN(0); fi; end;
  • Mathematica
    a[n_] := 2^(Flatten[Position[CoefficientList[Cyclotomic[n, x], x], ?Positive]] - 1) // Total; a[0] = 0; Table[a[n], {n, 0, 40}] (* _Jean-François Alcover, Mar 05 2016 *)
  • PARI
    a(n)=local(p); if(n<1,0,p=polcyclo(n); sum(i=0,n,2^i*(polcoeff(p,i)>0)))

A063699 Positions of negative coefficients in cyclotomic polynomial Phi_n(x), A063698 in binary.

Original entry on oeis.org

0, 1, 0, 0, 0, 0, 10, 0, 0, 0, 1010, 0, 100, 0, 101010, 10010010, 0, 0, 1000, 0, 1000100, 100100010010, 1010101010, 0, 10000, 0, 101010101010, 0, 10001000100, 0, 111000, 0, 0, 10010010010010010010, 1010101010101010, 100001010010100101000010
Offset: 0

Views

Author

Antti Karttunen, Aug 03 2001

Keywords

Examples

			E.g. Phi_15(x) = x^8 - x^7 + x^5 - x^4 + x^3 - x + 1, thus the 1-bits of a(15) are at positions 1,4 and 7, thus we get a(15) = 10010010
		

Crossrefs

Programs

  • Maple
    map(convert, A063698,binary);

A118887 Number of ways to place n objects with weights 1,2,...,n evenly spaced around the circumference of a circular disk so that the disk will exactly balance on the center point.

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 0, 0, 0, 24, 0, 732, 0, 720, 48, 0, 0
Offset: 1

Views

Author

Hugo Pfoertner, May 03 2006

Keywords

Comments

The position of weight 1 is kept fixed at position 1. Mirror configurations are counted only once. Proposed in the seqfan mailing list by Brendan McKay, Sep 12 2005
Also number of permutations p1,p2,...,pn such that the polynomial p1 + p2*x + ... + pn*x^(n-1) has exp(2*pi*i/n) as a zero. Also number of equiangular polygons whose sides are some permutation of 1,2,3,...,n. - T. D. Noe, Sep 13 2005
No solutions exist if n is a prime power. Proved by W. Edwin Clark, Sep 14 2005
Murray Klamkin proved that solutions do exist if n is not a prime power. - Jonathan Sondow, Oct 17 2013

Examples

			The smallest n for which a solution exists is n=6 with 4 solutions:
...........Weight
......1..2..3..4..5..6
.Count...at.position
..1...1..4..5..2..3..6
..2...1..5..3..4..2..6
..3...1..6..2..4..3..5
..4...1..6..3..2..5..4
Configurations 1 is the mirror image of configuration 4, ditto for configurations 2 and 3. Therefore a(6)=2.
		

Crossrefs

Cf. A118888 (configurations with minimum imbalance), A063697 (positions of positive coefficients in cyclotomic polynomial in binary), A063699 (positions of negative coefficients in cyclotomic polynomial in binary), A326921.

Programs

  • Mathematica
    Needs["DiscreteMath`Combinatorica`"]; Table[eLst=E^(2.*Pi*I*Range[n]/n); Count[(Permutations[Range[n]]), q_List/;Chop[q.eLst]===0]/(2n), {n,10}] (* very slow for n>10 *) (* T. D. Noe, May 05 2006 *)

Formula

a(A000961(n)) = 0, a(A024619(n)) > 0. - Jonathan Sondow, Oct 17 2013
Showing 1-6 of 6 results.