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

A117215 Number of divisors of x^n-1 having the maximal height A114536(n).

Original entry on oeis.org

2, 4, 4, 8, 4, 2, 4, 16, 8, 2, 4, 2, 4, 2, 1, 32, 4, 14, 4, 2, 1, 2, 4, 20, 8, 2, 16, 2, 4, 2, 4, 64, 1, 2, 1, 18, 4, 2, 1, 2, 4, 2, 4, 2, 2, 2, 4, 2, 8, 14, 1, 2, 4, 70, 1, 2, 1, 2, 4, 2, 4, 2, 1, 128, 1, 2, 4, 2, 1, 2, 4, 10, 4, 2, 8, 2, 1, 2, 4, 4, 32, 2, 4, 2, 1, 2, 1, 2, 4, 2, 1, 2, 1, 2, 1, 32, 4, 14
Offset: 1

Views

Author

T. D. Noe, Mar 03 2006

Keywords

Comments

Let p be a prime. Then a(p)=4 because the divisors are x^p-1, x^(p-1)+x^(p-2)+...+1, x-1 and 1. Similarly, a(p^k)=2^(k+1). For n=p*2^k, a(n)=2. For odd primes p and q, a(pq)=1. Conjectures: if n is odd and squarefree, then a(n)=1; if n/2^k is odd and squarefree for k>0, then a(n)=2. All the divisors of x^n-1 are products of cyclotomic polynomials cyclo(d) for various d. When n is the product of distinct odd primes p1..pk, it appears that each cyclotomic index has the form d=p1^e1...pk^ek, where the ei are either 0 or 1 and sum(ei) is odd.

Examples

			a(6)=2 because x^3+2x^2+2x+1 and x^3-2x^2+2x-1 both divide x^6-1. In fact, their product is x^6-1.
		

Crossrefs

Cf. A114536.

Programs

  • Mathematica
    cyc[n_] := cyc[n] = Cyclotomic[n,x];
    PolyHeight[p_] := Max[Abs[CoefficientList[p,x]]];
    Table[sd=Subsets[Divisors[n]]; t=Table[PolyHeight[Expand[Product[ cyc[sd[[i,j]]], {j,Length[sd[[i]]]}]]], {i,Length[sd]}]; Length[ Position[t, Max[t]]], {n,105}]
  • PARI
    prod_by_bits(bits, fs) = { my(m=1,i=1); while(bits>0, if((bits%2),m *= fs[i]); i++; bits >>= 1); (m); };
    A117215(n) = { my(fs=factor('x^n - 1)[,1],m=0,d,mds=0,k); for(b=0,(2^#fs)-1,d = prod_by_bits(b,fs); k = 0; for(j=0,poldegree(d),k = max(k,abs(polcoeff(d,j)))); if(k==m, mds++, if(k>m, mds=1; m = k))); (mds); }; \\ Antti Karttunen, Jul 01 2018

A117343 Position of n in A114536.

Original entry on oeis.org

1, 6, 12, 20, 35, 48, 56, 72, 99, 108, 143, 30, 208, 200, 320, 272, 323, 144, 437, 110, 567
Offset: 1

Views

Author

Felipe Garcia (fgarciah(AT)ucla.edu) and Robert G. Wilson v, Mar 09 2006

Keywords

Comments

A114536: Let the height of a polynomial be the largest coefficient in absolute value. Then A114536(n) is the maximal height of a divisor of x^n-1 with integral coefficients.
a(23)=216, a(24)<=768, a(25)<=725, a(26)<=832, a(27)<=783, a(28)=182, a(29)<=899, a(30)<=972, a(31)<=992, a(32)=70, a(34)=288, a(35)=675, a(36)=154, a(37)<=784, a(38)<=1000, a(40)=306, a(41)=435, a(44)=506, a(45)<=1225, a(49)<=800, a(52)<=1378, a(54)=60, a(55)=84, a(56)=418, a(57)=195, a(58)=90, a(59)<=861, a(60)=126, ..., . - Robert G. Wilson v, Mar 09 2006

Crossrefs

Cf. A114536.

Programs

  • Mathematica
    cyc[n_] := cyc[n] = Cyclotomic[n, x]; f[n_] := Block[{sd = Take[Subsets@Divisors@n, {2, lmt = 2^(DivisorSigma[0, n] - 1)}], lst = {}, y = x^n - 1}, For[i = 1, i < lmt, i++, pr = Expand[Times @@ (cyc[ # ] & /@ sd[[i]])]; AppendTo[lst, Max@ Abs@ CoefficientList[pr, x]]; AppendTo[lst, Max@ Abs@ CoefficientList[Together[y/pr], x]]]; Max@lst];
    t = Array[f, 359]; Table[ Position[t, n, 1, 1], {n, 18}] // Flatten

Extensions

a(19)-a(21) from Robert G. Wilson v, Aug 02 2006

A284600 a(n) = n/(largest prime power dividing n).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 3, 1, 1, 2, 1, 4, 3, 2, 1, 3, 1, 2, 1, 4, 1, 6, 1, 1, 3, 2, 5, 4, 1, 2, 3, 5, 1, 6, 1, 4, 5, 2, 1, 3, 1, 2, 3, 4, 1, 2, 5, 7, 3, 2, 1, 12, 1, 2, 7, 1, 5, 6, 1, 4, 3, 10, 1, 8, 1, 2, 3, 4, 7, 6, 1, 5, 1, 2, 1, 12, 5, 2, 3, 8, 1, 10
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 30 2017

Keywords

Comments

a(n) = smallest positive number k such that n/k is a prime power.

Examples

			a(12) = 3 because 12 = 2^2*3 therefore 12/(largest prime power dividing 12) = 12/4 = 3.
		

Crossrefs

Has same beginning as A052128 and A114536 but is strictly different from those two sequences.

Programs

  • Maple
    f:= n ->  n /max(map(t -> t[1]^t[2], ifactors(n)[2])):
    f(1):= 1:
    map(f, [$1..100]); # Robert Israel, Apr 09 2017
  • Mathematica
    Join[{1}, Table[n/Last[Select[Divisors[n], PrimePowerQ[#1] &]], {n, 2, 90}]]
  • Python
    from sympy import lcm
    def a003418(n): return 1 if n<1 else lcm(range(1, n + 1))
    def a(n):
        m=1
        while True:
            if a003418(m)%n==0: return m
            else: m+=1
    print([n//a(n) for n in range(1, 101)]) # Indranil Ghosh, Apr 04 2017

Formula

a(n) = n/A034699(n).
a(n) = 1 if n is a prime power (A000961).
a(n) = 2 if n is a twice odd prime power (A278568).

A112407 Decimal expansion of a semiprime analog of a Ramanujan formula.

Original entry on oeis.org

7, 5, 4, 4, 9, 9, 7, 0, 1, 7, 0, 9, 5, 1, 4, 0, 7, 8, 3, 5, 5, 7, 1, 8, 1, 6, 8, 9, 5, 0, 5, 4, 1, 9, 8, 7, 0, 2, 5, 0, 7, 7, 6, 4, 4, 3, 5, 8, 7, 2, 2, 3, 3, 8, 9, 0, 9, 9, 7, 9, 9, 1, 6, 4, 2, 8, 4
Offset: 0

Views

Author

Jonathan Vos Post, Dec 21 2005

Keywords

Comments

This is related to Ramanujan's surprising formula: Prod[from n = 1 to infinity] (prime(n)^2 - 1)/ (prime(n)^2 + 1) = 2/5 and we use it in finding A112407 as the semiprime analog. We also use: A090986 = Decimal expansion of Pi csch Pi = Prod[from n = 2 to infinity] (n^2 - 1)/(n^2 + 1).
Since every integer above 1 is a k-almost prime for some k, we factor the (n^2 - 1)/(n^2 + 1) infinite product and use Ramanujan's formula, to have: Prod[from n = 1 to infinity] (prime(n)^2-1)/(prime(n)^2+1) * Prod[from n = 1 to infinity] (semiprime(n)^2 - 1)/(semiprime(n)^2 + 1) * Prod[from n = 1 to infinity] (3-almostprime(n)^2 - 1)/ (3-almostprime(n)^2 + 1) * ... * Prod[from n = 1 to infinity] (k-almostprime(n)^2 - 1)/ (k-almostprime(n)^2 + 1) * ... = Prod[from n = 2 to infinity] (n^2 - 1)/(n^2 + 1) = pi csch pi as each integer appear once and only once in numerator and once and only once in denominator.
2/5 is the first (Ramanujan, prime) term in this infinite product of infinite products. This here is the second (semiprime) term. A155799 is the third (3-almost prime) term. All of these have slow convergence.

Examples

			0.75449970170951407835571816895054...
		

References

  • Borwein, J.; Bailey, D.; and Girgensohn, R. "Two Products." Section 1.2 in Experimentation in Mathematics: Computational Paths to Discovery. Natick, MA: A. K. Peters, pp. 4-7, 2004.

Crossrefs

Programs

  • Mathematica
    spQ[n_] := Plus @@ Last /@ FactorInteger@n == 2; p = 1; Do[If[spQ[n], p = N[p*(n^2 - 1)/(n^2 + 1), 64]], {n, 10^6}]; p (* Robert G. Wilson v *) (* This program converges slowly. For {n, 10^6}, only the first 6 digits are correct. - Jason Yuen, Aug 10 2025 *)
  • PARI
    A(lim)=my(x=1.);forprime(p=2,lim\2,forprime(q=2,min(p,lim\p),x*=1-2/((p*q)^2+1)));x \\ Charles R Greathouse IV, Aug 15 2011

Formula

Decimal expansion of a = prod[from n = 1 to infinity] (semiprime(n)^2 - 1)/(semiprime(n)^2 + 1) = prod[from n = 1 to infinity] (A001358(n)^2 - 1)/(A001358(n)^2 + 1).
log a = -2*sum_{l=1..infinity} P_2(2*(2l-1))/(2l-1), where P_k(s) are the k-almost prime zeta functions of arXiv:0803.0900 [math.NT]. - R. J. Mathar, Jan 27 2009

Extensions

Edited and extended by R. J. Mathar, Jan 27 2009

A363959 Maximum height of an irreducible factor of any degree-n polynomial of height 1.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 7, 9, 9, 11, 14, 16, 17, 25, 33, 39
Offset: 1

Views

Author

Mike Speciner, Jun 29 2023

Keywords

Comments

We consider only polynomials with integer coefficients (Z[x]).
The sequence is increasing, since we can always multiply the best degree n-1 polynomial by x. I suspect (but haven't proven) that if we only considered polynomials with nonzero constant term, we'd get the same sequence.
Note that if we consider all factors, not just irreducible ones, then the resulting sequence would be bounded below by A114536.

Examples

			We will assume that the coefficient of x^n is 1. (If not, just multiply by -1.) Similarly, we can insist that all the factors will also have high order coefficient 1.
For n = 1, all degree 1 polynomials are irreducible, so they are their own irreducible factors, and so all their irreducible factors have the same height as them. Thus a(1) = 1.
For n = 2, the height 1 degree 2 polynomials and their factorizations are
  x^2-x-1 irreducible,
  x^2-x = (x-1)x,
  x^2-x+1 irreducible,
  x^2-1 = (x-1)(x+1),
  x^2 = x^2,
  x^2+1 irreducible,
  x^2+x-1 irreducible,
  x^2+x = x(x+1),
  x^2+x+1 irreducible.
All the irreducible factors have height 1, so a(2) = 1.
For n = 12, we have x^12-x^11+x^10+x^9-x^8+x^7-x^6+x^5+x^4+x^3-x+1 = (x+1)^2*(x^10-3x^9+6x^8-8x^7+9x^6-9x^5+8x^4-6x^3+5x^2-3x+1).
The height (maximum absolute value of the coefficients) of the product is 1, while the height of the final irreducible factor is 9.
No other height 1 degree 12 polynomial has an irreducible factor with larger height.
So a(12) = 9.
		

Programs

  • Python
    from msmath.poly import polynomial as poly
    def height(p) :
      """find the height, i.e. max abs coeff, of poly p"""
      return max(map(abs,p));
    def height1(n) :
      """generate all height 1 polys of degree n"""
      for a in range(3**n) :
        p = [1];
        for i in range(n) :
          a,r = divmod(a,3);
          p.append(r-1);
        yield poly(*p);
    def a(n) :
      """Return highest height of any irreducible factor of any degree n height 1 poly"""
      highest = (0,0);
      for p in height1(n) :
        f = p.factor();
        h = max(map(lambda f:(height(f),-f.degree),f));
        if highest < h:
          highest = h;
          best = sorted(f,key=len);
          best = {x:f[x] for x in best};
      return highest[0];

Extensions

a(20) from Mike Speciner, Jul 09 2025

A373196 Maximal coefficient (in absolute value) in the numerator of C({1..n},x).

Original entry on oeis.org

1, 1, 2, 17, 444, 66559954, 14648786369948422, 791540878703169050660325841979096789557779, 1918013047695258943191946313451491492494186620117241479813740479213857275772347178176158
Offset: 0

Views

Author

John Tyler Rascoe, Jun 28 2024

Keywords

Examples

			C_x({1,2,3},x) = (-x^15 - 5*x^14 - 12*x^13 - 17*x^12 - 11*x^11 + 4*x^10 + 16*x^9 + 10*x^8 - 6*x^6)/(x^15 + 4*x^14 + 7*x^13 + 4*x^12 - 8*x^11 - 18*x^10 - 13*x^9 + 7*x^8 + 19*x^7 + 11*x^6 - 6*x^5 - 10*x^4 - 2*x^3 + 3*x^2 + 2*x - 1) with maximal coefficient abs(-17) in the numerator, so a(3) = 17.
		

Crossrefs

Programs

  • PARI
    C_x(s)={my(g=if(#s <1,1, sum(i=1,#s, C_x(s[^i])*x^(s[i]))/(1-sum(i=1,#s, x^(s[i]))))); return(g)}
    a(n)={vecmax(abs(Vec(numerator(C_x([1..n])))))}

Formula

C({s},x) = Sum_{i in {s}} (C({s}-{i},x)*x^i)/(1 - Sum_{i in {s}} (x^i)) with C({},x) = 1.

A117342 Records in A113436.

Original entry on oeis.org

1, 2, 3, 4, 12, 54, 55, 58, 74, 192, 475, 10188
Offset: 1

Views

Author

Felipe Garcia (fgarciah(AT)ucla.edu) and Robert G. Wilson v, Mar 09 2006

Keywords

Comments

A114536: Let the height of a polynomial be the largest coefficient in absolute value. Then A114536(n) is the maximal height of a divisor of x^n-1 with integral coefficients.
Records occur at A113436(k): 1, 6, 12, 20, 30, 60, 84, 90, 105, 120, 180, 210.

Crossrefs

Cf. A114536.

Programs

  • Mathematica
    cyc[n_] := cyc[n] = Cyclotomic[n, x]; f[n_] := Block[{sd = Take[Subsets@Divisors@n, {2, lmt = 2^(DivisorSigma[0, n] - 1)}], lst = {}, y = x^n - 1}, For[i = 1, i < lmt, i++, pr = Expand[Times @@ (cyc[ # ] & /@ sd[[i]])]; AppendTo[lst, Max@ Abs@ CoefficientList[pr, x]]; AppendTo[lst, Max@ Abs@ CoefficientList[Together[y/pr], x]]]; Max@lst];
    t = Array[f, 359]; r = 0; Do[ a = t[[n]]; If[ a > r, Print[{n, a}]; r = a], {n, 359}]

Extensions

Possibly continues with A114536(464)=11712 & A114536(690)=12840.
Showing 1-7 of 7 results.