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

A187360 Coefficient array for minimal polynomials of 2*cos(Pi/n) (rising powers of x).

Original entry on oeis.org

2, 1, 0, 1, -1, 1, -2, 0, 1, -1, -1, 1, -3, 0, 1, 1, -2, -1, 1, 2, 0, -4, 0, 1, -1, -3, 0, 1, 5, 0, -5, 0, 1, -1, 3, 3, -4, -1, 1, 1, 0, -4, 0, 1, -1, -3, 6, 4, -5, -1, 1, -7, 0, 14, 0, -7, 0, 1, 1, -4, -4, 1, 1, 2, 0, -16, 0, 20, 0, -8, 0, 1, 1, 4, -10, -10, 15, 6, -7, -1, 1
Offset: 1

Views

Author

Wolfdieter Lang, Jul 14 2011

Keywords

Comments

The degree delta(n) of the monic integer row polynomial, call it C(n,x), is A055034(n).
This minimal polynomial of the algebraic number 2*cos(Pi/n), n>=1, is given by
C(n,x) = sum(a(n,m)*x^m,m=0..A055034(n)) = (2^delta(n))*Psi(2n,x/2), with Psi(n,x) the minimal polynomial of cos(2Pi/n), with rational coefficient array A181875/A181876. There also references and links are found. See especially Watkins and Zeitlin for Psi(n,x).
The zeros of C(n,x), n>=2, are 2*cos(Pi k/n), with k=1,...,n-1 and gcd(k,2n)=1. For n=1 the zero is -2. Alternatively, these zeros are 2*cos(Pi(2l+1)/n), with l=0,...,floor((n-2)/2) and gcd(2l+1,n)=1. For n=1 take l=0.
The first column looks like the differently signed A020513(n),n>=1.
The polynomial for row n=2^m, m>=1, coincides with the row polynomial R(2^(m-1),x) of A127672. See the factorization of these R-polynomials (also known as Chebyshev C-polynomials) given there. - Wolfdieter Lang, Sep 15 2011
From Wolfdieter Lang, Nov 04 2013: (Start)
The norm N(rho(n)) of rho(n) = 2*cos(Pi/n), n >= 1, in the algebraic number field Q(rho(n)) is given by (-1)^delta(n)* C(n, 0), with C(n, x) of degree delta(n) = A055034(n). If N(rho(n)) equals +1 or -1 then 1/rho(n), which is an element of Q(rho(n)), is in fact an integer in this number field. For the 1/rho(n) formula in terms of the C coefficients see A230079. Thus 1/rho(n) is a Q(rho(n))-integer if and only if C(n, 0) is +1 or -1 , and this happens if and only if n is from the set {A230078(k), k >= 2}.
The negation says that, for n a positive integer, 1/rho(n) is not a Q(rho(n))-integer if and only if n is 1 or of the form 2*p^m, m >= 0 and p a prime, which are the numbers of A138929 including 1.
The proof uses for case (i): n = 2*m+1, m >= 1, the fact that C(2*m+1, 0)^2 = (product( 2*cos(Pi*(2*l+1)/(2*m+1)), l=0 .. m-1 and gcd(2*l+1, 2*m+1) = 1))^2 = (product(2*cos(Pi*k/(2*m+1)), k=1..L and gcd(k, 2*m+1) = 1))^2 = cyclotomic(2*m +1, -1). See the linked Q(rho(n)) paper, eq. (31), for a product formula for cyclotomic(n, -1). With the prime factorization of 2*m+1, and the fact that only the squarefree kernel of 2*m+1 enters (see an Oct 29 2013 comment on A013595), one finds, form the formula for cyclotomic(p1*p2*...*pk, x) involving the Moebius function, cyclotomic(2*m +1, -1) = +1, m >= 1. C(1, 0) = +2. For case (ii): n even, one has C(2^m, 0) = 0, -2, +2, for m = 1 , 2, >=3, respectively (see eq. (39) of the linked Q(rho(n)) paper). For odd prime p: (-1)^((p-1)/2)*C(2*p^m, 0) = cyclotomic(2*p^m, -1) = cyclotomic(2*p, -1) = cyclotomic(p, +1) = p, for m >= 1. For more than one odd prime in the squarefree kernel of n = 2*m, m >= 1, one finds C(2*m, 0) = +1 from cyclotomic(2*p1*...*pk, -1) = +1, for k >= 2. (End)
For the conversion of the C-polynomials into sums of Chebyshev's S-polynomials (A049310) see A255237. - Wolfdieter Lang, Mar 16 2015

Examples

			n=1:  2, 1;
n=2:  0, 1;
n=3: -1, 1;
n=4: -2, 0, 1;
n=5: -1,-1, 1;
n=6: -3, 0, 1;
n=7:  1,-2,-1, 1;
n=8:  2, 0,-4, 0, 1;
n=9: -1,-3, 0, 1;
n=10: 5, 0,-5, 0, 1;
...
C(2,x) = R(1,x), C(4,x) = R(2,x), C(8,x) = R(4,x),... with R(n,x) from A127672. - _Wolfdieter Lang_, Sep 15 2011
		

Crossrefs

Cf. A192003 (row sums). A192004 (alternating row sums).

Programs

  • Maple
    f:= proc(n) local P,z,j;
       P:= factor(evala(Norm(z-convert(2*cos(Pi/n),RootOf))));
       if type(P,`^`) then P:= op(1,P) fi;
       seq(coeff(P,z,j),j=0..degree(P));
    end proc:
    seq(f(n),n=1..20); # Robert Israel, Aug 04 2015
  • Mathematica
    Flatten[ CoefficientList[ Table[ MinimalPolynomial[2*Cos[Pi/n], x], {n, 1, 17}], x]] (* Jean-François Alcover, Sep 26 2011 *)
  • PARI
    halftot(n)=if(n<=2, 1, eulerphi(n)/2); \\ A023022
    default(realprecision, 110);
    row(n) = Vecrev(algdep(2*cos(2*Pi/n), halftot(n))); \\ Michel Marcus, Sep 19 2023

Formula

a(n,m) = [x^m] C(n,x), n>=1, m=0..A055034(n), with the minimal (monic and integer) polynomial C(n,x) of 2*cos(Pi/n). See the comment above.

A076264 Number of ternary (0,1,2) sequences without a consecutive '012'.

Original entry on oeis.org

1, 3, 9, 26, 75, 216, 622, 1791, 5157, 14849, 42756, 123111, 354484, 1020696, 2938977, 8462447, 24366645, 70160958, 202020427, 581694636, 1674922950, 4822748423, 13886550633, 39984728949, 115131438424, 331507764639
Offset: 0

Views

Author

John L. Drost, Nov 05 2002

Keywords

Comments

A transform of A000244 under the mapping g(x)->(1/(1+x^3))g(x/(1+x^3)). - Paul Barry, Oct 20 2004
b(n) := (-1)^n*a(n) appears in the formula for the nonpositive powers of rho(9) := 2*cos(Pi/9), when written in the power basis of the algebraic number field Q(rho(9)) of degree 3. See A187360 for the minimal polynomial C(9, x) of rho(9), and a link to the Q(2*cos(pi/n)) paper. 1/rho(9) = -3*1 + 0*rho(9) + 1*rho(9)^2 (see A230079, row n=5). 1/rho(9)^n = b(n)*1 + b(n-2)*rho(9) + b(n-1)*rho(9)^2, n >= 0, with b(-1) = 0 = b(-2). - Wolfdieter Lang, Nov 04 2013
The limit b(n+1)/b(n) = -a(n+1)/a(n) for n -> infinity is -tau(9) := -(1 + rho(9)) = 1/(2*cos(Pi*5/9)), approximately -2.445622407. tau(9) is known to be the length ratio (longest diagonal)/side in the regular 9-gon. This limit follows from the b(n)-recurrence and the solutions of X^3 + 3*X^2 - 1 = 0, which are given by the inverse of the known solutions of the minimal polynomial C(9, x) of rho(9) (see A187360). The other two X solutions are 1/rho(9) = -3 + rho(9)^2, approximately 0.5320888860 and 1/(2*cos(Pi*7/9)) = 1 + rho(9) - rho(9)^2, approximately -0.6527036445, and they are therefore irrelevant for this sequence. - Wolfdieter Lang, Nov 08 2013
a(n) is also the number of ternary (0,1,2) sequences of length n without a consecutive '110' because the patterns A=012 and B=110 have the same autocorrelation, i.e., AA=100=BB, in the sense of Guibas and Odlysko (1981). (A cyclic version of this sequence can be found in sequence A274018.) - Petros Hadjicostas, Sep 12 2017

Examples

			1/rho(9)^3 = -26*1 - 3*rho(9) + 9*rho(9)^2, (approximately 0.15064426) with rho(9) given in the Nov 04 2013 comment above. - _Wolfdieter Lang_, Nov 04 2013
G.f. = 1 + 3*x + 9*x^2 + 26*x^3 + 75*x^4 + 216*x^5 + 622*x^6 + 1791*x^7 + ...
		

References

  • A. Tucker, Applied Combinatorics, 4th ed. p. 277

Crossrefs

The g.f. corresponds to row 3 of triangle A225682.

Programs

  • GAP
    List([0..25],n->Sum([0..Int(n/3)],k->Binomial(n-2*k,k)*(-1)^k*3^(n-3*k))); # Muniru A Asiru, Feb 20 2018
  • Mathematica
    LinearRecurrence[{3,0,-1},{1,3,9},30] (* Harvey P. Dale, Feb 28 2016 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( 1 / (1 - 3*x + x^3) + x * O(x^n), n))};
    

Formula

a(n) is asymptotic to g*c^n where c = cos(Pi/18)/cos(7*Pi/18) and g is the largest real root of 81*x^3 - 81*x^2 - 9*x + 1 = 0. - Benoit Cloitre, Nov 06 2002
G.f.: 1/(1 - 3x + x^3).
a(n) = 3*a(n-1) - a(n-3), n > 0.
a(n) = Sum_{k=0..floor(n/3)} binomial(n-2k, k)(-1)^k*3^(n-3k). - Paul Barry, Oct 20 2004
a(n) = middle term in M^(n+1) * [1 0 0], where M = the 3 X 3 matrix [2 1 1 / 1 1 0 / 1 0 0]. Right term = A052536(n), left term = A052536(n+1). - Gary W. Adamson, Sep 05 2005

A230078 Complement of A138929: positive integers not of the form 2*p^k, k >= 0, p a prime (also 2).

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 12, 13, 15, 17, 19, 20, 21, 23, 24, 25, 27, 28, 29, 30, 31, 33, 35, 36, 37, 39, 40, 41, 42, 43, 44, 45, 47, 48, 49, 51, 52, 53, 55, 56, 57, 59, 60, 61, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 87, 88, 89, 90, 91, 92, 93, 95, 96, 97, 99, 100
Offset: 1

Views

Author

Wolfdieter Lang, Nov 02 2013

Keywords

Comments

The complement relative to the positive integers of the present sequence is A138929.
The sequence includes all positive integers of the forms (i) odd, (ii) 2^k*p, p an odd prime and k>=2, and (iii) 2^e0*p1^e1*p2^e2 *** pk^ek, k >= 2, with odd primes p1, ..., pk, and each exponent from {e0, ..., ek} is >= 1.
For a(n) > 1 a regular a(n)-gon, with length ratio (smallest diagonal)/side rho(a(n)) = 2*cos(Pi/a(n)), the inverse of rho(a(n)), which is an element of the algebraic number field Q(rho(a(n))), is in fact a Q(rho(a(n)))-integer. For a(1)=1 rho(1) = -2, and the inverse is not a Q-integer.

Examples

			Even members a(n) of the form (ii) 2^k*p, p an odd prime and k>=2 are: 12, 20, 24, 28, 36, 40, 44, 48, 52, 56, 68, 72, 76, 80, 88, 92, 96, 100,...
Even members a(n) of the form (iii), given above, include 30, 42, 60, 66, 70, 78, 84, 90, ...
For the regular 5-gon (pentagon) rho(5) = tau = (1 + sqrt(5))/ 2 (the golden section). The number field is Q(rho(5)), and for the inverse one has 1/rho(5) = -1*1 + 1* rho(5) (in the power basis <1, rho(5)>, in which Q(rho(5))-integers have integer coefficients).
For the regular 7-gon rho(7) = 2*cos(Pi/7), (approximately 1.801937736) is of degree 3, and 1/rho(7) = 2*1 + 1*rho(7) - 1*rho(7)^2, (approximately 0.5549581320), hence a Q(rho(7))- integer.
For Gauss' regular 17-gon rho(17) = 2*cos(Pi/17) (approximately 1.965946199) is of degree 8 and 1/rho(17) = -4*1+ 10*rho(17)^1 + 10*rho(17)^2  - 15*rho(17)^3 -6*rho(17)^4 + 7*rho(17)^5 + 1*rho(17)^6  -1*rho(17)^7, (approximately 0.5086610), hence this is a Q(rho(17))- integer.
		

Crossrefs

Cf. A138929 (complement), 2*A020513, A230079 (1/rho(a(n))).

Programs

  • Mathematica
    With[{upto = 100}, Complement[Range[upto], 2*Join[{1}, Select[Range[upto/2], PrimePowerQ]]]] (* Paolo Xausa, Aug 30 2024 *)
  • Python
    from sympy import primepi, integer_nthroot
    def A230078(n):
        if n == 1: return 1
        def f(x): return int(n+1+sum(primepi(integer_nthroot(x>>1,k)[0]) for k in range(1,(x>>1).bit_length())))
        kmin, kmax = 0,1
        while f(kmax) > kmax:
            kmax <<= 1
        while kmax-kmin > 1:
            kmid = kmax+kmin>>1
            if f(kmid) <= kmid:
                kmax = kmid
            else:
                kmin = kmid
        return kmax # Chai Wah Wu, Aug 29 2024
Showing 1-3 of 3 results.