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

A063697 Positions of positive coefficients in cyclotomic polynomial Phi_n(x), A063696 in binary.

Original entry on oeis.org

0, 10, 11, 111, 101, 11111, 101, 1111111, 10001, 1001001, 10101, 11111111111, 10001, 1111111111111, 1010101, 100101001, 100000001, 11111111111111111, 1000001, 1111111111111111111, 100010001, 1001001001001, 10101010101
Offset: 0

Views

Author

Antti Karttunen, Aug 03 2001

Keywords

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,3,5 and 8, thus we get a(15) = 100101001
		

Crossrefs

Programs

  • Maple
    map(convert, A063696,binary);

Extensions

a(0) corrected by Sean A. Irvine, May 08 2023

A019320 Cyclotomic polynomials at x=2.

Original entry on oeis.org

2, 1, 3, 7, 5, 31, 3, 127, 17, 73, 11, 2047, 13, 8191, 43, 151, 257, 131071, 57, 524287, 205, 2359, 683, 8388607, 241, 1082401, 2731, 262657, 3277, 536870911, 331, 2147483647, 65537, 599479, 43691, 8727391, 4033, 137438953471, 174763, 9588151, 61681
Offset: 0

Views

Author

Keywords

Crossrefs

a(n) = A063696(n) - A063698(n) for up to n=104.
Same sequence in binary: A063672.

Programs

  • Maple
    with(numtheory,cyclotomic); f := n->subs(x=2,cyclotomic(n,x)); seq(f(i),i=0..64);
  • Mathematica
    Join[{2}, Table[Cyclotomic[n, 2], {n, 1, 40}]] (* Jean-François Alcover, Jun 14 2013 *)
  • PARI
    vector(20,n,polcyclo(n,2)) \\ Charles R Greathouse IV, May 18 2011

Formula

(lcm_{k=1..n} (2^k - 1))/lcm_{k=1..n-1} (2^k - 1), n > 1. - Vladeta Jovovic, Jan 20 2002
Let b(1) = 1 and b(n+1) = lcm(b(n), 2^n-1) then Phi(n,2) = b(n+1)/b(n) = a(n). - Thomas Ordowski, May 08 2013
a(0) = 2; for n > 0, a(n) = (2^n-1)/gcd(a(0)*a(1)*...*a(n-1), 2^n-1). - Thomas Ordowski, May 11 2013

A013594 Smallest order of cyclotomic polynomial containing n or -n as a coefficient.

Original entry on oeis.org

0, 105, 385, 1365, 1785, 2805, 3135, 6545, 6545, 10465, 10465, 10465, 10465, 10465, 11305, 11305, 11305, 11305, 11305, 11305, 11305, 15015, 11305, 17255, 17255, 20615, 20615, 26565, 26565, 26565, 26565, 26565, 26565, 26565, 26565, 26565
Offset: 1

Views

Author

Keywords

Comments

This sequence is infinite - see the Lang reference.
An alternative version would start with 1 rather than 0.

Examples

			a(2)=105 because cyclotomic(105) contains "-2" as coefficient, but for n < 105 cyclotomic(n) does not contain 2 or -2.
x^105 - 1 = ( - 1 + x)(1 + x + x^2)(1 + x + x^2 + x^3 + x^4)(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)(1 - x + x^3 - x^4 + x^5 - x^7 + x^8)(1 - x + x^3 - x^4 + x^6 - x^8 + x^9 - x^11 + x^12)(1 - x + x^5 - x^6 + x^7 - x^8 + x^10 - x^11 + x^12 - x^13 + x^14 - x^16 + x^17 - x^18 + x^19 - x^23 + x^24)(1 + x + x^2 - x^5 - x^6 - 2x^7 - x^8 - x^9 + x^12 + x^13 + x^14 + x^15 + x^16 + x^17 - x^20 - x^22 - x^24 - x^26 - x^28 + x^31 + x^32 + x^33 + x^34 + x^35 + x^36 - x^39 - x^40 - 2x^41 - x^42 - x^43 + x^46 + x^47 + x^48)
		

References

  • Bateman, C. Pomerance and R. C. Vaughan, Colloq. Math. Soc. Janos Bolyai, 34 (1984), 171-202.
  • S. Lang, Algebra: 3rd edition, Addison-Wesley, 1993, p. 281.
  • Maier, Prog. Math. 85 (Birkhaueser), 1990, 349-366.
  • Maier, Prog. Math. 139 (Birkhaueser) 1996, 633-638.

Crossrefs

Programs

  • Mathematica
    Table[Position[Table[Max[Abs[Flatten[CoefficientList[Transpose[FactorList[x^i - 1]][[1]], x]]]], {i, 1, 10000}], j][[1]], {j, 1, 10}] (* Ian Miller, Feb 25 2008 *)
  • PARI
    nm=6545; m=0; forstep(n=1, nm, 2, if(issquarefree(n), p=polcyclo(n); o=poldegree(p); for(k=0, o, a=abs(polcoeff(p, k)); if(a>m, m=a; print([m, n, factor(n)])))))

Extensions

More terms from Eric W. Weisstein
Further terms from T. D. Noe, Oct 29 2007

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

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

Original entry on oeis.org

2, 3, 3, 7, 5, 31, 7, 127, 17, 73, 31, 2047, 21, 8191, 127, 443, 257, 131071, 73, 524287, 341, 7003, 2047, 8388607, 273, 1082401, 8191, 262657, 5461, 536870911, 443, 2147483647, 65537, 1797851, 131071, 26181091, 4161, 137438953471, 524287
Offset: 0

Views

Author

Antti Karttunen, Aug 03 2001

Keywords

Comments

a(n) = 2^n-1 whenever n is prime. It seems as if a(n) >= A005420(n) for all n (checked up to 200), with equality for all 1A005420(n)=2^n-1 (i.e., 2^n-1 is prime). - M. F. Hasler, Apr 30 2007
a(0) could also be 1. - T. D. Noe, Oct 29 2007

Crossrefs

Cf. A013594.
a(n) = A063696(n) (the positive terms) + A063698(n) (the negative terms).
This sequence in binary: A063671.
Cf. A005420.

Programs

  • Maple
    [seq(Phi_pos_terms(j,2)+Phi_neg_terms(j,2),j=0..104)];
  • Mathematica
    a[n_] := FromDigits[ If[# != 0, 1, 0]& /@ CoefficientList[ Cyclotomic[n, x], x], 2]; a[0] = 2; Table[a[n], {n, 0, 38}] (* Jean-François Alcover, Dec 11 2012 *)
  • PARI
    A063670(n)=local(p=polcyclo(n+!n)); if(n,sum(i=0, n, (polcoeff(p, i)<>0)<M. F. Hasler, Apr 30 2007
    
  • PARI
    a(n) = subst(apply(x->x!=0, polcyclo(n,'x)), 'x, 2);  \\ Gheorghe Coserea, Nov 04 2016
Showing 1-5 of 5 results.