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-10 of 14 results. Next

A005408 The odd numbers: a(n) = 2*n + 1.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131
Offset: 0

Views

Author

Keywords

Comments

Leibniz's series: Pi/4 = Sum_{n>=0} (-1)^n/(2n+1) (cf. A072172).
Beginning of the ordering of the natural numbers used in Sharkovski's theorem - see the Cielsielski-Pogoda paper.
The Sharkovski ordering begins with the odd numbers >= 3, then twice these numbers, then 4 times them, then 8 times them, etc., ending with the powers of 2 in decreasing order, ending with 2^0 = 1.
Apart from initial term(s), dimension of the space of weight 2n cusp forms for Gamma_0(6).
Also continued fraction for coth(1) (A073747 is decimal expansion). - Rick L. Shepherd, Aug 07 2002
a(1) = 1; a(n) is the smallest number such that a(n) + a(i) is composite for all i = 1 to n-1. - Amarnath Murthy, Jul 14 2003
Smallest number greater than n, not a multiple of n, but containing it in binary representation. - Reinhard Zumkeller, Oct 06 2003
Numbers n such that phi(2n) = phi(n), where phi is Euler's totient (A000010). - Lekraj Beedassy, Aug 27 2004
Pi*sqrt(2)/4 = Sum_{n>=0} (-1)^floor(n/2)/(2n+1) = 1 + 1/3 - 1/5 - 1/7 + 1/9 + 1/11 ... [since periodic f(x)=x over -Pi < x < Pi = 2(sin(x)/1 - sin(2x)/2 + sin(3x)/3 - ...) using x = Pi/4 (Maor)]. - Gerald McGarvey, Feb 04 2005
For n > 1, numbers having 2 as an anti-divisor. - Alexandre Wajnberg, Oct 02 2005
a(n) = shortest side a of all integer-sided triangles with sides a <= b <= c and inradius n >= 1.
First differences of squares (A000290). - Lekraj Beedassy, Jul 15 2006
The odd numbers are the solution to the simplest recursion arising when assuming that the algorithm "merge sort" could merge in constant unit time, i.e., T(1):= 1, T(n):= T(floor(n/2)) + T(ceiling(n/2)) + 1. - Peter C. Heinig (algorithms(AT)gmx.de), Oct 14 2006
2n-5 counts the permutations in S_n which have zero occurrences of the pattern 312 and one occurrence of the pattern 123. - David Hoek (david.hok(AT)telia.com), Feb 28 2007
For n > 0: number of divisors of (n-1)th power of any squarefree semiprime: a(n) = A000005(A001248(k)^(n-1)); a(n) = A000005(A000302(n-1)) = A000005(A001019(n-1)) = A000005(A009969(n-1)) = A000005(A087752(n-1)). - Reinhard Zumkeller, Mar 04 2007
For n > 2, a(n-1) is the least integer not the sum of < n n-gonal numbers (0 allowed). - Jonathan Sondow, Jul 01 2007
A134451(a(n)) = abs(A134452(a(n))) = 1; union of A134453 and A134454. - Reinhard Zumkeller, Oct 27 2007
Numbers n such that sigma(2n) = 3*sigma(n). - Farideh Firoozbakht, Feb 26 2008
a(n) = A139391(A016825(n)) = A006370(A016825(n)). - Reinhard Zumkeller, Apr 17 2008
Number of divisors of 4^(n-1) for n > 0. - J. Lowell, Aug 30 2008
Equals INVERT transform of A078050 (signed - cf. comments); and row sums of triangle A144106. - Gary W. Adamson, Sep 11 2008
Odd numbers(n) = 2*n+1 = square pyramidal number(3*n+1) / triangular number(3*n+1). - Pierre CAMI, Sep 27 2008
A000035(a(n))=1, A059841(a(n))=0. - Reinhard Zumkeller, Sep 29 2008
Multiplicative closure of A065091. - Reinhard Zumkeller, Oct 14 2008
a(n) is also the maximum number of triangles that n+2 points in the same plane can determine. 3 points determine max 1 triangle; 4 points can give 3 triangles; 5 points can give 5; 6 points can give 7 etc. - Carmine Suriano, Jun 08 2009
Binomial transform of A130706, inverse binomial transform of A001787(without the initial 0). - Philippe Deléham, Sep 17 2009
Also the 3-rough numbers: positive integers that have no prime factors less than 3. - Michael B. Porter, Oct 08 2009
Or n without 2 as prime factor. - Juri-Stepan Gerasimov, Nov 19 2009
Given an L(2,1) labeling l of a graph G, let k be the maximum label assigned by l. The minimum k possible over all L(2,1) labelings of G is denoted by lambda(G). For n > 0, this sequence gives lambda(K_{n+1}) where K_{n+1} is the complete graph on n+1 vertices. - K.V.Iyer, Dec 19 2009
A176271 = odd numbers seen as a triangle read by rows: a(n) = A176271(A002024(n+1), A002260(n+1)). - Reinhard Zumkeller, Apr 13 2010
For n >= 1, a(n-1) = numbers k such that arithmetic mean of the first k positive integers is an integer. A040001(a(n-1)) = 1. See A145051 and A040001. - Jaroslav Krizek, May 28 2010
Union of A179084 and A179085. - Reinhard Zumkeller, Jun 28 2010
For n>0, continued fraction [1,1,n] = (n+1)/a(n); e.g., [1,1,7] = 8/15. - Gary W. Adamson, Jul 15 2010
Numbers that are the sum of two sequential integers. - Dominick Cancilla, Aug 09 2010
Cf. property described by Gary Detlefs in A113801: more generally, these numbers are of the form (2*h*n + (h-4)*(-1)^n - h)/4 (h and n in A000027), therefore ((2*h*n + (h-4)*(-1)^n - h)/4)^2 - 1 == 0 (mod h); in this case, a(n)^2 - 1 == 0 (mod 4). Also a(n)^2 - 1 == 0 (mod 8). - Bruno Berselli, Nov 17 2010
A004767 = a(a(n)). - Reinhard Zumkeller, Jun 27 2011
A001227(a(n)) = A000005(a(n)); A048272(a(n)) < 0. - Reinhard Zumkeller, Jan 21 2012
a(n) is the minimum number of tosses of a fair coin needed so that the probability of more than n heads is at least 1/2. In fact, Sum_{k=n+1..2n+1} Pr(k heads|2n+1 tosses) = 1/2. - Dennis P. Walsh, Apr 04 2012
A007814(a(n)) = 0; A037227(a(n)) = 1. - Reinhard Zumkeller, Jun 30 2012
1/N (i.e., 1/1, 1/2, 1/3, ...) = Sum_{j=1,3,5,...,infinity} k^j, where k is the infinite set of constants 1/exp.ArcSinh(N/2) = convergents to barover(N). The convergent to barover(1) or [1,1,1,...] = 1/phi = 0.6180339..., whereas c.f. barover(2) converges to 0.414213..., and so on. Thus, with k = 1/phi we obtain 1 = k^1 + k^3 + k^5 + ..., and with k = 0.414213... = (sqrt(2) - 1) we get 1/2 = k^1 + k^3 + k^5 + .... Likewise, with the convergent to barover(3) = 0.302775... = k, we get 1/3 = k^1 + k^3 + k^5 + ..., etc. - Gary W. Adamson, Jul 01 2012
Conjecture on primes with one coach (A216371) relating to the odd integers: iff an integer is in A216371 (primes with one coach either of the form 4q-1 or 4q+1, (q > 0)); the top row of its coach is composed of a permutation of the first q odd integers. Example: prime 19 (q = 5), has 5 terms in each row of its coach: 19: [1, 9, 5, 7, 3] ... [1, 1, 1, 2, 4]. This is interpreted: (19 - 1) = (2^1 * 9), (19 - 9) = (2^1 * 5), (19 - 5) = (2^1 - 7), (19 - 7) = (2^2 * 3), (19 - 3) = (2^4 * 1). - Gary W. Adamson, Sep 09 2012
A005408 is the numerator 2n-1 of the term (1/m^2 - 1/n^2) = (2n-1)/(mn)^2, n = m+1, m > 0 in the Rydberg formula, while A035287 is the denominator (mn)^2. So the quotient a(A005408)/a(A035287) simulates the Hydrogen spectral series of all hydrogen-like elements. - Freimut Marschner, Aug 10 2013
This sequence has unique factorization. The primitive elements are the odd primes (A065091). (Each term of the sequence can be expressed as a product of terms of the sequence. Primitive elements have only the trivial factorization. If the products of terms of the sequence are always in the sequence, and there is a unique factorization of each element into primitive elements, we say that the sequence has unique factorization. So, e.g., the composite numbers do not have unique factorization, because for example 36 = 4*9 = 6*6 has two distinct factorizations.) - Franklin T. Adams-Watters, Sep 28 2013
These are also numbers k such that (k^k+1)/(k+1) is an integer. - Derek Orr, May 22 2014
a(n-1) gives the number of distinct sums in the direct sum {1,2,3,..,n} + {1,2,3,..,n}. For example, {1} + {1} has only one possible sum so a(0) = 1. {1,2} + {1,2} has three distinct possible sums {2,3,4} so a(1) = 3. {1,2,3} + {1,2,3} has 5 distinct possible sums {2,3,4,5,6} so a(2) = 5. - Derek Orr, Nov 22 2014
The number of partitions of 4*n into at most 2 parts. - Colin Barker, Mar 31 2015
a(n) is representable as a sum of two but no fewer consecutive nonnegative integers, e.g., 1 = 0 + 1, 3 = 1 + 2, 5 = 2 + 3, etc. (see A138591). - Martin Renner, Mar 14 2016
Unique solution a( ) of the complementary equation a(n) = a(n-1)^2 - a(n-2)*b(n-1), where a(0) = 1, a(1) = 3, and a( ) and b( ) are increasing complementary sequences. - Clark Kimberling, Nov 21 2017
Also the number of maximal and maximum cliques in the n-centipede graph. - Eric W. Weisstein, Dec 01 2017
Lexicographically earliest sequence of distinct positive integers such that the average of any number of consecutive terms is always an integer. (For opposite property see A042963.) - Ivan Neretin, Dec 21 2017
Maximum number of non-intersecting line segments between vertices of a convex (n+2)-gon. - Christoph B. Kassir, Oct 21 2022
a(n) is the number of parking functions of size n+1 avoiding the patterns 123, 132, and 231. - Lara Pudwell, Apr 10 2023

Examples

			G.f. = q + 3*q^3 + 5*q^5 + 7*q^7 + 9*q^9 + 11*q^11 + 13*q^13 + 15*q^15 + ...
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 2.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 28.
  • T. Dantzig, The Language of Science, 4th Edition (1954) page 276.
  • H. Doerrie, 100 Great Problems of Elementary Mathematics, Dover, NY, 1965, p. 73.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §8.1 Terminology, p. 264.
  • D. Hök, Parvisa mönster i permutationer [Swedish], (2007).
  • E. Maor, Trigonometric Delights, Princeton University Press, NJ, 1998, pp. 203-205.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A120062 for sequences related to integer-sided triangles with integer inradius n.
Cf. A001651 (n=1 or 2 mod 3), A047209 (n=1 or 4 mod 5).
Cf. A003558, A216371, A179480 (relating to the Coach theorem).
Cf. A000754 (boustrophedon transform).

Programs

Formula

a(n) = 2*n + 1. a(-1 - n) = -a(n). a(n+1) = a(n) + 2.
G.f.: (1 + x) / (1 - x)^2.
E.g.f.: (1 + 2*x) * exp(x).
G.f. with interpolated zeros: (x^3+x)/((1-x)^2 * (1+x)^2); e.g.f. with interpolated zeros: x*(exp(x)+exp(-x))/2. - Geoffrey Critzer, Aug 25 2012
a(n) = L(n,-2)*(-1)^n, where L is defined as in A108299. - Reinhard Zumkeller, Jun 01 2005
Euler transform of length 2 sequence [3, -1]. - Michael Somos, Mar 30 2007
G.f. A(x) satisfies 0 = f(A(x), A(x^2)) where f(u, v) = v * (1 + 2*u) * (1 - 2*u + 16*v) - (u - 4*v)^2 * (1 + 2*u + 2*u^2). - Michael Somos, Mar 30 2007
a(n) = b(2*n + 1) where b(n) = n if n is odd is multiplicative. [This seems to say that A000027 is multiplicative? - R. J. Mathar, Sep 23 2011]
From Hieronymus Fischer, May 25 2007: (Start)
a(n) = (n+1)^2 - n^2.
G.f. g(x) = Sum_{k>=0} x^floor(sqrt(k)) = Sum_{k>=0} x^A000196(k). (End)
a(0) = 1, a(1) = 3, a(n) = 2*a(n-1) - a(n-2). - Jaume Oliver Lafont, May 07 2008
a(n) = A000330(A016777(n))/A000217(A016777(n)). - Pierre CAMI, Sep 27 2008
a(n) = A034856(n+1) - A000217(n) = A005843(n) + A000124(n) - A000217(n) = A005843(n) + 1. - Jaroslav Krizek, Sep 05 2009
a(n) = (n - 1) + n (sum of two sequential integers). - Dominick Cancilla, Aug 09 2010
a(n) = 4*A000217(n)+1 - 2*Sum_{i=1..n-1} a(i) for n > 1. - Bruno Berselli, Nov 17 2010
n*a(2n+1)^2+1 = (n+1)*a(2n)^2; e.g., 3*15^2+1 = 4*13^2. - Charlie Marion, Dec 31 2010
arctanh(x) = Sum_{n>=0} x^(2n+1)/a(n). - R. J. Mathar, Sep 23 2011
a(n) = det(f(i-j+1))A113311(n);%20for%20n%20%3C%200%20we%20have%20f(n)=0.%20-%20_Mircea%20Merca">{1<=i,j<=n}, where f(n) = A113311(n); for n < 0 we have f(n)=0. - _Mircea Merca, Jun 23 2012
G.f.: Q(0), where Q(k) = 1 + 2*(k+1)*x/( 1 - 1/(1 + 2*(k+1)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 11 2013
a(n) = floor(sqrt(2*A000384(n+1))). - Ivan N. Ianakiev, Jun 17 2013
a(n) = 3*A000330(n)/A000217(n), n > 0. - Ivan N. Ianakiev, Jul 12 2013
a(n) = Product_{k=1..2*n} 2*sin(Pi*k/(2*n+1)) = Product_{k=1..n} (2*sin(Pi*k/(2*n+1)))^2, n >= 0 (undefined product = 1). See an Oct 09 2013 formula contribution in A000027 with a reference. - Wolfdieter Lang, Oct 10 2013
Noting that as n -> infinity, sqrt(n^2 + n) -> n + 1/2, let f(n) = n + 1/2 - sqrt(n^2 + n). Then for n > 0, a(n) = round(1/f(n))/4. - Richard R. Forberg, Feb 16 2014
a(n) = Sum_{k=0..n+1} binomial(2*n+1,2*k)*4^(k)*bernoulli(2*k). - Vladimir Kruchinin, Feb 24 2015
a(n) = Sum_{k=0..n} binomial(6*n+3, 6*k)*Bernoulli(6*k). - Michel Marcus, Jan 11 2016
a(n) = A000225(n+1) - A005803(n+1). - Miquel Cerda, Nov 25 2016
O.g.f.: Sum_{n >= 1} phi(2*n-1)*x^(n-1)/(1 - x^(2*n-1)), where phi(n) is the Euler totient function A000010. - Peter Bala, Mar 22 2019
Sum_{n>=0} 1/a(n)^2 = Pi^2/8 = A111003. - Bernard Schott, Dec 10 2020
Sum_{n >= 1} (-1)^n/(a(n)*a(n+1)) = Pi/4 - 1/2 = 1/(3 + (1*3)/(4 + (3*5)/(4 + ... + (4*n^2 - 1)/(4 + ... )))). Cf. A016754. - Peter Bala, Mar 28 2024
a(n) = A055112(n)/oblong(n) = A193218(n+1)/Hex number(n). Compare to the Sep 27 2008 comment by Pierre CAMI. - Klaus Purath, Apr 23 2024
a(k*m) = k*a(m) - (k-1). - Ya-Ping Lu, Jun 25 2024
a(n) = A000217(a(n))/n for n > 0. - Stefano Spezia, Feb 15 2025

Extensions

Incorrect comment and example removed by Joerg Arndt, Mar 11 2010
Peripheral comments deleted by N. J. A. Sloane, May 09 2022

A003558 Least number m > 0 such that 2^m == +-1 (mod 2n + 1).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Multiplicative suborder of 2 (mod 2n+1) (or sord(2, 2n+1)).
This is called quasi-order of 2 mod b, with b = 2*n+1, for n >= 1, in the Hilton/Pederson reference.
For the complexity of computing this, see A002326.
Also, the order of the so-called "milk shuffle" of a deck of n cards, which maps cards (1,2,...,n) to (1,n,2,n-1,3,n-2,...). See the paper of Lévy. - Jeffrey Shallit, Jun 09 2019
It appears that under iteration of the base-n Kaprekar map, for even n > 2 (A165012, A165051, A165090, A151949 in bases 4, 6, 8, 10), almost all cycles are of length a(n/2 - 1); proved under the additional constraint that the cycle contains at least one element satisfying "number of digits (n-1) - number of digits 0 = o(total number of digits)". - Joseph Myers, Sep 05 2009
From Gary W. Adamson, Sep 20 2011: (Start)
a(n) can be determined by the cycle lengths of iterates using x^2 - 2, seed 2*cos(2*Pi/N); as shown in the A065941 comment of Sep 06 2011. The iterative map of the logistic equation 4x*(1-x) is likewise chaotic with the same cycle lengths but initiating the trajectory with sin^2(2*Pi/N), N = 2n+1 [Kappraff & Adamson, 2004]. Chaotic terms with the identical cycle lengths can be obtained by applying Newton's method to i = sqrt(-1) [Strang, also Kappraff and Adamson, 2003], resulting in the morphism for the cot(2*Pi/N) trajectory: (x^2-1)/2x. (End)
From Gary W. Adamson, Sep 11 2019: (Start)
Using x^2 - 2 with seed 2*cos(Pi/7), we obtain the period-three trajectory 1.8019377...-> 1.24697...-> -0.445041... For an odd prime N, the trajectory terms represent diagonal lengths of regular star 2N-gons, with edge the shortest value (0.445... in this case.) (Cf. "Polygons and Chaos", p. 9, Fig 4.) We can normalize such lengths by dividing through with the lowest value, giving 3 diagonals of the 14-gon: (1, 2.801937..., 4.048917...). Label the terms ranked in magnitude with odd integers (1, 3, 5), and we find that the diagonal lengths are in agreement with the diagonal formula (sin(j*Pi)/14)/(sin(Pi/14)), with j = (1,3,5). (End)
Roots of signed n-th row A054142 polynomials are chaotic with respect to the operation (-2, x^2), with cycle lengths a(n). Example: starting with a root to x^3 - 5x^2 + 6x - 1 = 0; (2 + 2*cos(2*Pi/N) = 3.24697...); we obtain the trajectory (3.24697...-> 1.55495...-> 0.198062...); the roots to the polynomial with cycle length 3 matching a(3) = 3. - Gary W. Adamson, Sep 21 2011
From Juhani Heino, Oct 26 2015: (Start)
Start a sequence with numbers 1 and n. For next numbers, add previous numbers going backwards until the sum is even. Then the new number is sum/2. I conjecture that the sequence returns to 1,n and a(n) is the cycle length.
For example:
1,7,4,2,1,7,... so a(7) = 4.
1,6,3,5,4,2,1,6,... so a(6) = 6. (End)
From Juhani Heino, Nov 06 2015: (Start)
Proof of the above conjecture: Let n = -1/2; thus 2n + 1 = 0, so operations are performed mod (2n + 1). When the member is even, it is divided by 2. When it is odd, multiply by n, so effectively divide by -2. This is all well-defined in the sense that new members m are 1 <= m <= n. Now see what happens starting from an odd member m. The next member is -m/2. As long as there are even members, divide by 2 and end up with an odd -m/(2^k). Now add all the members starting with m. The sum is m/(2^k). It's divided by 2, so the next member is m/(2^(k+1)). That is the same as (-m/(2^k))/(-2), as with the definition.
So actually start from 1 and always divide by 2, although the sign sometimes changes. Eventually 1 is reached again. The chain can be traversed backwards and then 2^(cycle length) == +-1 (mod 2n + 1).
To conclude, we take care of a(0): sequence 1,0 continues with zeros and never returns to 1. So let us declare that cycle length 0 means unavailable. (End)
From Gary W. Adamson, Aug 20 2019: (Start)
Terms in the sequence can be obtained by applying the doubling sequence mod (2n + 1), then counting the terms until the next term is == +1 (mod 2n + 1). Example: given 25, the trajectory is (1, 2, 4, 8, 16, 7, 14, 3, 6, 12).
The cycle ends since the next term is 24 == -1 (mod 25) and has a period of 10. (End)
From Gary W. Adamson, Sep 04 2019: (Start)
Conjecture of Kappraff and Adamson in "Polygons and Chaos", p. 13 Section 7, "Chaos and Number": Given the cycle length for N = 2n + 1, the same cycle length is present in bases 4, 9, 16, 25, ..., m^2, for the expansion of 1/N.
Examples: The cycle length for 7 is 3, likewise for 1/7 in base 4: 0.021021021.... In base 9 the expansion of 1/7 is 0.125125125... Check: The first few terms are 1/9 + 2/81 + 5/729 = 104/279 = 0.1426611... (close to 1/7 = 0.142857...). (End)
From Gary W. Adamson, Sep 24 2019: (Start)
An exception to the rule for 1/N in bases m^2: (when N divides m^2 as in 1/7 in base 49, = 7/49, rational). When all terms in the cycle are the same, the identity reduces to 1/N in (some bases) = .a, a, a, .... The minimal values of "a" for 1/N are provided as examples, with the generalization 1/N in base (N-1)^2 = .a, a, a, ... for N odd:
1/3 in base 4 = .1, 1, 1, ...
1/5 in base 16 = .3, 3, 3, ...
1/7 in base 36 = .5, 5, 5, ...
1/9 in base 64 = .7, 7, 7, ...
1/11 in base 100 = .9, 9, 9, ... (Check: the first three terms are 9/100 +9/(100^2) + 9/(100^3) = 0.090909 where 1/11 = 0.09090909...). (End)
For N = 2n+1, the corresponding entry is equal to the degree of the polynomial for N shown in (Lang, Table 2, p. 46). As shown, x^3 - 3x - 1 is the minimal polynomial for N = 9, with roots (1.87938..., -1.53208..., 0.347296...); matching the (abs) values of the 2*cos(Pi/9) trajectory using x^2 - 2. Thus, a(4) = 3. If N is prime, the polynomials shown in Table 2 are the same as those for the same N in A065941. If different, the minimal polynomials shown in Table 2 are factors of those in A065941. - Gary W. Adamson, Oct 01 2019
The terms in the 2*cos(Pi/N) trajectory (roots to the minimal polynomials in A187360 and (Lang)), are quickly obtained from the doubling trajectory (mod N) by using the operation L(m) 2*cos(x)--> 2*cos(m*x), where L(2), the second degree Lucas polynomial (A034807) is x^2 - 2. Relating to the heptagon and using seed 2*cos(Pi/7), we obtain the trajectory 1.8019..., 1.24697..., and 0.445041....; cyclic with period 3. All such roots can be derived from the N-th roots of Unity and can be mapped on the Vesica Piscis. Given the roots of Unity (Polar 1Angle(k*2*Pi/N), k = 1, 2, ..., (N-1)/2) the Vesica Piscis maps these points on the left (L) circle to the (R) circle by adding 1A(0) or (a + b*I) = (1 + 0i). But this operation is the same as vector addition in which the resultant vector is 1 + 1A(k*(2*Pi/N)). Example: given the radius at 2*Pi/7 on the left circle, this maps to (1 + 1A(2*Pi/7)) on the right circle; or 1A(2*Pi/7) --> (1.8019377...A(Pi/7). Similarly, 1 + 1A((2)*2*Pi/7)) maps to (1.24697...A (2*Pi/7); and 1 + 1A(3*2*Pi/7) maps to (.0445041...A(3*Pi/7). - Gary W. Adamson, Oct 23 2019
From Gary W. Adamson, Dec 01 2021: (Start)
As to segregating the two sets: (A014659 terms are those N = (2*n+1), N divides (2^m - 1), and (A014657 terms are those N that divide (2^m + 1)); it appears that the following criteria apply: Given IcoS(N, 1) (cf. Lang link "On the Equivalence...", p. 16, Definition 20), if the number of odd terms is odd, then N belongs to A014659, otherwise A014657. In IcoS(11, 1): (1, 2, 4, 3, 5), three odd terms indicate that 11 is a term in A014657. IcoS(15, 1) has the orbit (1, 2, 4, 7) with two odd terms indicating that 15 is a term in A014659.
It appears that if sin(2^m * Pi/N) has a negative sign, then N is in A014659; otherwise N is in A014657. With N = 15, m is 4 and sin(16 * Pi/15) is -0.2079116... If N is 11, m is 5 and sin(32 * Pi/11) is 0.2817325. (End)
On the iterative map using x^2 - 2, (Devaney, p. 126) states that we must find the function that takes 2*cos(Pi) -> 2*cos(2*Pi). "However, we may write 2*cos(2*Pi) = 2*(2*cos^2(Pi) - 1) = (2*cos(Pi))^2 - 2. So the required function is x^2 - 2." On the period 3 implies chaos theorem of James Yorke and T.Y. Li, proved in 1975; Devaney (p. 133) states that if F is continuous and we find a cycle of period 3, there are infinitely many other cycles for this map with every possible period. Check: The x^2 - 2 orbit for 7 has a period of 3, so this entry has periodic points of all other periods. - Gary W. Adamson, Jan 04 2023
It appears that a(n) is the length of the cycle starting at 2/(2*n+1) for the map x->1 - abs(2*x-1). - Michel Marcus, Jul 16 2025

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.

Crossrefs

Cf. A054142, A065941, A085478, A160657, A179480, A135303 (coach numbers), A216371 (odd primes with one coach), A000215 (Fermat numbers).
A216066 is an essentially identical sequence apart from the offset.
Cf. A329593, A332433 (signs).

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

A082654 Order of 4 mod n-th prime: least k such that prime(n) divides 4^k-1, n >= 2.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 4, 9, 11, 14, 5, 18, 10, 7, 23, 26, 29, 30, 33, 35, 9, 39, 41, 11, 24, 50, 51, 53, 18, 14, 7, 65, 34, 69, 74, 15, 26, 81, 83, 86, 89, 90, 95, 48, 98, 99, 105, 37, 113, 38, 29, 119, 12, 25, 8, 131, 134, 135, 46, 35, 47, 146, 51, 155, 78, 158
Offset: 1

Views

Author

Gary W. Adamson, May 17 2003

Keywords

Comments

The period of the expansion of 1/p, base N (where N=4), is equivalent to determining for base integer 4, the period of the sequence 1, 4, 4^2, 4^3, ... mod p. Thus the cycle length for base 4, 1/7 = 0.021021021... (cycle length 3).
The cycle length, base 4, mod p, is equivalent to "clock cycles", given angle A, then the algebraic identity for the doubling angle, 2A.
Examples: Given cos A, f(x) for 2A = 2x^2 - 1, seed 2 Pi/7, i.e., (.623489801 == (arrow), -.222520934... == -.900968867...== .623489801...(cycle length 3). Given 2 cos A, the algebraic identity for 2 cos 2A, f(x) = x^2 - 2; e.g., given seed 2 cos A = 2 Pi/7, the 3 cycle is 1.246979604...== .445041867...== -1.801937736...== back to 1.24697... Likewise, the doubling function given sin^2 A, f(x) for sin^2 2A = 4x(1 - x), the logistic equation; getting cycle length of 3 using the seed sin^2 2 Pi/7. Similarly, the doubling function for tan 2A given tan A, where A = 2 Pi/7 gives 2x/(1 - x^2), cycle length of 3. The doubling function for cot 2A given cot A, with A = 2 Pi/7 gives (x^2 - 1)/2x, cycle length of 3. Note that (x^2 - 1)/2x = sinh(log(x)), and is also generated from using Newton's method on x^2 + 1 = 0.
Consider the odd pseudoprimes, composite numbers x such that 2^(x-1) = 1 mod x, that have prime(n) as a factor. It appears that all such x can be factored as prime(n) * (2 a(n) k + 1) for some integer k. For example, the first few pseudoprimes having the factor 31 are 31*11, 31*91, 31*141 and 3*151. The 11th prime is 31 and a(11) = 5. Therefore all the cofactors of 31 should have the form 10k+1, which is clearly true. - T. D. Noe, Jun 10 2003

Examples

			4th prime is 7 and mod 7, 4^3 = 1, but not 4^1 or 4^2, so a(4) = 3.
n = 4: prime(4) = 7, 2^6 - 1 = 63 = 3*21 == 0 (mod 21), but not 2^k - 1 for lower exponents k >= 1, therefore ord(2, 3*7) = 6 and a(4) = 3. - _Wolfdieter Lang_, Apr 10 2020
		

References

  • Albert H. Beiler, Recreations in the Theory of Numbers, Dover, 1964; Table 48, pages 98-99.
  • John H. Conway & R. K. Guy, The Book of Numbers, Springer-Verlag, 1996, pages 207-208, Periodic Points.

Crossrefs

Cf. A053447 (order of 4 mod 2n+1), A216371.

Programs

  • GAP
    A000040:=Filtered([1..350],IsPrime);;
    List([1..Length(A000040)],n->OrderMod(4,A000040[n])); # Muniru A Asiru, Feb 07 2019
  • Mathematica
    Join[{0}, Table[MultiplicativeOrder[4, Prime[n]], {n, 2, 100}]]
  • PARI
    a(n)=if(n>1, znorder(Mod(4,prime(n))), 0) \\ Charles R Greathouse IV, Sep 07 2016
    

Formula

a(1) = 0, and a(n) = order(4, prime(n)), also used exp_{prime(n)}(4), that is least exponent k >= 1 for which 4^k is congruent to 1 mod prime(n), for n >= 2. prime(n) = A000040(n). [rewritten by Wolfdieter Lang, Apr 10 2020]
From Wolfdieter Lang, Apr 10 2020: (Start)
a(n) = A003558(prime(n)), for n >= 2.
a(n) = (1/2)*order(2, 3*prime(n)), for n >= 3. [Proof uses 4^k - 1 = (1+3)^k - 1 == 0 (mod 3), for k >= 0.] (End)
From Jianing Song, May 13 2024: (Start)
a(n) = A014664(n)/gcd(2, A014664(n)).
a(n) <= (prime(n) - 1)/2. Those prime(n) for which a(n) = (prime(n) - 1)/2 are listed in A216371. (End)

Extensions

More terms from Reinhard Zumkeller, May 17 2003

A053447 Multiplicative order of 4 mod 2n+1.

Original entry on oeis.org

1, 1, 2, 3, 3, 5, 6, 2, 4, 9, 3, 11, 10, 9, 14, 5, 5, 6, 18, 6, 10, 7, 6, 23, 21, 4, 26, 10, 9, 29, 30, 3, 6, 33, 11, 35, 9, 10, 15, 39, 27, 41, 4, 14, 11, 6, 5, 18, 24, 15, 50, 51, 6, 53, 18, 18, 14, 22, 6, 12, 55, 10, 50, 7, 7, 65, 9, 18, 34, 69, 23, 30, 14, 21, 74, 15, 12, 10, 26
Offset: 0

Views

Author

Keywords

Comments

For a set S = {x, y} (x < y), let f(S) = {2x, y - x}, then a(n) is the smallest k > 0 such that f_k({1, 2n}) = {1, 2n} where f_k(S) denotes iteration for k times. E.g., for n = 3 we have: f_1({1, 6}) = f({1, 6}) = {2, 5}, f_2({1, 6}) = f({2, 5}) = {3, 4}, f_3({1, 6}) = f({3, 4}) = {1, 6}. - Jianing Song, Jan 27 2019
From Jianing Song, Dec 24 2022: (Start)
Let psi = A002322. For n > 0, we have 4^(psi(2*n+1)/2) = 2^psi(2*n+1) == 1 (mod 2*n+1), so a(n) divides psi(2*n+1)/2 => a(n) <= psi(2*n+1)/2 <= n. a(n) = psi(2*n+1)/2 if and only if one of the two following conditions holds: (a) the multiplicative order of 2 modulo 2*n+1 is psi(2*n+1); (b) the multiplicative order of 2 modulo 2*n+1 is psi(2*n+1)/2, and psi(2*n+1) == 2 (mod 4).
Additionally, a(n) = n if and only if 2*n+1 = p is a prime, and one of the two following conditions holds: (a) 2 is a primitive root modulo p; (b) p == 3 (mod 4), and the multiplicative order of 2 modulo p is (p-1)/2 (in this case, we have p == 7 (mod 8) since 2 is a quadratic residue modulo p). Such primes p are listed in A216371. (End)

Crossrefs

Programs

  • GAP
    List([0..80],n->OrderMod(4,2*n+1)); # Muniru A Asiru, Feb 25 2019
  • Magma
    [1] cat [Modorder(4, 2*n+1): n in [1..100]]; // Vincenzo Librandi, Apr 01 2014
    
  • Mathematica
    Table[ MultiplicativeOrder[4, n], {n, 1, 160, 2}] (* Robert G. Wilson v, Apr 05 2011 *)
  • PARI
    a(n) = znorder(Mod(4, 2*n+1)); \\ Michel Marcus, Feb 05 2015
    

Formula

Let b = A002326, then a(n) = b(n) if b(n) is odd, otherwise a(n) = b(n)/2. - Joerg Arndt, Feb 03 2019

A135303 a(n) = phi(2*n+1)/(2*A003558(n)), where phi = A000010.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 1, 1, 3, 4, 1, 1, 1, 4, 1, 1, 1, 1, 1, 4, 1, 4, 3, 3, 1, 2, 2, 1, 1, 2, 1, 3, 1, 4, 1, 3, 2, 1, 2, 1, 9, 6, 1, 3, 1, 2, 1, 1, 1, 4, 1, 1, 5, 2, 3, 3, 1, 2, 1, 2, 1, 1, 6, 1, 1, 2
Offset: 1

Views

Author

N. J. A. Sloane, Dec 05 2007

Keywords

Comments

The Froemke-Grossman 1988 reference is the earliest I have seen. a(n) is the charm bracelet function b(2,2*n+1) in their notation. - N. J. A. Sloane, Feb 28 2023
This sequence is called the "coach numbers" ("c(2*n+1)"), and was studied by J. Pedersen, Byron Walden, Victor Quintanar-Zilinskas and Linda Velarde of Santa Clara University. Coach Theorem: Let b = 2*n+1 > 1 and let phi(b) be the Euler totient function. Let Sigma(b) be the complete symbol of b, let c be the number of coaches in Sigma(b), and let k = Sum_{i=1..r} k(i). Then phi(b) = 2 * c * k [Hilton & Pedersen, p. 262]. The complete symbols for b = 17 and 43 are shown in the examples. - Gary W. Adamson, Aug 15 2012
Conjecture relating to primes with more than one coach: The combined set of integers in the top rows of all coaches of these primes is composed of a permutation of the first q odd integers, where prime p = (4q-1) or (4q+1), (q > 0). Example: As shown for 17, this prime has two coaches with the top rows [1] and [3, 7, 5]. 43 has three coaches with q = 11. The top rows are [1, 21, 11], [3, 5, 19], [7, 9, 17, 13, 15]. The comment of Sep 08 2012 in A216371 applies to primes with one coach, in which case "all coaches" is reduced to one and the set of q odd integers is in the top row of the coach. - Gary W. Adamson, Sep 10 2012
Conjecture [Carl Schick]: If 2*n+1 is prime, then these are the number of distinct cycles of f(k) = |(2*n+1) - 2*k| beginning at an odd number 0 < k < 2*n. - Jonathan Skowera, Aug 03 2013 [See also the Brändli and Beyne link, eq. (2). - Wolfdieter Lang, Feb 08 2020]
From Gary W. Adamson, Oct 04 2019: (Start)
Conjecture of Aug 03 2013 proved by Jean Pedersen. By way of example, take A003558(5) = 11, such that
2^5 == -1 (mod 11). Then Pedersen on p. 98 has:
11 - 1 = 2^1 * 5 (pick "1", odd, the putative seed number)
11 - 5 = 2^1 * 3 (then subtract 3 in the next row)
11 - 3 = 2^3 * 1 (cycle ends). Then Pedersen constructs the "coach" (p. 98) for N= 11: [1, 5, 3]
.......... [1, 1, 3]. The top row represents the angles on the tape used to construct an 11-gon at the operative crease lines beginning with Pi/11. (extract the (1,5,3) column). Then extract the exponents of 2: (1,1,3); which are the bottom row terms. The final result is that at successive creases on the tape are at angles of j*Pi/11, j = (1,5,3); alternatively at the top of the tape, then the bottom. The code U(1), D(1), U(3) is understood to be those numbers of bisections at each vertex. The total numbers of bisections = 5 = (1 + 1 + 3), shown to be the entry for N = 11 in A003558. (End)

Examples

			Refer to A003558 for the J. Pedersen definition of a Coach. a(8) for b = 17 = 2 since 17 has two possible Coaches:
17: [1] and [3, 7, 5]
    [4]     [1, 1, 2];
where sum of the bottom row terms = k = 4 = A003558(8). For b = 43, a(21) = 3 since there are three possible coaches for 43:
43: [1, 21, 11]  [3, 5, 19]  [7, 9, 17, 13, 15]
    [1,  1,  5], [3, 1,  3], [2, 1,  1,  1,  2],
where k = sum of terms in bottom rows of all possible coaches = 7 = A003558(21). For the coach with a "1" in the top row, the numbers of terms in the rows ("j" in A003558), = A179480(22) = 3. Note that the parity of numbers of terms in the bottom coach rows is the same.
From _Gary W. Adamson_, Aug 24 2019: (Start)
An alternative to the coach method of Pedersen and Hilton involves the doubling sequence, mod n; (43 in this case). The top row begins (1, 2, 4, 8, 16, ...) but the next number is 11, not 32. 32 == -11 (mod 43). We pick the least (in absolute value) of the two candidates (11 and 32): 11. The top row ends when the rightmost term is (n-1)/2 = 21. In subsequent rows the leftmost term is the least odd number not previously used, in this case 3. Continue with the doubling sequence and stop when the next row produces a term already used.
"20" ends row 2 since (2 * 20) = 40 == -3 (mod 43). 3 has been used so that row ends and our next row begins with the next unused odd term, a 7. That row ends with 18 since 2 * 18 = 36 == -7 (mod 43).
The entire set is complete when every term (1 through (n-1)/2) is present without duplication. In this method, k is likewise 7 but is represented by the numbers of terms in the top row. Pedersen's [1, 21, 11] appears as the only odd terms of the top row. [3,  5, 19] appears as the odd terms of the middle row, and [7, 9, 17, 13, 15] are the only odd terms of the bottom row. The three completed rows are:
  [1,  2,  4,  8, 16, 11, 21;
   3,  6, 12, 19,  5, 10, 20;
   7, 14, 15, 13, 17,  9, 18]
  It appears that the numbers of rows is equal to Pedersen's
  number of coaches. Another example is the complete system of coaches shown on p. 261 of (Hilton and Pedersen):
  31: [1, 15], [3, 7], [5, 13, 9, 11]
      [1,  4], [2, 3], [1,  1, 1,  2]
  The alternative system, called an r-t table in A065941, is
     [1,  2,  4, 8, 15;
      3,  6, 12, 7, 14;
      5, 10, 11, 9, 13]
  The odd terms of the top row (1, 15) appear in the leftmost coach. The odd terms (3, 7) appear in the middle coach, and (5, 11, 9, 13) are shown in the rightmost coach. (End)
Pedersen's coaches can be derived from the alternative system, doubling (mod N) since her coaches are simply another version: (repeated bisections (mod N)). First write out the doubling terms (mod N). Say N = 23: 1, 2, 4, 8, 7, 9, 5, 10, 3, 6, 11, representing the trajectory of terms 2*cos(j*Pi/23), using (x^2-2); j = 1, 2, 4, .... Begin with ("1"), then jump to the next odd term (11), then to each odd term in succession going left, getting: 23: (1, 11, 3, 5, 9, 7); the top row in Pedersen's coach. ....(1, 2, 2, 1, 1, 4) is the bottom row for 23 as shown on p. 105. Those terms are the numbers of term jumps in the previous operation; for example (1 to 11) = 1, (11 to 3) = 2, (3 to 5) = 2; and so on.  Note that the number of terms in the doubling trajectory (11) matches the sum of terms in the bottom row of the coach, satisfying 2^11 == 1 (mod 23). - _Gary W. Adamson_, Oct 23 2019
		

References

  • Froemke, Jon, and Jerrold W. Grossman. "An algebraic approach to some number-theoretic problems arising from paper-folding regular polygons." The American mathematical monthly 95.4 (1988): 289-307. See Appendix.
  • Peter Hilton & Jean Pedersen, A Mathematical Tapestry: Demonstrating the Beautiful Unity of Mathematics; Cambridge University Press, 2010, pages 260-264.
  • Carl Schick, Trigonometrie und unterhaltsame Zahlentheorie, Bokos Druck, Zürich, 2003 (ISBN 3-9522917-0-6). Tables 3.1 to 3.10, for odd p = 3..113, pp. 158-166.

Crossrefs

Cf. A216371 (odd primes with one coach).

Programs

  • Maple
    A135303 := proc(n)
        numtheory[phi](2*n+1)/2/A003558(n) ;
    end proc:
    seq(A135303(n),n=1..40) ; # R. J. Mathar, Dec 01 2014
  • Mathematica
    Array[EulerPhi[#2]/(2 If[#2 > 1 && GCD[#1, #2] == 1, Min[MultiplicativeOrder[#1, #2, {-1, 1}]], 0]) & @@ {2, 2 # + 1} &, 105] (* Michael De Vlieger, Oct 25 2019 *)
  • PARI
    isok8(m, n) = my(md = Mod(2, 2*n+1)^m); (md==1) || (md==-1);
    A003558(n) = my(m=1); while(!isok8(m, n) , m++); m;
    a(n) = eulerphi(2*n+1)/(2*A003558(n)); \\ Michel Marcus, Jun 11 2020

Formula

a(n) = "c", a Coach number; = A000010(n)/(2*A003558(n-1)/2)); or phi(2*n+1) = 2 * c * k, with c = Coach numbers, k = A003558.

Extensions

Title changed by Wolfdieter Lang and M. F. Hasler, Feb 20 2020

A179480 Let m>k>0 be odd numbers and denote by the symbol "m<->k" the value A000265(m-k). Then the sequence m<->k, m<->(m<->k), m<->(m<->(m<->k)), ... is periodic; a(n) is the smallest period in the case m=2*n-1, k=1.

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 2, 1, 5, 2, 6, 5, 5, 7, 2, 1, 6, 9, 6, 3, 3, 6, 12, 10, 4, 13, 10, 3, 15, 15, 2, 1, 17, 10, 18, 2, 10, 14, 20, 13, 21, 2, 14, 4, 6, 4, 18, 11, 9, 25, 26, 4, 27, 9, 18, 5, 22, 4, 12, 27, 10, 25, 2, 1, 33, 6, 18, 15, 35, 22, 30, 3, 22, 37, 6, 12, 10, 13, 26
Offset: 2

Views

Author

Vladimir Shevelev, Jul 16 2010

Keywords

Comments

A dual sequence to A179382.
Let b = (2*n-1) and k = A003558(n-1). If a(n) is odd, b divides (2^k + 1); but if a(n) is even, b divides (2^k - 1). Examples: a(14) = 5, odd; with b = 27 and A003558(13) = 9. Then 27 divides (2^9 + 1) or 513 = 27 * 19. a(18) = 6, even. b = 35, with k= A003558(17) = 12. Then 35 divides (2^12 - 1). - Gary W. Adamson, Aug 20 2012.
Iff a(n) = n/2 or (n-1)/2, then 2*n - 1 is a prime with one coach and is in A216371. Examples: a(19) = 9, so 37 is in A216371. a(12) = 6, so 23 is in A216371. - _Gary W. Adamson, Sep 08 2012.

Examples

			If n=14, then m=27 and we have 27<->1=13, 27<->13=7, 27<->7=5, 27<->5=11, 27<->11=1. Thus a(14)=5.
		

Crossrefs

Programs

  • Maple
    Contribution from R. J. Mathar, Nov 04 2010: (Start)
    A179480aux := proc(x,y) local xtrack,xitr,xpos ; xtrack := [y] ; while true do xitr := A000265(x-op(-1,xtrack)) ; if not member(xitr, xtrack,'xpos') then xtrack := [op(xtrack),xitr] ; else return 1+nops(xtrack)-xpos ; end if; end do: end proc:
    A179480 := proc(n) A179480aux(2*n-1,1) ; end proc: seq(A179480(n),n=2..80) ; (End)
  • Mathematica
    oddres[n_] := n/2^IntegerExponent[n, 2];
    b[x_, y_] := Module[{xtrack = {y}, xitr}, While[True, xitr = oddres[x - Last@ xtrack]; If[FreeQ[xtrack, xitr], AppendTo[xtrack, xitr], Return[ Length[xtrack]]]]];
    a[n_] := b[2n-1, 1];
    a /@ Range[2, 80] (* Jean-François Alcover, Apr 13 2020, after R. J. Mathar *)

Extensions

Edited by N. J. A. Sloane, Jul 18 2010
More terms from R. J. Mathar, Nov 04 2010

A054639 Queneau numbers: numbers n such that the Queneau-Daniel permutation {1, 2, 3, ..., n} -> {n, 1, n-1, 2, n-2, 3, ...} is of order n.

Original entry on oeis.org

1, 2, 3, 5, 6, 9, 11, 14, 18, 23, 26, 29, 30, 33, 35, 39, 41, 50, 51, 53, 65, 69, 74, 81, 83, 86, 89, 90, 95, 98, 99, 105, 113, 119, 131, 134, 135, 146, 155, 158, 173, 174, 179, 183, 186, 189, 191, 194, 209, 210, 221, 230, 231, 233, 239
Offset: 1

Views

Author

Gilles Esposito-Farese (gef(AT)cpt.univ-mrs.fr), May 17 2000

Keywords

Comments

The troubadour Arnaut Daniel composed sestinas based on the permutation 123456 -> 615243, which cycles after 6 iterations.
Roubaud quotes the number 141, but the corresponding Queneau-Daniel permutation is only of order 47 = 141/3.
This appears to coincide with the numbers n such that a type-2 optimal normal basis exists for GF(2^n) over GF(2). But are these two sequences really the same? - Joerg Arndt, Feb 11 2008
The answer is Yes - see Theorem 2 of the Dumas reference. [Jean-Guillaume Dumas (Jean-Guillaume.Dumas(AT)imag.fr), Mar 20 2008]
From Peter R. J. Asveld, Aug 17 2009: (Start)
a(n) is the n-th T-prime (Twist prime). For N >= 2, the family of twist permutations is defined by
p(m,N) == +2m (mod 2N+1) if 1 <= m < k = ceiling((N+1)/2),
p(m,N) == -2m (mod 2N+1) if k <= m < N.
N is T-prime if p(m,N) consists of a single cycle of length N.
The twist permutation is the inverse of the Queneau-Daniel permutation.
N is T-prime iff p=2N+1 is a prime number and exactly one of the following three conditions holds;
(1) N == 1 (mod 4) and +2 generates Z_p^* (the multiplicative group of Z_p) but -2 does not,
(2) N == 2 (mod 4) and both +2 and -2 generate Z_p^*,
(3) N == 3 (mod 4) and -2 generate Z_p^* but +2 does not. (End)
The sequence name says the permutation is of order n, but P. R. J. Asveld's comment says it's an n-cycle. Is there a proof that those conditions are equivalent for the Queneau-Daniel permutation? (They are not equivalent for any arbitrary permutation; e.g., (123)(45)(6) has order 6 but isn't a 6-cycle.) More generally, I have found that for all n <= 9450, (order of Queneau-Daniel permutation) = (length of orbit of 1) = A003558(n). Does this hold for all n? - David Wasserman, Aug 30 2011

Examples

			For N=6 and N=7 we obtain the permutations (1 2 4 5 3 6) and (1 2 4 7)(3 6)(5): 6 is T-prime, but 7 is not. - _Peter R. J. Asveld_, Aug 17 2009
		

References

  • Raymond Queneau, Note complémentaire sur la Sextaine, Subsidia Pataphysica 1 (1963), pp. 79-80.
  • Jacques Roubaud, Bibliothèque Oulipienne No 65 (1992) and 66 (1993).

Crossrefs

Not to be confused with Queneau's "s-additive sequences", see A003044.
A005384 is a subsequence.
Union of A163782 (Josephus_2-primes) and A163781 (dual Josephus_2-primes); also the union of A163777 (Archimedes_0-primes) and A163778 (Archimedes_1-primes); also the union of A071642/2 (shuffle primes) and A163776/2 (dual shuffle primes). - Peter R. J. Asveld, Aug 17 2009
Cf. A216371, A003558 (for which a(n) == n).

Programs

  • Maple
    QD:= proc(n) local i;
      if n::even then map(op,[seq([n-i,i+1],i=0..n/2-1)])
      else map(op, [seq([n-i,i+1],i=0..(n-1)/2-1),[(n+1)/2]])
      fi
    end proc:
    select(n -> GroupTheory:-PermOrder(Perm(QD(n)))=n, [$1..1000]); # Robert Israel, May 01 2016
  • Mathematica
    a[p_] := Sum[Cos[2^n Pi/((2 p + 1) )], {n, 1, p}];
    Select[Range[500],Reduce[a[#] == -1/2, Rationals] &] (* Gerry Martens, May 01 2016 *)
  • PARI
    is(n)=
    {
        if (n==1, return(1));
        my( m=n%4 );
        if ( m==4, return(0) );
        my(p=2*n+1, r=znorder(Mod(2,p)));
        if ( !isprime(p), return(0) );
        if ( m==3 && r==n, return(1) );
        if ( r==2*n, return(1) ); \\ r == 1 or 2
        return(0);
    }
    for(n=1,10^3, if(is(n),print1(n,", ")) );
    \\ Joerg Arndt, May 02 2016

Formula

a(n) = (A216371(n)-1)/2. - L. Edson Jeffery, Dec 18 2012
a(n) >> n log n, and on the Bateman-Horn-Stemmler conjecture a(n) << n log^2 n. I imagine a(n) ≍ n log n, and numerics suggest that perhaps a(n) ~ kn log n for some constant k (which seems to be around 1.122). - Charles R Greathouse IV, Aug 02 2023

A105876 Primes for which -4 is a primitive root.

Original entry on oeis.org

3, 7, 11, 19, 23, 47, 59, 67, 71, 79, 83, 103, 107, 131, 139, 163, 167, 179, 191, 199, 211, 227, 239, 263, 271, 311, 347, 359, 367, 379, 383, 419, 443, 463, 467, 479, 487, 491, 503, 523, 547, 563, 587, 599, 607, 619, 647, 659, 719, 743, 751, 787, 823, 827, 839, 859, 863
Offset: 1

Views

Author

N. J. A. Sloane, Apr 24 2005

Keywords

Comments

Also, primes for which -16 is a primitive root. For proof see following comments from Michael Somos, Aug 07 2009:
Let p = 8*t + 3 be prime. It is well-known that 2 is a primitive root.
We will use the obvious fact that if a primitive root is a power of another element, then that other element is also a primitive root. So
-1 == 2^(4*t+1) (mod p) because 2 is primitive root.
-2 == 2^(4*t+2) == 4^(2*t+1) (mod p) obvious
2 == (-4)^(2*t+1) (mod p) obvious, therefore -4 is also primitive root.
2 == 2^(8*t+3) (mod p) obviously works not just for 2
4 == 2^(8*t+4) == 16^(2*t+1) (mod p) obvious
-4 == (-16)^(2*t+1) (mod p) obvious, therefore -16 is also primitive root.
The case where p = 8*t + 7 is similar.
From Jianing Song, Dec 24 2022: (Start)
Equivalently, primes p == 3 (mod 4) such that the multiplicative order of 4 modulo p is (p-1)/2 (a subsequence of A216371).
Proof of equivalence: let ord(a,k) be the multiplicative of a modulo k. First we notice that all terms are congruent to 3 modulo 4, since -4 is a quadratic residue modulo p if p == 1 (mod 4). If ord(4,p) = (p-1)/2. Note that (p-1)/2 is odd, so it is coprime to ord(-1,p) = 2. As a result, ord(-4,p) = ((p-1)/2) * 2 = p-1. Conversely, If ord(-4,p) = p-1, we must have ord(4,p) = (p-1)/2 by noting that ord(-4,p) <= lcm(2,ord(4,p)).
Also primes p such that the multiplicative order of 16 modulo p is (p-1)/2. Proof: note that ord(16,p) = ord(-4,p)/gcd(ord(-4,p),2). If ord(-4,p) = p-1, then ord(16,p) = (p-1)/2. Conversely, if ord(16,p) = (p-1)/2, then ord(-4,p) = p-1, since otherwise ord(-4,p) = (p-1)/2 is odd, which is impossible since that -4 is not a quadratic residue modulo a prime p == 3 (mod 4).
{(a(n)-1)/2} is the sequence of indices of fixed points of A302141.
An odd prime p is a term if and only if p == 3 (mod 4) and the multiplicative order of 2 modulo p is p-1 or (p-1)/2 (p-1 if p == 3 (mod 8), (p-1)/2 if p == 7 (mod 8)).
It seems that a(n) = 2*A163778(n-1) + 1 for n >= 2. (End)

Crossrefs

Cf. A114564, A302141, A163778. A216371 is a supersequence.

Programs

  • Mathematica
    pr=-4; Select[Prime[Range[200]], MultiplicativeOrder[pr, # ] == #-1 &] (* OR *)
    a[p_, q_]:=Sum[2 Cos[2^n Pi/((2 q+1)(2 p+1))],{n,1,2 q p}]
    2 Select[Range[500],Rationalize[N[a[#,2],20]]==1 &]+1
    (* Gerry Martens, Apr 28 2015 *)
  • PARI
    is(n)=isprime(n) && n>2 && znorder(Mod(-4,n))==n-1 \\ Charles R Greathouse IV, Apr 30 2015

Extensions

Edited by N. J. A. Sloane, Aug 08 2009

A268923 All odd primes a(n) such that for all odd primes q smaller than a(n) the order of 2 modulo a(n)*q is a proper divisor of phi(a(n)*q)/2. The totient function phi is given in A000010.

Original entry on oeis.org

17, 31, 41, 43, 73, 89, 97, 109, 113, 127, 137, 151, 157, 193, 223, 229, 233, 241, 251, 257, 277, 281, 283, 307, 313, 331, 337, 353, 397, 401, 409, 431, 433, 439, 449, 457, 499, 521, 569, 571, 577, 593, 601, 617, 631, 641, 643, 673, 683, 691, 727, 733, 739, 761, 769, 809, 811, 857, 881, 911, 919
Offset: 1

Views

Author

Wolfdieter Lang, Apr 01 2016

Keywords

Comments

This sequence was inspired by A269454 submitted by Marina Ibrishimova.
It seems that if for an odd prime p > 3 the order(2, p*3) < phi(p*3)/2 = p-1 then p is in this sequence.
Note that 2^(phi(p*q)/2) == 1 (mod p*q) for distinct odd primes p and q, due to Nagell's corollary on Theorem 64, p. 106. The products of distinct primes considered in the present sequence have order of 2 modulo p*q smaller than phi(p*q)/2.
Up to and including prime(100) = 541 the only odd primes p such that for all odd primes q smaller than p the order of 2 modulo p*q equals phi(p*q)/2 are 5, 7, and 11.
Complement of A216371 = A001122 U A105874 in the set of odd primes. Composed of the primes modulo which neither 2 nor -2 is a primitive root. Also, prime(n) is a term iff A376010(n) > 2. - Max Alekseyev, Sep 05 2024

Examples

			n=1: Order(2, 17*3) = 8, and 8 is a proper divisor of phi(17*3)/2 = 16;
   order(2, 17*5) =  8, and 8 is a proper divisor of phi(17*5)/2 = 32;
   order(2, 17*7) = 24, and 24 is a proper divisor of phi(17*7)/2 = 48;
   order(2, 17*11) = 40, and 40 is a proper divisor of phi(17*11)/2 = 80;
   order(2, 17*13) = 24, and 24 is a proper divisor of phi(17*13)/2 = 96.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime@ Range[3, 157], Function[p, AllTrue[Prime@ Range[2, PrimePi@ p - 1], Function[q, With[{e = EulerPhi[p q]/2}, And[Divisible[e, #], # != e]] &@ MultiplicativeOrder[2, p q]]]]] (* Michael De Vlieger, Apr 01 2016, Version 10 *)

Extensions

More terms from Michael De Vlieger, Apr 01 2016

A333855 Numbers 2*k + 1 with A135303(k) >= 2, for k >= 1, sorted increasingly.

Original entry on oeis.org

17, 31, 33, 41, 43, 51, 57, 63, 65, 73, 85, 89, 91, 93, 97, 99, 105, 109, 113, 117, 119, 123, 127, 129, 133, 137, 145, 151, 153, 155, 157, 161, 165, 171, 177, 185, 187, 189, 193, 195, 201, 205, 209, 215, 217, 219, 221, 223, 229, 231, 233, 241, 247, 249, 251, 255
Offset: 1

Views

Author

Wolfdieter Lang, May 12 2020

Keywords

Comments

These are the numbers a(n) for which there is more than one periodic Schick sequence. In his notation B(a(n)) >= 2, for n >= 1.
These are also the numbers a(n) for which there is more than one coach in the complete coach system Sigma(b = a(n)) of Hilton and Pedersen, for n >= 1
These are the numbers a(n) for which there is more than one cycle in the complete system MDS(a(n)) (Modified Doubling Sequence) proposed in the comment by Gary W. Adamson, Aug 20 2019, in A003558.
The complement relative to the odd numbers >= 3 is given in A333854.
The subsequence for odd primes is identical with A268923.

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). Tables 3.1 to 3.10, for odd p = 3..113 (with gaps), pp. 158-166.

Crossrefs

Programs

  • Mathematica
    1 + 2 Select[Range[2, 127], 2 <= EulerPhi[#2]/(2 If[#2 > 1 && GCD[#1, #2] == 1, Min[MultiplicativeOrder[#1, #2, {-1, 1}]], 0]) & @@ {2, 2 # + 1} &] (* Michael De Vlieger, Oct 15 2020 *)
  • PARI
    isok8(m, n) = my(md = Mod(2, 2*n+1)^m); (md==1) || (md==-1);
    A003558(n) = my(m=1); while(!isok8(m, n) , m++); m;
    isok(m) = (m%2) && eulerphi(m)/(2*A003558((m-1)/2)) >= 2; \\ Michel Marcus, Jun 09 2020

Formula

Sequence {a(n)}_{n>=1} of numbers 2*k + 1 satisfying A135303(k) >= 2, for k >= 1, ordered increasingly.
Showing 1-10 of 14 results. Next