A003558 Least number m > 0 such that 2^m == +-1 (mod 2n + 1).
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: 0
Keywords
Examples
a(3) = 3 since f(x) = x^2 - 2 has a period of 3 using seed 2*cos(2*Pi/7), where 7 = 2*3 + 1. a(15) = 5 since the iterative map of the logistic equation 4x*(1-x) has a period 5 using seed sin^2(2*Pi)/N; N = 31 = 2*15 + 1.
References
- Peter Hilton and Jean Pedersen, A Mathematical Tapestry: Demonstrating the Beautiful Unity of Mathematics, Cambridge University Press, 2010, pp. 261-264.
- Carl Schick, Trigonometrie und unterhaltsame Zahlentheorie, Bokos Druck, Zürich, 2003 (ISBN 3-9522917-0-6).
- Robert L. Devaney, A First Course in Chaotic Dynamical Systems, Theory and Experiment; Perseus Books Publishing, 1992, pp. 121-126.
Links
- T. D. Noe, Table of n, a(n) for n = 0..1000
- R. Bekes, J. Pedersen, and B. Shao, Mad tea party cyclic partitions, Coll. Math. J. 43 (1) (2012) 25-36, Jstor.
- William Q. Erickson, Daniel Herden, Jonathan Meddaugh, Mark R. Sepanski, Mitchell Minyard, and Kyle Rosengartner, Limits and Periodicity of Metamour 2-Distance Graphs, arXiv:2409.02306 [math.CO], 2024. See p. 9.
- Daniel Gabric and Jeffrey Shallit, Borders, Palindrome Prefixes, and Square Prefixes, arXiv:1906.03689 [cs.DM], 2019.
- P. Hilton and J. Pedersen, On Factoring 2^k+-1, The Math. Educ. 5 (1) (1994) 29-31.
- Jay Kappraff and Gary W. Adamson, Polygons and Chaos, Bridges: Mathematical Connections in Art, Music, and Science, 2001, pages 67-80.
- Anthony Kay and Katrina Downes-Ward, Fixed Points and Cycles of the Kaprekar Transformation: 1. Odd Bases, J. Int. Seq., Vol. 25 (2022), Article 22.6.7.
- Anthony Kay and Katrina Downes-Ward, Fixed Points and Cycles of the Kaprekar Transformation: 2. Even bases, arXiv:2408.12257 [math.CO], 2024. See p. 6.
- Torleiv Klove, On covering sets for limited-magnitude errors, Cryptogr. Commun. 8 (3) (2016) 415-433
- Wolfdieter Lang, The Field Q(2Cos Pi/N), its Galois group and length ratios in the regular n-gon, arXiv:1210.1018 [math.GR], 2012-2017.
- Wolfdieter Lang, On the Equivalence of Three Complete Cyclic Systems of Integers, arXiv:2008.04300 [math.NT], 2020.
- Paul Lévy, Sur quelques classes de permutations, Compositio Mathematica, 8 (1951), 1-48.
- Olivier Martin, Andrew M. Odlyzko, and Stephen Wolfram, Algebraic Properties of Cellular Automata, Communications in Mathematical Physics, volume 93, number 2, June 1984, pages 219-258, appendix B part C sord_N(2). Also third author's copy (and text).
- Harry J. Smith, XICalc - Extra Precision Integer Calculator. [Broken link]
- Gilbert Strang, A Chaotic Search for i, College Mathematics Journal 22, 3-12, (1991) [JSTOR].
- Eric Weisstein's World of Mathematics, Multiplicative Order.
- Eric Weisstein's World of Mathematics, Suborder Function.
Crossrefs
Programs
-
Maple
A003558 := proc(n) local m,mo ; if n = 0 then return 0 ; end if; for m from 1 do mo := modp(2^m,2*n+1) ; if mo in {1,2*n} then return m; end if; end do: end proc: seq(A003558(n),n=0..20) ; # R. J. Mathar, Dec 01 2014 f:= proc(n) local t; t:= numtheory:-mlog(-1,2,n); if t = FAIL then numtheory:-order(2,n) else t fi end proc: 0, seq(f(2*k+1),k=1..1000); # Robert Israel, Oct 26 2015
-
Mathematica
Suborder[a_,n_]:=If[n>1&&GCD[a,n]==1,Min[MultiplicativeOrder[a,n,{-1,1}]],0]; Join[{1},Table[Suborder[2,2n+1],{n,100}]] (* T. D. Noe, Aug 02 2006 *) (* revised by Vincenzo Librandi, Apr 11 2020 *)
-
PARI
a(n) = {m=1; while(m, if( (2^m) % (2*n+1) == 1 || (2^m) % (2*n+1) == 2*n, return(m)); m++)} \\ Altug Alkan, Nov 06 2015
-
PARI
isok(m, n) = my(md = Mod(2, 2*n+1)^m); (md==1) || (md==-1); A003558(n) = my(m=1); while(!isok(m,n) , m++); m; \\ Michel Marcus, May 06 2020
-
Python
def A003558(n): m, k = 1, 2 % (c:=(r:=n<<1)+1) while not (k==1 or k==r): k = 2*k%c m += 1 return m # Chai Wah Wu, Oct 09 2023
Formula
a(n) = log_2(A160657(n) + 2) - 1. - Nathaniel Johnston, May 22 2009
a(n-1) = card {cos((2^k)*Pi/(2*n-1)): k in N} for n >= 1 (see A216066, an essentially identical sequence, for more information). - Roman Witula, Sep 01 2012
a(n) <= n. - Charles R Greathouse IV, Sep 15 2012 [For n >= 1]
a(n) = min{k > 0 | q_k = q_0} where q_0 = 1 and q_k = |2*n+1 - 2*q_{k-1}| (cf. [Schick, p. 4]; q_k=1 for n=1; q_k=A010684(k) for n=2; q_k=A130794(k) for n=3; q_k=|A154870(k-1)| for n=4; q_k=|A135449(k)| for n=5.) - Jonathan Skowera, Jun 29 2013
2^(a(n)) == A332433(n) (mod (2*n+1)), and (2^(a(n)) - A332433(n))/(2*n+1) = A329593(n), for n >= 0. - Wolfdieter Lang, Apr 09 2020
Extensions
More terms from Harry J. Smith, Feb 11 2005
Entry revised by N. J. A. Sloane, Aug 02 2006 and again Dec 10 2017
Comments