A216066 a(n) = card {cos((2^k)*Pi/(2*n-1)): k in N}.
1, 1, 2, 3, 3, 5, 6, 4, 4, 9, 6, 11, 10, 9, 14, 5, 5, 12, 18, 12, 10, 7, 12, 23, 21, 8, 26, 20, 9, 29, 30, 6, 6, 33, 22, 35, 9, 20, 30, 39, 27, 41, 8, 28, 11, 12, 10, 36, 24, 15, 50, 51, 12, 53, 18, 36, 14, 44, 12, 24, 55, 20, 50, 7, 7, 65, 18, 36, 34, 69, 46
Offset: 1
Keywords
Examples
We have a(2)=1, a(3)=2, a(4)=3 and a(12)=11, a(11)=10, a(10)=9, and a(45)=11, a(46)=12, a(47)=10. Does exist some another k,l in N for which a(k)=p(l), a(k+1)=p(l+1), and a(k+2)=p(l+2), where p is a permutation on {l,l+1,l+2}?
Links
- Joerg Arndt, Table of n, a(n) for n = 1..1000
- R. Witula and D. Slota, Fixed and periodic points of polynomials generated by minimal polynomials of 2cos(2Pi/n), International J. Bifurcation and Chaos, 19 (9) (2009), 3005.
Programs
-
Mathematica
Suborder[k_, n_] := If[n > 1 && GCD[k, n] == 1, Min[MultiplicativeOrder[k, n, {-1, 1}]], 0]; a[n_] := If[n == 0, 1, Suborder[2, 2 n + 1]]; a /@ Range[0, 100] (* Jean-François Alcover, Mar 21 2020, after T. D. Noe in A003558 *)
-
PARI
a(n) = { my( g=Mod(2,2*n-1), f=g ); for (r=1, 2*n+2, if ( f == +1, return(r) ); if ( f == -1, return(r) ); f *= g; ); } /* Joerg Arndt, Sep 03 2012 */
-
PARI
/* computation by the comment from Robert Pfister: */ a(n) = { my( g = vectorsmall(n), e=vectorsmall(n,k,k), t ); my( ct = 1 ); \\ set g[] to the zip-permutation: forstep ( k=1, n, 2, g[k] = k\2 + 1); forstep ( k=2, n, 2, g[k] = n - k\2 + 1); t = g; while ( t != e, \\ until we hit identity ct += 1; t *= g; \\ t == g^ct ); return( ct ); } /* Joerg Arndt, Sep 12 2013 */
Formula
For n >= 2, a(n) = A003558(n-1).
Comments