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 16 results. Next

A179686 Let m > k > 0 be odd numbers and operations "m<+>k" and "m<->k" be defined as in A179382 and A179480. Then the sequence m<+>k, m<->(m<+>k), m<+>(m<->(m<+>k)), ... is periodic; a(n) is its smallest period starting from the seeds m=2*n-1 and k=1.

Original entry on oeis.org

1, 2, 4, 2, 2, 2, 4, 2, 6, 4, 4, 6, 8, 6, 4, 2, 4, 10, 4, 6, 2, 4, 12, 12, 4, 14, 12, 2, 14, 14, 4, 2, 18, 12, 16, 4, 8, 16, 16, 14, 18, 4, 12, 4, 4, 4, 20, 10, 6, 22, 24, 4, 26, 6, 16, 6, 20, 4, 12, 26, 8, 22, 4, 2, 34, 8, 20, 14, 34, 24, 32, 6, 20, 42, 4, 12, 8, 10, 24
Offset: 2

Views

Author

Vladimir Shevelev, Jul 24 2010

Keywords

Examples

			If n=4, 2*n-1=7, then we have 7<+>1=1, 7<->1=3, 7<+>3=5, 7<->5=1. Thus a(4)=4.
		

Crossrefs

Programs

  • Maple
    pidx := proc(L,n,m)
        for i from 1 to nops(L)-1 do
            if [op(i..i+1,L)] = [n,m] then
                return i;
            end if;
        end do:
        return -1 ;
    end proc:
    A179686aux := proc(x, y) local xtrack, xitr, p;
        xtrack := [A000265(x+y)] ;
        while true do
            if type(nops(xtrack),'odd') then
                xitr := A000265(x-op(-1, xtrack)) ;
            else
                xitr := A000265(x+op(-1, xtrack)) ;
            end if;
                xtrack := [op(xtrack),xitr] ;
            p := pidx(xtrack,op(-2,xtrack),op(-1,xtrack)) ;
            if p >=1 and p < nops(xtrack) -2 then
                return nops(xtrack)-p-1 ;
            end if;
        end do:
    end proc:
    A179686 := proc(n)
        if n = 2 then
            1;
        else
            A179686aux(2*n-1,1) ;
        end if;
    end proc:
    seq(A179686(n),n=2..80) ; # R. J. Mathar, Dec 04 2011

Extensions

Extended beyond a(24) by R. J. Mathar, Dec 04 2011

A179481 a(n) = 2*t(n)-1 where t(n) is the sequence of records positions of A179480.

Original entry on oeis.org

3, 7, 11, 19, 23, 29, 37, 47, 53, 59, 67, 71, 79, 83, 101, 103, 107, 131, 139, 149, 163, 167, 173, 179, 191, 197, 199, 211, 227, 239, 263, 269, 271, 293, 311, 317, 347, 359, 367, 373, 379, 383, 389, 419, 443, 461, 463, 467, 479, 487, 491, 503, 509, 523, 541
Offset: 2

Views

Author

Vladimir Shevelev, Jul 16 2010

Keywords

Comments

Question. Is every term of this sequence prime?
From Gary W. Adamson, Sep 04 2012: (Start)
In answer to the primality question and pursuant to the Coach Theorem of Hilton and Pedersen: phi(b) = 2 * k * c, with b an odd integer and k in A003558, and c (the numbers of coaches) in A135303; iff phi(b) = (b-1) then b = p, prime. This implies that if b has one coach and k = (b-1)/2, b must be prime since phi(b) = 2 * k * c = 2 * (b-1)/2 * 1 = (b-1). Conjectures: all terms in A179481 have one coach with k = (b-1)/2 and are therefore primes. Next, if A179480(n) is a new record high value, then so is A003558(n-1); but not necessarily the converse (e.g. 13), and the corresponding value of k for b is (b-1)/2. Examples: b = 13 has one coach with k (sum of bottom row terms ) = 6 = A003558(6); and r (number of entries in each row) = 3:
13: [1, 3, 5]
......2, 1, 3. This example satisfies the primality requirements since phi(13) = 12 = 2 * k * c = 2 * 6 * 1; but not the new record requirement for r = 3 since A179480(6) = 3, corresponding to 11, not 13. As shown in the coach for 11:
11: [1, 3, 3]
......1, 1, 3; k = (b-1)/2 with r = 3 and c = 1. Therefore, 11 is in A179481 but not 13. (End)

References

  • P. Hilton and J. Pedersen, A Mathematics Tapestry, Demonstrating the Beautiful Unity of Mathematics, 2010, Cambridge University Press, pp. 260-264.

Crossrefs

Extensions

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

A179541 a(n) is the least possible smallest period attainable by the action of a periodic sequence of binary operations <+>,<-> (see A179382,A179480), beginning with 2n-1<+>1 or 2n-1<->1.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 1, 3, 2, 4
Offset: 2

Views

Author

Vladimir Shevelev, Jul 18 2010

Keywords

Comments

The minorizing sequence for all sequences of type A179382,A179480 with arbitrary periodic rotation of the binary operations <+>,<->.

Examples

			Let n=12, 2n-1=23. Considering periodic sequence <+>,<->,<+>,<->,..., we have 23<+>1=3, 23<->3=5, 23<+>5=7, 23<->7=1, 23<+>1=3,... Thus a(12)<=4. It is not difficult to verify that a(12)>3. Thus a(12)=4.
		

Crossrefs

A000040 The prime numbers.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271
Offset: 1

Views

Author

Keywords

Comments

See A065091 for comments, formulas etc. concerning only odd primes. For all information concerning prime powers, see A000961. For contributions concerning "almost primes" see A002808.
A number p is prime if (and only if) it is greater than 1 and has no positive divisors except 1 and p.
A natural number is prime if and only if it has exactly two (positive) divisors.
A prime has exactly one proper positive divisor, 1.
The paper by Kaoru Motose starts as follows: "Let q be a prime divisor of a Mersenne number 2^p-1 where p is prime. Then p is the order of 2 (mod q). Thus p is a divisor of q - 1 and q > p. This shows that there exist infinitely many prime numbers." - Pieter Moree, Oct 14 2004
1 is not a prime, for if the primes included 1, then the factorization of a natural number n into a product of primes would not be unique, since n = n*1.
Prime(n) and pi(n) are inverse functions: A000720(a(n)) = n and a(n) is the least number m such that a(A000720(m)) = a(n). a(A000720(n)) = n if (and only if) n is prime.
Second sequence ever computed by electronic computer, on EDSAC, May 09 1949 (see Renwick link). - Russ Cox, Apr 20 2006
Every prime p > 3 is a linear combination of previous primes prime(n) with nonzero coefficients c(n) and |c(n)| < prime(n). - Amarnath Murthy, Franklin T. Adams-Watters and Joshua Zucker, May 17 2006; clarified by Chayim Lowen, Jul 17 2015
The Greek transliteration of 'Prime Number' is 'Protos Arithmos'. - Daniel Forgues, May 08 2009 [Edited by Petros Hadjicostas, Nov 18 2019]
A number n is prime if and only if it is different from zero and different from a unit and each multiple of n decomposes into factors such that n divides at least one of the factors. This applies equally to the integers (where a prime has exactly four divisors (the definition of divisors is relaxed such that they can be negative)) and the positive integers (where a prime has exactly two distinct divisors). - Peter Luschny, Oct 09 2012
Motivated by his conjecture on representations of integers by alternating sums of consecutive primes, for any positive integer n, Zhi-Wei Sun conjectured that the polynomial P_n(x) = Sum_{k=0..n} a(k+1)*x^k is irreducible over the field of rational numbers with the Galois group S_n, and moreover P_n(x) is irreducible mod a(m) for some m <= n(n+1)/2. It seems that no known criterion on irreducibility of polynomials implies this conjecture. - Zhi-Wei Sun, Mar 23 2013
Questions on a(2n) and Ramanujan primes are in A233739. - Jonathan Sondow, Dec 16 2013
From Hieronymus Fischer, Apr 02 2014: (Start)
Natural numbers such that there is exactly one base b such that the base-b alternate digital sum is 0 (see A239707).
Equivalently: Numbers p > 1 such that b = p-1 is the only base >= 1 for which the base-b alternate digital sum is 0.
Equivalently: Numbers p > 1 such that the base-b alternate digital sum is <> 0 for all bases 1 <= b < p-1. (End)
An integer n > 1 is a prime if and only if it is not the sum of positive integers in arithmetic progression with common difference 2. - Jean-Christophe Hervé, Jun 01 2014
Conjecture: Numbers having prime factors <= prime(n+1) are {k|k^f(n) mod primorial(n)=1}, where f(n) = lcm(prime(i)-1, i=1..n) = A058254(n) and primorial(n) = A002110(n). For example, numbers with no prime divisor <= prime(7) = 17 are {k|k^60 mod 30030=1}. - Gary Detlefs, Jun 07 2014
Cramer conjecture prime(n+1) - prime(n) < C log^2 prime(n) is equivalent to the inequality (log prime(n+1)/log prime(n))^n < e^C, as n tend to infinity, where C is an absolute constant. - Thomas Ordowski, Oct 06 2014
I conjecture that for any positive rational number r there are finitely many primes q_1,...,q_k such that r = Sum_{j=1..k} 1/(q_j-1). For example, 2 = 1/(2-1) + 1/(3-1) + 1/(5-1) + 1/(7-1) + 1/(13-1) with 2, 3, 5, 7 and 13 all prime, 1/7 = 1/(13-1) + 1/(29-1) + 1/(43-1) with 13, 29 and 43 all prime, and 5/7 = 1/(3-1) + 1/(7-1) + 1/(31-1) + 1/(71-1) with 3, 7, 31 and 71 all prime. - Zhi-Wei Sun, Sep 09 2015
I also conjecture that for any positive rational number r there are finitely many primes p_1,...,p_k such that r = Sum_{j=1..k} 1/(p_j+1). For example, 1 = 1/(2+1) + 1/(3+1) + 1/(5+1) + 1/(7+1) + 1/(11+1) + 1/(23+1) with 2, 3, 5, 7, 11 and 23 all prime, and 10/11 = 1/(2+1) + 1/(3+1) + 1/(5+1) + 1/(7+1) + 1/(43+1) + 1/(131+1) + 1/(263+1) with 2, 3, 5, 7, 43, 131 and 263 all prime. - Zhi-Wei Sun, Sep 13 2015
Numbers k such that ((k-2)!!)^2 == +-1 (mod k). - Thomas Ordowski, Aug 27 2016
Does not satisfy Benford's law [Diaconis, 1977; Cohen-Katz, 1984; Berger-Hill, 2017]. - N. J. A. Sloane, Feb 07 2017
Prime numbers are the integer roots of 1 - sin(Pi*Gamma(s)/s)/sin(Pi/s). - Peter Luschny, Feb 23 2018
Conjecture: log log a(n+1) - log log a(n) < 1/n. - Thomas Ordowski, Feb 17 2023

Examples

			From _David A. Corneth_, Oct 22 2024: (Start)
7 is a prime number as it has exactly two divisors, 1 and 7.
8 is not a prime number as it does not have exactly two divisors (it has 1, 2, 4 and 8 as divisors though it is sufficient to find one other divisor than 1 and 8)
55 is not a prime number as it does not have exactly two divisors. One other divisor than 1 and 55 is 5.
59 is a prime number as it has exactly two divisors; 1 and 59. (End)
		

References

  • M. Aigner and G. M. Ziegler, Proofs from The Book, Springer-Verlag, Berlin, 2nd. ed., 2001; see p. 3.
  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 2.
  • E. Bach and Jeffrey Shallit, Algorithmic Number Theory, I, Chaps. 8, 9.
  • D. M. Bressoud, Factorization and Primality Testing, Springer-Verlag NY 1989.
  • M. Cipolla, "La determinazione asintotica dell'n-mo numero primo.", Rend. d. R. Acc. di sc. fis. e mat. di Napoli, s. 3, VIII (1902), pp. 132-166.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 127-149.
  • R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 1.
  • Martin Davis, "Algorithms, Equations, and Logic", pp. 4-15 of S. Barry Cooper and Andrew Hodges, Eds., "The Once and Future Turing: Computing the World", Cambridge 2016.
  • J.-P. Delahaye, Merveilleux nombres premiers, Pour la Science-Belin Paris, 2000.
  • J.-P. Delahaye, Savoir si un nombre est premier: facile, Pour La Science, 303(1) 2003, pp. 98-102.
  • M. Dietzfelbinger, Primality Testing in Polynomial Time, Springer NY 2004.
  • M. du Sautoy, The Music of the Primes, Fourth Estate / HarperCollins, 2003; see p. 5.
  • J. Elie, "L'algorithme AKS", in 'Quadrature', No. 60, pp. 22-32, 2006 EDP-sciences, Les Ulis (France);
  • W. & F. Ellison, Prime Numbers, Hermann Paris 1985
  • T. Estermann, Introduction to Modern Prime Number Theory, Camb. Univ. Press, 1969.
  • J. M. Gandhi, Formulae for the nth prime. Proc. Washington State Univ. Conf. on Number Theory, 96-106. Wash. St. Univ., Pullman, Wash., 1971.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.2 Prime Numbers, pp. 77-78.
  • R. K. Guy, Unsolved Problems Number Theory, Section A.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 2.
  • Peter Hilton and Jean Pedersen, A Mathematical Tapestry: Demonstrating the Beautiful Unity of Mathematics, Cambridge University Press, 2010, pp. (260-264).
  • H. D. Huskey, Derrick Henry Lehmer [1905-1991]. IEEE Ann. Hist. Comput. 17 (1995), no. 2, 64-68. Math. Rev. 96b:01035, cf. http://www.ams.org/mathscinet-getitem?mr=1336709
  • M. N. Huxley, The Distribution of Prime Numbers, Oxford Univ. Press, 1972.
  • D. S. Jandu, Prime Numbers And Factorization, Infinite Bandwidth Publishing, N. Hollywood CA 2007.
  • E. Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Chelsea, NY, 1974.
  • D. H. Lehmer, The sieve problem for all-purpose computers. Math. Tables and Other Aids to Computation, Math. Tables and Other Aids to Computation, 7, (1953). 6-14. Math. Rev. 14:691e
  • D. N. Lehmer, "List of Prime Numbers from 1 to 10,006,721", Carnegie Institute, Washington, D.C. 1909.
  • W. J. LeVeque, Topics in Number Theory. Addison-Wesley, Reading, MA, 2 vols., 1956, Vol. 1, Chap. 6.
  • H. Lifchitz, Table des nombres premiers de 0 à 20 millions (Tomes I & II), Albert Blanchard, Paris 1971.
  • R. F. Lukes, C. D. Patterson and H. C. Williams, Numerical sieving devices: their history and some applications. Nieuw Arch. Wisk. (4) 13 (1995), no. 1, 113-139. Math. Rev. 96m:11082, cf http://www.ams.org/mathscinet-getitem?mr=96m:11082
  • P. Ribenboim, The New Book of Prime Number Records, Springer-Verlag NY 1995.
  • P. Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004.
  • H. Riesel, Prime Numbers and Computer Methods for Factorization, Birkhäuser Boston, Cambridge MA 1994.
  • B. Rittaud, "31415879. Ce nombre est-il premier?" ['Is this number prime?'], La Recherche, Vol. 361, pp. 70-73, Feb 15 2003, Paris.
  • D. Shanks, Solved and Unsolved Problems in Number Theory, 2nd. ed., Chelsea, 1978, Chap. 1.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 107-119.
  • D. Wells, Prime Numbers: The Most Mysterious Figures In Math, J. Wiley NY 2005.
  • H. C. Williams and Jeffrey Shallit, Factoring integers before computers. Mathematics of Computation 1943-1993: a half-century of computational mathematics (Vancouver, BC, 1993), 481-531, Proc. Sympos. Appl. Math., 48, AMS, Providence, RI, 1994. Math. Rev. 95m:11143

Crossrefs

For is_prime and next_prime, see A010051 and A151800.
Cf. A000720 ("pi"), A001223 (differences between primes), A002476, A002808, A003627, A006879, A006880, A008578, A080339, A233588.
Cf. primes in lexicographic order: A210757, A210758, A210759, A210760, A210761.
Cf. A003558, A179480 (relating to the Quasi-order theorem of Hilton and Pedersen).
Boustrophedon transforms: A000747, A000732, A230953.
a(2n) = A104272(n) - A233739(n).
Related sequences:
Primes (p) and composites (c): A002808, A000720, A065855.
Primes between p(n) and 2*p(n): A063124, A070046; between c(n) and 2*c(n): A376761; between n and 2*n: A035250, A060715, A077463, A108954.
Composites between p(n) and 2*p(n): A246514; between c(n) and 2*c(n): A376760; between n and 2*n: A075084, A307912, A307989, A376759.

Programs

  • GAP
    A000040:=Filtered([1..10^5],IsPrime); # Muniru A Asiru, Sep 04 2017
    
  • Haskell
    -- See also Haskell Wiki Link.
    import Data.List (genericIndex)
    a000040 n = genericIndex a000040_list (n - 1)
    a000040_list = base ++ larger where
    base = [2,3,5,7,11,13,17]
    larger = p : filter prime more
    prime n = all ((> 0) . mod n) $ takeWhile (\x -> x*x <= n) larger
    _ : p : more = roll $ makeWheels base
    roll (Wheel n rs) = [n * k + r | k <- [0..], r <- rs]
    makeWheels = foldl nextSize (Wheel 1 [1])
    nextSize (Wheel size bs) p = Wheel (size * p)
    [r | k <- [0..p-1], b <- bs, let r = size*k+b, mod r p > 0]
    data Wheel = Wheel Integer [Integer]
    -- Reinhard Zumkeller, Apr 07 2014
    
  • Magma
    [n : n in [2..500] | IsPrime(n)];
    
  • Magma
    a := func< n | NthPrime(n) >;
    
  • Maple
    A000040 := n->ithprime(n); [ seq(ithprime(i),i=1..100) ];
    # For illustration purposes only:
    isPrime := s -> is(1 = sin(Pi*GAMMA(s)/s)/sin(Pi/s)):
    select(isPrime, [$2..100]); # Peter Luschny, Feb 23 2018
  • Mathematica
    Prime[Range[60]]
  • Maxima
    A000040(n) := block(
    if n = 1 then return(2),
    return( next_prime(A000040(n-1)))
    )$ /* recursive, to be replaced if possible - R. J. Mathar, Feb 27 2012 */
    
  • PARI
    {a(n) = if( n<1, 0, prime(n))};
    
  • PARI
    /* The following functions provide asymptotic approximations, one based on the asymptotic formula cited above (slight overestimate for n > 10^8), the other one based on pi(x) ~ li(x) = Ei(log(x)) (slight underestimate): */
    prime1(n)=n*(log(n)+log(log(n))-1+(log(log(n))-2)/log(n)-((log(log(n))-6)*log(log(n))+11)/log(n)^2/2)
    prime2(n)=solve(X=n*log(n)/2,2*n*log(n),real(eint1(-log(X)))+n)
    \\ M. F. Hasler, Oct 21 2013
    
  • PARI
    forprime(p=2, 10^3, print1(p, ", ")) \\ Felix Fröhlich, Jun 30 2014
    
  • PARI
    primes(10^5) \\ Altug Alkan, Mar 26 2018
    
  • Python
    from sympy import primerange
    print(list(primerange(2, 272))) # Michael S. Branicky, Apr 30 2022
  • Sage
    a = sloane.A000040
    a.list(58)  # Jaap Spies, 2007
    
  • Sage
    prime_range(1, 300)  # Zerinvary Lajos, May 27 2009
    

Formula

The prime number theorem is the statement that a(n) ~ n * log n as n -> infinity (Hardy and Wright, page 10).
For n >= 2, n*(log n + log log n - 3/2) < a(n); for n >= 20, a(n) < n*(log n + log log n - 1/2). [Rosser and Schoenfeld]
For all n, a(n) > n log n. [Rosser]
n log(n) + n (log log n - 1) < a(n) < n log n + n log log n for n >= 6. [Dusart, quoted in the Wikipedia article]
a(n) = n log n + n log log n + (n/log n)*(log log n - log n - 2) + O( n (log log n)^2/ (log n)^2). [Cipolla, see also Cesàro or the "Prime number theorem" Wikipedia article for more terms in the expansion]
a(n) = 2 + Sum_{k = 2..floor(2n*log(n)+2)} (1-floor(pi(k)/n)), for n > 1, where the formula for pi(k) is given in A000720 (Ruiz and Sondow 2002). - Jonathan Sondow, Mar 06 2004
I conjecture that Sum_{i>=1} (1/(prime(i)*log(prime(i)))) = Pi/2 = 1.570796327...; Sum_{i=1..100000} (1/(prime(i)*log(prime(i)))) = 1.565585514... It converges very slowly. - Miklos Kristof, Feb 12 2007
The last conjecture has been discussed by the math.research newsgroup recently. The sum, which is greater than Pi/2, is shown in sequence A137245. - T. D. Noe, Jan 13 2009
A000005(a(n)) = 2; A002033(a(n+1)) = 1. - Juri-Stepan Gerasimov, Oct 17 2009
A001222(a(n)) = 1. - Juri-Stepan Gerasimov, Nov 10 2009
From Gary Detlefs, Sep 10 2010: (Start)
Conjecture:
a(n) = {n| n! mod n^2 = n(n-1)}, n <> 4.
a(n) = {n| n!*h(n) mod n = n-1}, n <> 4, where h(n) = Sum_{k=1..n} 1/k. (End)
For n = 1..15, a(n) = p + abs(p-3/2) + 1/2, where p = m + int((m-3)/2), and m = n + int((n-2)/8) + int((n-4)/8). - Timothy Hopper, Oct 23 2010
a(2n) <= A104272(n) - 2 for n > 1, and a(2n) ~ A104272(n) as n -> infinity. - Jonathan Sondow, Dec 16 2013
Conjecture: Sequence = {5 and n <> 5| ( Fibonacci(n) mod n = 1 or Fibonacci(n) mod n = n - 1) and 2^(n-1) mod n = 1}. - Gary Detlefs, May 25 2014
Conjecture: Sequence = {5 and n <> 5| ( Fibonacci(n) mod n = 1 or Fibonacci(n) mod n = n - 1) and 2^(3*n) mod 3*n = 8}. - Gary Detlefs, May 28 2014
Satisfies a(n) = 2*n + Sum_{k=1..(a(n)-1)} cot(k*Pi/a(n))*sin(2*k*n^a(n)*Pi/a(n)). - Ilya Gutkovskiy, Jun 29 2016
Sum_{n>=1} 1/a(n)^s = P(s), where P(s) is the prime zeta function. - Eric W. Weisstein, Nov 08 2016
a(n) = floor(1 - log(-1/2 + Sum_{ d | A002110(n-1) } mu(d)/(2^d-1))/log(2)) where mu(d) = A008683(d) [Ghandi, 1971] (see Ribenboim). Golomb gave a proof in 1974: Give each positive integer a probability of W(n) = 1/2^n, then the probability M(d) of the integer multiple of number d equals 1/(2^d-1). Suppose Q = a(1)*a(2)*...*a(n-1) = A002110(n-1), then the probability of random integers that are mutually prime with Q is Sum_{ d | Q } mu(d)*M(d) = Sum_{ d | Q } mu(d)/(2^d-1) = Sum_{ gcd(m, Q) = 1 } W(m) = 1/2 + 1/2^a(n) + 1/2^a(n+1) + 1/2^a(n+2) + ... So ((Sum_{ d | Q } mu(d)/(2^d-1)) - 1/2)*2^a(n) = 1 + x(n), which means that a(n) is the only integer so that 1 < ((Sum_{ d | Q } mu(d)/(2^d-1)) - 1/2)*2^a(n) < 2. - Jinyuan Wang, Apr 08 2019
Conjecture: n * (log(n)+log(log(n))-1+((log(log(n))-A)/log(n))) is asymptotic to a(n) if and only if A=2. - Alain Rocchelli, Feb 12 2025
From Stefano Spezia, Apr 13 2025: (Start)
a(n) = 1 + Sum_{m=1..2^n} floor(floor(n/Sum_{j=1..m} A080339(j))^(1/n)) [Willans, 1964].
a(n) = 1 + Sum_{m=1..2^n} floor(floor(n/(1 + A000720(m)))^(1/n)) [Willans, 1964]. (End)

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

A065091 Odd primes.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277
Offset: 1

Views

Author

Labos Elemer, Nov 12 2001

Keywords

Comments

Rayes et al. prove that the a(n)-th Chebyshev-T polynomial, divided by x, is irreducible over the integers.
Odd primes can be written as a sum of no more than two consecutive positive integers. Powers of 2 do not have a representation as a sum of k consecutive positive integers (other than the trivial n=n, for k=1). See A111774. - Jaap Spies, Jan 04 2007
Intersection of A005408 and A000040. - Reinhard Zumkeller, Oct 14 2008
Primes which are the sum of two consecutive numbers. - Juri-Stepan Gerasimov, Nov 07 2009
The arithmetic mean of divisors of p^3, (1+p)(1+p^2)/4, for odd primes p is an integer. - Ctibor O. Zizka, Oct 20 2009
Primes == -+ 1 (mod 4). - Juri-Stepan Gerasimov, Apr 27 2010
a(n) = A053670(A179675(n)) and a(n) <> A053670(m) for m < A179675(n). - Reinhard Zumkeller, Jul 23 2010
Triads of the form <2*a(n+1), a(n+1), 3*a(n+1)> like <6,3,9>, <10,5,15>, <14,7,21> appear in the EKG sequence A064413, see Theorem (3) there. - Paul Curtz, Feb 13 2011.
Complement of A065090; abs(A151763(a(n))) = 1. - Reinhard Zumkeller, Oct 06 2011
Right edge of the triangle in A065305. - Reinhard Zumkeller, Jan 30 2012
Numbers with two odd divisors. - Omar E. Pol, Mar 24 2012
Odd prime p divides some (2^k + 1) or (2^k - 1), (k>0, minimal, cf. A003558) depending on the parity of A179480((p+1)/2) = r. This is a consequence of the Quasi-order theorem and corollaries, [Hilton and Pederson, pp. 260-264]: 2^k == (-1)^r mod b, b odd; and b divides 2^k - (-1)^r, where p is a subset of b. - Gary W. Adamson, Aug 26 2012
Subset of the arithmetic numbers (A003601). - Wesley Ivan Hurt, Sep 27 2013
Odd primes p satisfy the identity: p = (product(2*cos((2*k+1)*Pi/(2*p)), k=0..(p-3)/2))^2. This follows from C(2*p, 0) = (-1)^((p-1)/2)*p, n>=2, with the minimal polynomial C(k,x) of rho(k) := 2*cos(Pi/k). See A187360 for C and the W. Lang link on the field Q(rho(n)), eqs. (20) and (37). - Wolfdieter Lang, Oct 23 2013
Numbers m > 1 such that m^2 divides (2m-1)!! + m. - Thomas Ordowski, Nov 28 2014
Numbers m such that m divides 2*(m-3)! + 1. - Thomas Ordowski, Jun 20 2015
Numbers m such that (2m-3)!! == m (mod m^2). - Thomas Ordowski, Jul 24 2016
Odd numbers m such that ((m-3)!!)^2 == +-1 (mod m). - Thomas Ordowski, Jul 27 2016
Primes of the form x^2 - y^2. - Thomas Ordowski, Feb 27 2017
Conjecture: a(n) is the smallest odd number m > prime(n) such that Sum_{k=1..prime(n)-1} k^(m-1) == prime(n)-1 (mod m). This is an extension of the Agoh-Giuga conjecture. - Thomas Ordowski, Aug 01 2018
Numbers k > 1 such that either Phi(k,x) == 1 (mod k) or Phi(k,x) == k (mod k^2) holds, where Phi(k,x) is the k-th cyclotomic polynomial. - Jianing Song, Aug 02 2018

References

  • Paulo Ribenboim, The little book of big primes, Springer 1991, p. 106.

Crossrefs

Cf. A000040, A033270, union of A002144 and A002145.
Cf. A230953 (boustrophedon transform).

Programs

  • Haskell
    a065091 n = a065091_list !! (n-1)
    a065091_list = tail a000040_list  -- Reinhard Zumkeller, Jan 30 2012
    
  • Magma
    [NthPrime(n): n in [2..100]]; // Vincenzo Librandi, Jun 21 2015
    
  • Maple
    A065091 := proc(n) RETURN(ithprime(n+1)) end:
  • Mathematica
    Prime[Range[2, 33]] (* Vladimir Joseph Stephan Orlovsky, Aug 22 2008 *)
  • PARI
    forprime(p=3, 200, print1(p, ", ")) \\ Felix Fröhlich, Jun 30 2014
    
  • Python
    from sympy import prime
    def A065091(n): return prime(n+1) # Chai Wah Wu, Jul 13 2024
  • Sage
    def A065091_list(limit):  # after Minác's formula
        f = 3; P = [f]
        for n in range(3, limit, 2):
            if (f+1)>n*(f//n)+1: P.append(n)
            f = f*n
        return P
    A065091_list(100)  # Peter Luschny, Oct 17 2013
    

Formula

a(n) = A000040(n+1). - M. F. Hasler, Oct 26 2013

Extensions

More terms from Francisco Salinas (franciscodesalinas(AT)hotmail.com), Jan 05 2002
Edited (moved contributions from A000040 to here) by M. F. Hasler, Oct 26 2013

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

A051179 a(n) = 2^(2^n) - 1.

Original entry on oeis.org

1, 3, 15, 255, 65535, 4294967295, 18446744073709551615, 340282366920938463463374607431768211455, 115792089237316195423570985008687907853269984665640564039457584007913129639935
Offset: 0

Views

Author

Alan DeKok (aland(AT)ox.org)

Keywords

Comments

In a tree with binary nodes (0, 1 children only), the maximum number of unique child nodes at level n.
Number of binary trees (each vertex has 0, or 1 left, or 1 right, or 2 children) such that all leaves are at level n. Example: a(1) = 3 because we have (i) root with a left child, (ii) root with a right child and (iii) root with two children. a(n) = A000215(n) - 2. - Emeric Deutsch, Jan 20 2004
Similarly, this is also the number of full balanced binary trees of height n. (There is an obvious 1-to-1 correspondence between the two sets of trees.) - David Hobby (hobbyd(AT)newpaltz.edu), May 02 2010
Partial products of A000215.
The first 5 terms n (only) have the property that phi(n)=(n+1)/2, where phi(n) = A000010(n) is Euler's totient function. - Lekraj Beedassy, Feb 12 2007
If A003558(n) is of the form 2^n and A179480(n+1) is even, then (2^(A003558(n)) - 1) is in A051179. Example: A003558(25) = 8 with A179480(25) = 4, even. Then (2^8 - 1) = 255. - Gary W. Adamson, Aug 20 2012
For any odd positive a(0), the sequence defined by a(n) = a(n-1) * (a(n-1) + 2) gives a constructive proof that there exist integers with at least n distinct prime factors, e.g., a(n), since omega(a(n)) >= n. As a corollary, this gives a constructive proof of Euclid's theorem stating that there are infinitely many primes. - Daniel Forgues, Mar 07 2017
From Sergey Pavlov, Apr 24 2017: (Start)
I conjecture that, for n > 7, omega(a(n)) > omega(a(n-1)) > n.
It seems that the largest prime divisor p(n+1) of a(n+1) is always bigger than the largest prime divisor of a(n): p(n+1) > p(n). For 3 < n < 8, p(n+1) > 100 * p(n).
(End)
It appears that a(n) is the integer whose bits indicate the possible subset sums of the first n powers of two. For another example, see the calculation for primes at A368491 - Yigit Oktar, Mar 20 2025

Examples

			15 = 3*5; 255 = 3*5*17; 65535 = 3*5*17*257; ... - _Daniel Forgues_, Mar 07 2017
		

References

  • M. Aigner and G. M. Ziegler, Proofs from The Book, Springer-Verlag, Berlin, 1999; see p. 4.

Crossrefs

Programs

Formula

a(n) = A000215(n) - 2.
a(n) = (a(n-1) + 1)^2 - 1, a(0) = 1. [ or a(n) = a(n-1)(a(n-1) + 2) ].
1 = 2/3 + 4/15 + 16/255 + 256/65535 + ... = Sum_{n>=0} A001146(n)/a(n+1) with partial sums: 2/3, 14/15, 254/255, 65534/65535, ... - Gary W. Adamson, Jun 15 2003
a(n) = b(n-1) where b(1)=1, b(n) = Product_{k=1..n-1} (b(k) + 2). - Benoit Cloitre, Sep 13 2003
A136308(n) = A007088(a(n)). - Jason Kimberley, Dec 19 2012
A000215(n) = a(n+1) / a(n). - Daniel Forgues, Mar 07 2017
Sum_{n>=0} 1/a(n) = A048649. - Amiram Eldar, Oct 27 2020

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

A014657 Numbers m that divide 2^k + 1 for some nonnegative k.

Original entry on oeis.org

1, 2, 3, 5, 9, 11, 13, 17, 19, 25, 27, 29, 33, 37, 41, 43, 53, 57, 59, 61, 65, 67, 81, 83, 97, 99, 101, 107, 109, 113, 121, 125, 129, 131, 137, 139, 145, 149, 157, 163, 169, 171, 173, 177, 179, 181, 185, 193, 197, 201, 205, 209, 211, 227, 229, 241, 243, 249, 251, 257, 265
Offset: 1

Views

Author

Keywords

Comments

Since for some a < n, 2^a == 1 (mod n) (a consequence of Euler's Theorem), searching up to k=n is sufficient to determine whether an integer is in the sequence. - Michael B. Porter, Dec 06 2009
A195470(a(n)) > 0; A195610(n) gives the smallest k such that a(n) divides 2^k + 1. - Reinhard Zumkeller, Sep 21 2011
This sequence is the subset of odd integers > 1 as (2*n - 1) in A179480, such that the corresponding entry in A179480 is odd. Example: A179480(14) = 5, odd, with (2*14 - 1) = 27; and 5 is a term of this sequence. A014659 (odd and does not divide (2^k + 1) for any k >= 1) represents the subset of odd terms >1 corresponding to A179480 entries that are even. - Gary W. Adamson, Aug 20 2012
All prime factors of a(n) are in A091317. Sequence has asymptotic density 0. - Robert Israel, Aug 12 2014
This sequence, for m>2, is those m for which, for some e, (m-1)(2^e-1)/m is a term of A253608. Moreover, e(n) is 2*A195610(n) when m is a(n). - Donald M Davis, Jan 12 2018
From Wolfdieter Lang, Aug 22 2020: (Start)
Without a(2) = 2 this is the complement of A014659 relative to the odd positive integers A005408.
For the least nonnegative integer k(n) with 2^k(n) + 1 == d(n)*a(n), for n >= 1, see k(n) = A195610(n) and d(n) = A337220(n).
Starting with a(3) = 3 these numbers are the odd moduli, named 2*n+1 in the definition of A003558, for which the minus signs applies (see A332433(m) for the signs applying for A003558(m)). (End)

Crossrefs

Besides initial terms 1 and 2, a subsequence of A296243. Their set difference is given by A296244.

Programs

  • Haskell
    import Data.List (findIndices)
    a014657 n = a014657_list !! (n-1)
    a014657_list = map (+ 1) $ findIndices (> 0) $ map a195470 [1..]
    -- Reinhard Zumkeller, Sep 21 2011
  • Maple
    select(t -> [msolve(2^x+1,t)] <> [], [2*i+1 $ i=1..1000]); # Robert Israel, Aug 12 2014
  • Mathematica
    ok[n_] := Module[{k=0}, While[k<=n && Mod[2^k + 1, n] > 0, k++]; kJean-François Alcover, Apr 06 2011, after PARI prog *)
    okQ[n_] := Module[{k = MultiplicativeOrder[2, n]}, EvenQ[k] && Mod[2^(k/2) + 1, n] == 0]; Join[{1, 2}, Select[Range[3, 265, 2], okQ]] (* T. D. Noe, Apr 06 2011 *)
  • PARI
    isA014657(n) = {local(r);r=0;for(k=0,n,if(Mod(2^k+1,n)==Mod(0,n),r=1));r} \\ Michael B. Porter, Dec 06 2009
    

Extensions

More terms from Henry Bottomley, May 19 2000
Extended and corrected by David W. Wilson, May 01 2001
Showing 1-10 of 16 results. Next