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

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

A329593 a(n) = (2^(A003558(n)) - A332433(n))/(2*n+1), for n >= 0.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 5, 1, 1, 27, 3, 89, 41, 19, 565, 1, 1, 117, 7085, 105, 25, 3, 91, 178481, 42799, 5, 1266205, 19065, 9, 9099507, 17602325, 1, 1, 128207979, 60787, 483939977, 7, 13981, 13944699, 6958934353, 1657009, 26494256091, 3, 3085465, 23, 45, 11
Offset: 0

Views

Author

Wolfdieter Lang, Feb 17 2020

Keywords

Comments

Only for n=0 with A003558(0) = 1 only the minimal solution for a(0), namely 1, for sign A332433(0) = +1 is recorded here.
For n >= 1 only one sign qualifies in A003558(n).
A comment on the iteration of f(x) = x^2 - 2 (called R(2, x) in A127672) with seed rho(n) := 2*cos(Pi/n) for odd n >= 3, used in the comment from Gary W. Adamson, Sep 06 2011 in A065941. The proof that the cycle length coincides with A003558(n) is done by using the known formulas, for integers k and m: (i) R(k, m*x) = R(k*m, x), (ii) R(-k, x) = R(k, x), and the periodicity formula (iii) R(j, rho(n)) = R(+/-(j + k*2*n), rho(n)), j >= 0, k integer, n odd >= 3. The iterations are then R(2^q, rho(n)), for q >= 1. The primitive period length P(n) is obtained from R(2^(P(n)+1), rho(n)) = R(2^1, rho(n)) = R(+-(2 + k*2*n), rho(n)), that is 2^P(n) = +-(1 + k*n) or 2^P(n) == +-1 (mod n) with the least P(n), hence P(n) = A003558(n).

Examples

			a(3) = 1 because 2^3 - 1 = 1*7,
a(4) = 1 because 2^3 + 1 = 1*9,
a(5) = 3 because 2^5 + 1 = 3*11,
a(9) = 27 because 2^9 + 1 = 27*19.
		

Crossrefs

Programs

  • Mathematica
    Suborder[a_, n_] := If[n > 1 && GCD[a, n] == 1,
       Min[MultiplicativeOrder[a, n, {-1, 1}]], 0];
    A003558[n_] := If[n == 1, 1, Suborder[2, 2n+1]];
    A332433[n_] := If[n == 0, 1, If[PowerMod[2, A003558[n], 2n+1]-1 == 0, 1, -1]];
    a[n_] := If[n == 0, 1, (2^(A003558[n]) - A332433[n])/(2n+1)];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Oct 17 2024 *)

Formula

a(n) = (2^(A003558(n)) - A332433(n))/(2*n+1), for n >= 0.

A179538 Numbers 2n+1 for which A003558(n), n>=1, are record values of A003558.

Original entry on oeis.org

3, 5, 7, 11, 13, 19, 23, 29, 37, 47, 53, 59, 61, 67, 71, 79, 83, 101, 103, 107, 121, 131, 139, 149, 163, 167, 173, 179, 181, 191, 197, 199, 211, 227, 239, 263, 269, 271, 293, 311, 317, 347, 349, 359, 367, 373, 379, 383, 389, 419, 421, 443, 461, 463, 467, 479
Offset: 1

Views

Author

Vladimir Shevelev, Jul 18 2010

Keywords

Comments

Conjecture. All terms are primes except for a finite set of squares of primes.
All terms from a(1) to a(5000) are primes except for a(21) = 121 = 11^2, supporting V. Shevelev's conjecture. [John W. Layman, Jul 22 2010]

Crossrefs

Programs

  • Mathematica
    s = {}; am = 0; Do[a = Min[MultiplicativeOrder[2, n, {-1, 1}]]; If[a > am, am = a; AppendTo[s, n]], {n, 3, 480, 2}]; s (* Amiram Eldar, Sep 13 2019 *)

Extensions

a(31)-a(56) from John W. Layman, Jul 22 2010

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)

A000010 Euler totient function phi(n): count numbers <= n and prime to n.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 6, 4, 6, 4, 10, 4, 12, 6, 8, 8, 16, 6, 18, 8, 12, 10, 22, 8, 20, 12, 18, 12, 28, 8, 30, 16, 20, 16, 24, 12, 36, 18, 24, 16, 40, 12, 42, 20, 24, 22, 46, 16, 42, 20, 32, 24, 52, 18, 40, 24, 36, 28, 58, 16, 60, 30, 36, 32, 48, 20, 66, 32, 44
Offset: 1

Views

Author

Keywords

Comments

Number of elements in a reduced residue system modulo n.
Degree of the n-th cyclotomic polynomial (cf. A013595). - Benoit Cloitre, Oct 12 2002
Number of distinct generators of a cyclic group of order n. Number of primitive n-th roots of unity. (A primitive n-th root x is such that x^k is not equal to 1 for k = 1, 2, ..., n - 1, but x^n = 1.) - Lekraj Beedassy, Mar 31 2005
Also number of complex Dirichlet characters modulo n; Sum_{k=1..n} a(k) is asymptotic to (3/Pi^2)*n^2. - Steven Finch, Feb 16 2006
a(n) is the highest degree of irreducible polynomial dividing 1 + x + x^2 + ... + x^(n-1) = (x^n - 1)/(x - 1). - Alexander Adamchuk, Sep 02 2006, corrected Sep 27 2006
a(p) = p - 1 for prime p. a(n) is even for n > 2. For n > 2, a(n)/2 = A023022(n) = number of partitions of n into 2 ordered relatively prime parts. - Alexander Adamchuk, Jan 25 2007
Number of automorphisms of the cyclic group of order n. - Benoit Jubin, Aug 09 2008
a(n+2) equals the number of palindromic Sturmian words of length n which are "bispecial", prefix or suffix of two Sturmian words of length n + 1. - Fred Lunnon, Sep 05 2010
Suppose that a and n are coprime positive integers, then by Euler's totient theorem, any factor of n divides a^phi(n) - 1. - Lei Zhou, Feb 28 2012
If m has k prime factors, (p_1, p_2, ..., p_k), then phi(m*n) = (Product_{i=1..k} phi (p_i*n))/phi(n)^(k-1). For example, phi(42*n) = phi(2*n)*phi(3*n)*phi(7*n)/phi(n)^2. - Gary Detlefs, Apr 21 2012
Sum_{n>=1} a(n)/n! = 1.954085357876006213144... This sum is referenced in Plouffe's inverter. - Alexander R. Povolotsky, Feb 02 2013 (see A336334. - Hugo Pfoertner, Jul 22 2020)
The order of the multiplicative group of units modulo n. - Michael Somos, Aug 27 2013
A strong divisibility sequence, that is, gcd(a(n), a(m)) = a(gcd(n, m)) for all positive integers n and m. - Michael Somos, Dec 30 2016
From Eric Desbiaux, Jan 01 2017: (Start)
a(n) equals the Ramanujan sum c_n(n) (last term on n-th row of triangle A054533).
a(n) equals the Jordan function J_1(n) (cf. A007434, A059376, A059377, which are the Jordan functions J_2, J_3, J_4, respectively). (End)
For n > 1, a(n) appears to be equal to the number of semi-meander solutions for n with top arches containing exactly 2 mountain ranges and exactly 2 arches of length 1. - Roger Ford, Oct 11 2017
a(n) is the minimum dimension of a lattice able to generate, via cut-and-project, the quasilattice whose diffraction pattern features n-fold rotational symmetry. The case n=15 is the first n > 1 in which the following simpler definition fails: "a(n) is the minimum dimension of a lattice with n-fold rotational symmetry". - Felix Flicker, Nov 08 2017
Number of cyclic Latin squares of order n with the first row in ascending order. - Eduard I. Vatutin, Nov 01 2020
a(n) is the number of rational numbers p/q >= 0 (in lowest terms) such that p + q = n. - Rémy Sigrist, Jan 17 2021
From Richard L. Ollerton, May 08 2021: (Start)
Formulas for the numerous OEIS entries involving Dirichlet convolution of a(n) and some sequence h(n) can be derived using the following (n >= 1):
Sum_{d|n} phi(d)*h(n/d) = Sum_{k=1..n} h(gcd(n,k)) [see P. H. van der Kamp link] = Sum_{d|n} h(d)*phi(n/d) = Sum_{k=1..n} h(n/gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)). Similarly,
Sum_{d|n} phi(d)*h(d) = Sum_{k=1..n} h(n/gcd(n,k)) = Sum_{k=1..n} h(gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)).
More generally,
Sum_{d|n} h(d) = Sum_{k=1..n} h(gcd(n,k))/phi(n/gcd(n,k)) = Sum_{k=1..n} h(n/gcd(n,k))/phi(n/gcd(n,k)).
In particular, for sequences involving the Möbius transform:
Sum_{d|n} mu(d)*h(n/d) = Sum_{k=1..n} h(gcd(n,k))*mu(n/gcd(n,k))/phi(n/gcd(n,k)) = Sum_{k=1..n} h(n/gcd(n,k))*mu(gcd(n,k))/phi(n/gcd(n,k)), where mu = A008683.
Use of gcd(n,k)*lcm(n,k) = n*k and phi(gcd(n,k))*phi(lcm(n,k)) = phi(n)*phi(k) provide further variations. (End)
From Richard L. Ollerton, Nov 07 2021: (Start)
Formulas for products corresponding to the sums above may found using the substitution h(n) = log(f(n)) where f(n) > 0 (for example, cf. formulas for the sum A018804 and product A067911 of gcd(n,k)):
Product_{d|n} f(n/d)^phi(d) = Product_{k=1..n} f(gcd(n,k)) = Product_{d|n} f(d)^phi(n/d) = Product_{k=1..n} f(n/gcd(n,k))^(phi(gcd(n,k))/phi(n/gcd(n,k))),
Product_{d|n} f(d)^phi(d) = Product_{k=1..n} f(n/gcd(n,k)) = Product_{k=1..n} f(gcd(n,k))^(phi(gcd(n,k))/phi(n/gcd(n,k))),
Product_{d|n} f(d) = Product_{k=1..n} f(gcd(n,k))^(1/phi(n/gcd(n,k))) = Product_{k=1..n} f(n/gcd(n,k))^(1/phi(n/gcd(n,k))),
Product_{d|n} f(n/d)^mu(d) = Product_{k=1..n} f(gcd(n,k))^(mu(n/gcd(n,k))/phi(n/gcd(n,k))) = Product_{k=1..n} f(n/gcd(n,k))^(mu(gcd(n,k))/phi(n/gcd(n,k))), where mu = A008683. (End)
a(n+1) is the number of binary words with exactly n distinct subsequences (when n > 0). - Radoslaw Zak, Nov 29 2021

Examples

			G.f. = x + x^2 + 2*x^3 + 2*x^4 + 4*x^5 + 2*x^6 + 6*x^7 + 4*x^8 + 6*x^9 + 4*x^10 + ...
a(8) = 4 with {1, 3, 5, 7} units modulo 8. a(10) = 4 with {1, 3, 7, 9} units modulo 10. - _Michael Somos_, Aug 27 2013
From _Eduard I. Vatutin_, Nov 01 2020: (Start)
The a(5)=4 cyclic Latin squares with the first row in ascending order are:
  0 1 2 3 4   0 1 2 3 4   0 1 2 3 4   0 1 2 3 4
  1 2 3 4 0   2 3 4 0 1   3 4 0 1 2   4 0 1 2 3
  2 3 4 0 1   4 0 1 2 3   1 2 3 4 0   3 4 0 1 2
  3 4 0 1 2   1 2 3 4 0   4 0 1 2 3   2 3 4 0 1
  4 0 1 2 3   3 4 0 1 2   2 3 4 0 1   1 2 3 4 0
(End)
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 840.
  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 24.
  • M. Baake and U. Grimm, Aperiodic Order Vol. 1: A Mathematical Invitation, Encyclopedia of Mathematics and its Applications 149, Cambridge University Press, 2013: see Tables 3.1 and 3.2.
  • Florian Cajori, A History of Mathematical Notations, Dover edition (2012), par. 409.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 193.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 154-156.
  • C. W. Curtis, Pioneers of Representation Theory ..., Amer. Math. Soc., 1999; see p. 3.
  • J.-M. De Koninck & A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Ellipses, Paris, 2004, Problème 529, pp. 71-257.
  • L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 1, Chapter V.
  • S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 115-119.
  • Carl Friedrich Gauss, "Disquisitiones Arithmeticae", Yale University Press, 1965; see p. 21.
  • Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Math., 2n-d ed.; Addison-Wesley, 1994, p. 137.
  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section B36.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, th. 60, 62, 63, 288, 323, 328, 330.
  • Peter Hilton and Jean Pedersen, A Mathematical Tapestry, Demonstrating the Beautiful Unity of Mathematics, Cambridge University Press, pages 261-264, the Coach theorem.
  • Jean-Marie Monier, Analyse, Exercices corrigés, 2ème année MP, Dunod, 1997, Exercice 3.2.21 pp. 281-294.
  • G. Pólya and G. Szegő, Problems and Theorems in Analysis, Springer-Verlag, New York, Heidelberg, Berlin, 2 vols., 1976, Vol. II, problem 71, p. 126.
  • Paulo Ribenboim, The New Book of Prime Number Records.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 28-33.
  • 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 162-167.

Crossrefs

Cf. A002088 (partial sums), A008683, A003434 (steps to reach 1), A007755, A049108, A002202 (values), A011755 (Sum k*phi(k)).
Cf. also A005277 (nontotient numbers). For inverse see A002181, A006511, A058277.
Jordan function J_k(n) is a generalization - see A059379 and A059380 (triangle of values of J_k(n)), this sequence (J_1), A007434 (J_2), A059376 (J_3), A059377 (J_4), A059378 (J_5).
Row sums of triangles A134540, A127448, A143239, A143353 and A143276.
Equals right and left borders of triangle A159937. - Gary W. Adamson, Apr 26 2009
Values for prime powers p^e: A006093 (e=1), A036689 (e=2), A135177 (e=3), A138403 (e=4), A138407 (e=5), A138412 (e=6).
Values for perfect powers n^e: A002618 (e=2), A053191 (e=3), A189393 (e=4), A238533 (e=5), A306411 (e=6), A239442 (e=7), A306412 (e=8), A239443 (e=9).
Cf. A076479.
Cf. A023900 (Dirichlet inverse of phi), A306633 (Dgf at s=3).

Programs

  • Axiom
    [eulerPhi(n) for n in 1..100]
    
  • Haskell
    a n = length (filter (==1) (map (gcd n) [1..n])) -- Allan C. Wechsler, Dec 29 2014
    
  • Julia
    # Computes the first N terms of the sequence.
    function A000010List(N)
        phi = [i for i in 1:N + 1]
        for i in 2:N + 1
            if phi[i] == i
                for j in i:i:N + 1
                    phi[j] -= div(phi[j], i)
        end end end
    return phi end
    println(A000010List(68))  # Peter Luschny, Sep 03 2023
  • Magma
    [ EulerPhi(n) : n in [1..100] ]; // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006
    
  • Maple
    with(numtheory): A000010 := phi; [ seq(phi(n), n=1..100) ]; # version 1
    with(numtheory): phi := proc(n) local i,t1,t2; t1 := ifactors(n)[2]; t2 := n*mul((1-1/t1[i][1]),i=1..nops(t1)); end; # version 2
    # Alternative without library function:
    A000010List := proc(N) local i, j, phi;
        phi := Array([seq(i, i = 1 .. N+1)]);
        for i from 2 to N + 1 do
            if phi[i] = i then
                for j from i by i to N + 1 do
                    phi[j] := phi[j] - iquo(phi[j], i) od
            fi od;
    return phi end:
    A000010List(68);  # Peter Luschny, Sep 03 2023
  • Mathematica
    Array[EulerPhi, 70]
  • Maxima
    makelist(totient(n),n,0,1000); /* Emanuele Munarini, Mar 26 2011 */
    
  • PARI
    {a(n) = if( n==0, 0, eulerphi(n))}; /* Michael Somos, Feb 05 2011 */
    
  • Python
    from sympy.ntheory import totient
    print([totient(i) for i in range(1, 70)])  # Indranil Ghosh, Mar 17 2017
    
  • Python
    # Note also the implementation in A365339.
    
  • Sage
    def A000010(n): return euler_phi(n) # Jaap Spies, Jan 07 2007
    
  • Sage
    [euler_phi(n) for n in range(1, 70)]  # Zerinvary Lajos, Jun 06 2009
    

Formula

phi(n) = n*Product_{distinct primes p dividing n} (1 - 1/p).
Sum_{d divides n} phi(d) = n.
phi(n) = Sum_{d divides n} mu(d)*n/d, i.e., the Moebius transform of the natural numbers; mu() = Moebius function A008683().
Dirichlet generating function Sum_{n>=1} phi(n)/n^s = zeta(s-1)/zeta(s). Also Sum_{n >= 1} phi(n)*x^n/(1 - x^n) = x/(1 - x)^2.
Multiplicative with a(p^e) = (p - 1)*p^(e-1). - David W. Wilson, Aug 01 2001
Sum_{n>=1} (phi(n)*log(1 - x^n)/n) = -x/(1 - x) for -1 < x < 1 (cf. A002088) - Henry Bottomley, Nov 16 2001
a(n) = binomial(n+1, 2) - Sum_{i=1..n-1} a(i)*floor(n/i) (see A000217 for inverse). - Jon Perry, Mar 02 2004
It is a classical result (certainly known to Landau, 1909) that lim inf n/phi(n) = 1 (taking n to be primes), lim sup n/(phi(n)*log(log(n))) = e^gamma, with gamma = Euler's constant (taking n to be products of consecutive primes starting from 2 and applying Mertens' theorem). See e.g. Ribenboim, pp. 319-320. - Pieter Moree, Sep 10 2004
a(n) = Sum_{i=1..n} |k(n, i)| where k(n, i) is the Kronecker symbol. Also a(n) = n - #{1 <= i <= n : k(n, i) = 0}. - Benoit Cloitre, Aug 06 2004 [Corrected by Jianing Song, Sep 25 2018]
Conjecture: Sum_{i>=2} (-1)^i/(i*phi(i)) exists and is approximately 0.558 (A335319). - Orges Leka (oleka(AT)students.uni-mainz.de), Dec 23 2004
From Enrique Pérez Herrero, Sep 07 2010: (Start)
a(n) = Sum_{i=1..n} floor(sigma_k(i*n)/sigma_k(i)*sigma_k(n)), where sigma_2 is A001157.
a(n) = Sum_{i=1..n} floor(tau_k(i*n)/tau_k(i)*tau_k(n)), where tau_3 is A007425.
a(n) = Sum_{i=1..n} floor(rad(i*n)/rad(i)*rad(n)), where rad is A007947. (End)
a(n) = A173557(n)*A003557(n). - R. J. Mathar, Mar 30 2011
a(n) = A096396(n) + A096397(n). - Reinhard Zumkeller, Mar 24 2012
phi(p*n) = phi(n)*(floor(((n + p - 1) mod p)/(p - 1)) + p - 1), for primes p. - Gary Detlefs, Apr 21 2012
For odd n, a(n) = 2*A135303((n-1)/2)*A003558((n-1)/2) or phi(n) = 2*c*k; the Coach theorem of Pedersen et al. Cf. A135303. - Gary W. Adamson, Aug 15 2012
G.f.: Sum_{n>=1} mu(n)*x^n/(1 - x^n)^2, where mu(n) = A008683(n). - Mamuka Jibladze, Apr 05 2015
a(n) = n - cototient(n) = n - A051953(n). - Omar E. Pol, May 14 2016
a(n) = lim_{s->1} n*zeta(s)*(Sum_{d divides n} A008683(d)/(e^(1/d))^(s-1)), for n > 1. - Mats Granvik, Jan 26 2017
Conjecture: a(n) = Sum_{a=1..n} Sum_{b=1..n} Sum_{c=1..n} 1 for n > 1. The sum is over a,b,c such that n*c - a*b = 1. - Benedict W. J. Irwin, Apr 03 2017
a(n) = Sum_{j=1..n} gcd(j, n) cos(2*Pi*j/n) = Sum_{j=1..n} gcd(j, n) exp(2*Pi*i*j/n) where i is the imaginary unit. Notice that the Ramanujan's sum c_n(k) := Sum_{j=1..n, gcd(j, n) = 1} exp(2*Pi*i*j*k/n) gives a(n) = Sum_{k|n} k*c_(n/k)(1) = Sum_{k|n} k*mu(n/k). - Michael Somos, May 13 2018
G.f.: x*d/dx(x*d/dx(log(Product_{k>=1} (1 - x^k)^(-mu(k)/k^2)))), where mu(n) = A008683(n). - Mamuka Jibladze, Sep 20 2018
a(n) = Sum_{d|n} A007431(d). - Steven Foster Clark, May 29 2019
G.f. A(x) satisfies: A(x) = x/(1 - x)^2 - Sum_{k>=2} A(x^k). - Ilya Gutkovskiy, Sep 06 2019
a(n) >= sqrt(n/2) (Nicolas). - Hugo Pfoertner, Jun 01 2020
a(n) > n/(exp(gamma)*log(log(n)) + 5/(2*log(log(n)))), except for n=223092870 (Rosser, Schoenfeld). - Hugo Pfoertner, Jun 02 2020
From Bernard Schott, Nov 28 2020: (Start)
Sum_{m=1..n} 1/a(m) = A028415(n)/A048049(n) -> oo when n->oo.
Sum_{n >= 1} 1/a(n)^2 = A109695.
Sum_{n >= 1} 1/a(n)^3 = A335818.
Sum_{n >= 1} 1/a(n)^k is convergent iff k > 1.
a(2n) = a(n) iff n is odd, and, a(2n) > a(n) iff n is even. (End) [Actually, a(2n) = 2*a(n) for even n. - Jianing Song, Sep 18 2022]
a(n) = 2*A023896(n)/n, n > 1. - Richard R. Forberg, Feb 03 2021
From Richard L. Ollerton, May 09 2021: (Start)
For n > 1, Sum_{k=1..n} phi^{(-1)}(n/gcd(n,k))*a(gcd(n,k))/a(n/gcd(n,k)) = 0, where phi^{(-1)} = A023900.
For n > 1, Sum_{k=1..n} a(gcd(n,k))*mu(rad(gcd(n,k)))*rad(gcd(n,k))/gcd(n,k) = 0.
For n > 1, Sum_{k=1..n} a(gcd(n,k))*mu(rad(n/gcd(n,k)))*rad(n/gcd(n,k))*gcd(n,k) = 0.
Sum_{k=1..n} a(gcd(n,k))/a(n/gcd(n,k)) = n. (End)
a(n) = Sum_{d|n, e|n} gcd(d, e)*mobius(n/d)*mobius(n/e) (the sum is a multiplicative function of n by Tóth, and takes the value p^e - p^(e-1) for n = p^e, a prime power). - Peter Bala, Jan 22 2024
Sum_{n >= 1} phi(n)*x^n/(1 + x^n) = x + 3*x^3 + 5*x^5 + 7*x^7 + ... = Sum_{n >= 1} phi(2*n-1)*x^(2*n-1)/(1 - x^(4*n-2)). For the first equality see Pólya and Szegő, problem 71, p. 126. - Peter Bala, Feb 29 2024
Conjecture: a(n) = lim_{k->oo} (n^(k + 1))/A000203(n^k). - Velin Yanev, Dec 04 2024 [A000010(p) = p-1, A000203(p^k) = (p^(k+1)-1)/(p-1), so the conjecture is true if n is prime. - Vaclav Kotesovec, Dec 19 2024]

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

A065941 T(n,k) = binomial(n-floor((k+1)/2), floor(k/2)). Triangle read by rows, for 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 4, 3, 3, 1, 1, 1, 5, 4, 6, 3, 1, 1, 1, 6, 5, 10, 6, 4, 1, 1, 1, 7, 6, 15, 10, 10, 4, 1, 1, 1, 8, 7, 21, 15, 20, 10, 5, 1, 1, 1, 9, 8, 28, 21, 35, 20, 15, 5, 1, 1, 1, 10, 9, 36, 28, 56, 35, 35, 15, 6, 1, 1, 1, 11, 10, 45, 36, 84, 56, 70, 35, 21, 6, 1
Offset: 0

Views

Author

Len Smiley, Nov 29 2001

Keywords

Comments

Also the q-Stirling2 numbers at q = -1. - Peter Luschny, Mar 09 2020
Row sums give the Fibonacci sequence. So do the alternating row sums.
Triangle of coefficients of polynomials defined by p(-1,x) = p(0,x) = 1, p(n, x) = x*p(n-1, x) + p(n-2, x), for n >= 1. - Benoit Cloitre, May 08 2005 [rewritten with correct offset. - Wolfdieter Lang, Feb 18 2020]
Another version of triangle in A103631. - Philippe Deléham, Jan 01 2009
The T(n,k) coefficients appear in appendix 2 of Parks's remarkable article "A new proof of the Routh-Hurwitz stability criterion using the second method of Liapunov" if we assume that the b(n) coefficients are all equal to 1 and ignore the first column. The complete version of this triangle including the first column is A103631. - Johannes W. Meijer, Aug 11 2011
Signed ++--++..., the roots are chaotic using f(x) --> x^2 - 2 with cycle lengths shown in A003558 by n-th rows. Example: given row 3, x^3 + x^2 - 2x - 1; the roots are (a = 1.24697, ...; b = -0.445041, ...; c = -1.802937, ...). Then (say using seed b with x^2 - 2) we obtain the trajectory -0.445041, ... -> -1.80193, ... -> 1.24697, ...; matching the entry "3" in A003558(3). - Gary W. Adamson, Sep 06 2011
From Gary W. Adamson, Aug 25 2019: (Start)
Roots to the polynomials and terms in A003558 can all be obtained from the numbers below using a doubling series mod N procedure as follows: (more than one row may result). Any row ends when the trajectory produces a term already used. Then try the next higher odd term not used as the leftmost term, then repeat.
For example, for N = 11, we get: (1, 2, 4, 3, 5), showing that when confronted with two choices after the 4: (8 and -3), pick the smaller (abs) term, = 3. Then for the next row pick 7 (not used) and repeat the algorithm; succeeding only if the trajectory produces new terms. But 7 is also (-4) mod 11 and 4 was used. Therefore what I call the "r-t table" (for roots trajectory) has only one row: (1, 2, 4, 3, 5). Conjecture: The numbers of terms in the first row is equal to A003558 corresponding to N, i.e., 5 in this case with period 2.
Now for the roots to the polynomials. Pick N = 7. The polynomial is x^3 - x^2 - 2x + 1 = 0, with roots 1.8019..., -1.2469... and 0.445... corresponding to 2*cos(j*Pi/N), N = 7, and j = (1, 2, and 3). The terms (1, 2, 3) are the r-t terms for N = 7. For 11, the r-t terms are (1, 2, 4, 3, 5). This implies that given any roots of the corresponding polynomial, they are cyclic using f(x) --> x^2 - 2 with cycle lengths shown in A003558. The terms thus generated are 2*cos(j*Pi), with j = (1, 2, 4, 3, 5). Check: Begin with 2*j*Pi/N, with j = 1 (1.9189...). The other trajectory terms are: --> 1.6825..., --> 0.83083..., -1.3097...; 545...; (a 5 period and cyclic since we can begin with any of the constants). The r-t table for odd N begins as follows:
3...............1
5...............1, 2
7...............1, 2, 3
9...............1, 2, 4
...............3 (singleton terms reduce to "1") (9 has two rows)
11...............1, 2, 4, 3, 5
13...............1, 2, 4, 5, 3, 6
15...............1, 2, 4, 7
................3, 6 (dividing through by the gcd gives (1, 2))
................5. (singleton terms reduce to "1")
The result is that 15 has 3 factors (since 3 rows), and the values of those factors are the previous terms "N", corresponding to the r-t terms in each row. Thus, the first row is new, the second (1, 2), corresponds to N = 5, and the "1" in row 3 corresponds to N = 3. The factors are those values apart from 15 and 1. Note that all of the unreduced r-t terms in all rows for N form a complete set of the terms 1 through (N-1)/2 without duplication. (End)
From Gary W. Adamson, Sep 30 2019: (Start)
The 3 factors of the 7th degree polynomial for 15: (x^7 - x^6 - 6x^5 + 5x^4 + 10x^3 - 6x^2 - 4x + 1) can be determined by getting the roots for 2*cos(j*Pi/1), j = (1, 2, 4, 7) and finding the corresponding polynomial, which is x^4 + x^3 - 4x^2 - 4x + 1. This is the minimal polynomial for N = 15 as shown in Table 2, p. 46 of (Lang). The degree of this polynomial is 4, corresponding to the entry in A003558 for 15, = 4. The trajectories (3, 6) and (5) are j values for 2*cos(j*Pi/15) which are roots to x^2 - x - 1 (relating to the pentagon), and (x - 1), relating to the triangle. (End)
From Gary W. Adamson, Aug 21 2019: (Start)
Matrices M of the form: (1's in the main diagonal, -1's in the subdiagonal, and the rest zeros) are chaotic if we replace (f(x) --> x^2 - 2) with f(x) --> M^2 - 2I, where I is the Identity matrix [1, 0, 0; 0, 1, 0; 0, 0, 1]. For example, with the 3 X 3 matrix M: [0, 0, 1; 0, 1, -1; 1, -1, 0]; the f(x) trajectory is:
....M^2 - 2I: [-1, -1, 0; -1, 0, -1; 0, -1, 0], then for the latter,
....M^2 - 2I: [0, 1, 1; 1, 0, 0; 1, 0, -1]. The cycle ends with period 3 since the next matrix is (-1) * the seed matrix. As in the case with f(x) --> x^2 - 2, the eigenvalues of the 3 chaotic matrices are (abs) 1.24697, 0.44504... and 1.80193, ... Also, the characteristic equations of the 3 matrices are the same as or variants of row 4 of the triangle below: (x^3 + x - 2x - 1) with different signs. (End)
Received from Herb Conn, Jan 2004: (Start)
Let x = 2*cos(2A) (A = Angle); then
sin(A)/sin A = 1
sin(3A)/sin A = x + 1
sin(5A)/sin A = x^2 + x - 1
sin(7A)/sin A = x^3 + x - 2x - 1
sin(9A)/sin A = x^4 + x^3 - 3x^2 - 2x + 1
... (signed ++--++...). (End)
Or Pascal's triangle (A007318) with duplicated diagonals. Also triangle of coefficients of polynomials defined by P_0(x) = 1 and for n>=1, P_n(x) = F_n(x) + F_(n+1)(x), where F_n(x) is Fibonacci polynomial (cf. A049310): F_n(x) = Sum_{i=0..floor((n-1)/2)} C(n-i-1,i)*x^(n-2*i-1). - Vladimir Shevelev, Apr 12 2012
The matrix inverse is given by
1;
1, 1;
0, -1, 1;
0, 1, -2, 1;
0, 0, 1, -2, 1;
0, 0, -1, 3, -3, 1;
0, 0, 0, -1, 3, -3, 1;
0, 0, 0, 1, -4, 6, -4, 1;
0, 0, 0, 0, 1, -4, 6, -4, 1;
... apart from signs the same as A124645. - R. J. Mathar, Mar 12 2013

Examples

			Triangle T(n, k) begins:
n\k 0  1  2  3   4   5  6   7  8  9 ...
---------------------------------------
[0] 1,
[1] 1, 1,
[2] 1, 1, 1,
[3] 1, 1, 2, 1,
[4] 1, 1, 3, 2,  1,
[5] 1, 1, 4, 3,  3,  1,
[6] 1, 1, 5, 4,  6,  3,  1,
[7] 1, 1, 6, 5, 10,  6,  4,  1,
[8] 1, 1, 7, 6, 15, 10, 10,  4,  1,
[9] 1, 1, 8, 7, 21, 15, 20, 10,  5, 1,
---------------------------------------
From _Gary W. Adamson_, Oct 23 2019: (Start)
Consider the roots of the polynomials corresponding to odd N such that for N=7 the polynomial is (x^3 + x^2 - 2x - 1) and the roots (a, b, c) are (-1.8019377..., 1.247697..., and -0.445041...). The discriminant of a polynomial derived from the roots is the square of the product of successive differences: ((a-b), (b-c), (c-a))^2 in this case, resulting in 49, matching the method derived from the coefficients of a cubic. For our purposes we use the product of the differences, not the square, resulting in (3.048...) * (1.69202...) * (1.35689...) = 7.0. Conjecture: for all polynomials in the set, the product of the differences of the roots = the corresponding N. For N = 7, we get x^3 - 7x + 7. It appears that for all prime N's, these resulting companion polynomials are monic (left coefficient is 1), and all other coefficients are N or multiples thereof, with the rightmost term = N. The companion polynomials for the first few primes are:
  N =  5:  x^2 - 5;
  N =  7:  x^3 - 7x + 7;
  N = 11:  x^5 - 11x^3 + 11x^2 + 11x - 11;
  N = 13:  x^6 - 13x^4 + 13x^3 + 26x^2 - 39x + 13;
  N = 17:  x^8 - 17x^6 + 17x^5 + 68x^4 - 119x^3 + 17x^2 + 51x - 17;
  N = 19:  x^9 - 19x^7 + 19x^6 + 95x^5 - 171x^4 - 19x^3 + 190x^2 - 114x + 19. (End)
		

Crossrefs

Cf. A065942 (central stalk sequence), A000045 (row sums), A108299.
Reflected version of A046854.
Some triangle sums (see A180662): A000045 (Fi1), A016116 (Kn21), A000295 (Kn23), A094967 (Fi2), A000931 (Ca2), A001519 (Gi3), A000930 (Ze3).

Programs

  • Haskell
    a065941 n k = a065941_tabl !! n !! k
    a065941_row n = a065941_tabl !! n
    a065941_tabl = iterate (\row ->
       zipWith (+) ([0] ++ row) (zipWith (*) (row ++ [0]) a059841_list)) [1]
    -- Reinhard Zumkeller, May 07 2012
    
  • Magma
    [Binomial(n - Floor((k+1)/2), Floor(k/2)): k in [0..n], n in [0..15]]; // G. C. Greubel, Jul 10 2019
    
  • Maple
    A065941 := proc(n,k): binomial(n-floor((k+1)/2),floor(k/2)) end: seq(seq(A065941(n,k), k=0..n), n=0..15); # Johannes W. Meijer, Aug 11 2011
    A065941 := proc(n,k) option remember: local j: if k=0 then 1 elif k=1 then 1: elif k>=2 then add(procname(j,k-2), j=k-2..n-2) fi: end: seq(seq(A065941(n,k), k=0..n), n=0..15);  # Johannes W. Meijer, Aug 11 2011
    # The function qStirling2 is defined in A333143.
    seq(print(seq(qStirling2(n, k, -1), k=0..n)), n=0..9);
    # Peter Luschny, Mar 09 2020
  • Mathematica
    Flatten[Table[Binomial[n-Floor[(k+1)/2],Floor[k/2]],{n,0,15},{k,0,n}]] (* Harvey P. Dale, Dec 11 2011 *)
  • PARI
    T065941(n, k) = binomial(n-(k+1)\2, k\2); \\ Michel Marcus, Apr 28 2014
    
  • Sage
    [[binomial(n - floor((k+1)/2), floor(k/2)) for k in (0..n)] for n in (0..15)] # G. C. Greubel, Jul 10 2019

Formula

T(n, k) = binomial(n-floor((k+1)/2), floor(k/2)).
As a square array read by antidiagonals, this is given by T1(n, k) = binomial(floor(n/2) + k, k). - Paul Barry, Mar 11 2003
Triangle is a reflection of that in A066170 (absolute values). - Gary W. Adamson, Feb 16 2004
Recurrences: T(k, 0) = 1, T(k, n) = T(k-1, n) + T(k-2, n-2), or T(k, n) = T(k-1, n) + T(k-1, n-1) if n even, T(k-1, n-1) if n odd. - Ralf Stephan, May 17 2004
G.f.: sum[n, sum[k, T(k, n)x^ky^n]] = (1+xy)/(1-y-x^2y^2). sum[n>=0, T(k, n)y^n] = y^k/(1-y)^[k/2]. - Ralf Stephan, May 17 2004
T(n, k) = A108299(n, k)*A087960(k) = abs(A108299(n, k)). - Reinhard Zumkeller, Jun 01 2005
From Johannes W. Meijer, Aug 11 2011: (Start)
T(n,k) = A046854(n, n-k) = abs(A066170(n, n-k)).
T(n+k, n-k) = A109223(n,k).
T(n, k) = sum(T(j, k-2), j=k-2..n-2), 2 <= k <= n, n>=2;
T(n, 0) =1, T(n+1, 1) = 1, n >= 0. (End)
For n > 1: T(n, k) = T(n-2, k) + T(n-1, k), 1 < k < n. - Reinhard Zumkeller, Apr 24 2013

A194959 Fractalization of (1 + floor(n/2)).

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 1, 3, 4, 2, 1, 3, 5, 4, 2, 1, 3, 5, 6, 4, 2, 1, 3, 5, 7, 6, 4, 2, 1, 3, 5, 7, 8, 6, 4, 2, 1, 3, 5, 7, 9, 8, 6, 4, 2, 1, 3, 5, 7, 9, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 12, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 13, 12, 10, 8, 6, 4, 2, 1, 3, 5
Offset: 1

Views

Author

Clark Kimberling, Sep 06 2011

Keywords

Comments

Suppose that p(1), p(2), p(3), ... is an integer sequence satisfying 1 <= p(n) <= n for n >= 1. Define g(1)=(1) and for n > 1, form g(n) from g(n-1) by inserting n so that its position in the resulting n-tuple is p(n). The sequence f obtained by concatenating g(1), g(2), g(3), ... is clearly a fractal sequence, here introduced as the fractalization of p. The interspersion associated with f is here introduced as the interspersion fractally induced by p, denoted by I(p); thus, the k-th term in the n-th row of I(p) is the position of the k-th n in f. Regarded as a sequence, I(p) is a permutation of the positive integers; its inverse permutation is denoted by Q(p).
...
Example: Let p=(1,2,2,3,3,4,4,5,5,6,6,7,7,...)=A008619. Then g(1)=(1), g(2)=(1,2), g(3)=(1,3,2), so that
f=(1,1,2,1,3,2,1,3,4,2,1,3,5,4,2,1,3,5,6,4,2,1,...)=A194959; and I(p)=A057027, Q(p)=A064578.
The interspersion I(P) has the following northwest corner, easily read from f:
1 2 4 7 11 16 22
3 6 10 15 21 28 36
5 8 12 17 23 30 38
9 14 20 27 35 44 54
...
Following is a chart of selected p, f, I(p), and Q(p):
p f I(p) Q(p)
Count odd numbers up to n, then even numbers down from n. - Franklin T. Adams-Watters, Jan 21 2012
This sequence defines the square array A(n,k), n > 0 and k > 0, read by antidiagonals and the triangle T(n,k) = A(n+1-k,k) for 1 <= k <= n read by rows (see Formula and Example). - Werner Schulte, May 27 2018

Examples

			The sequence p=A008619 begins with 1,2,2,3,3,4,4,5,5,..., so that g(1)=(1). To form g(2), write g(1) and append 2 so that in g(2) this 2 has position p(2)=2: g(2)=(1,2). Then form g(3) by inserting 3 at position p(3)=2: g(3)=(1,3,2), and so on. The fractal sequence A194959 is formed as the concatenation g(1)g(2)g(3)g(4)g(5)...=(1,1,2,1,3,2,1,3,4,2,1,3,5,4,2,...).
From _Werner Schulte_, May 27 2018: (Start)
This sequence seen as a square array read by antidiagonals:
  n\k: 1  2  3  4  5   6   7   8   9  10  11  12 ...
  ===================================================
   1   1  2  2  2  2   2   2   2   2   2   2   2 ... (see A040000)
   2   1  3  4  4  4   4   4   4   4   4   4   4 ... (see A113311)
   3   1  3  5  6  6   6   6   6   6   6   6   6 ...
   4   1  3  5  7  8   8   8   8   8   8   8   8 ...
   5   1  3  5  7  9  10  10  10  10  10  10  10 ...
   6   1  3  5  7  9  11  12  12  12  12  12  12 ...
   7   1  3  5  7  9  11  13  14  14  14  14  14 ...
   8   1  3  5  7  9  11  13  15  16  16  16  16 ...
   9   1  3  5  7  9  11  13  15  17  18  18  18 ...
  10   1  3  5  7  9  11  13  15  17  19  20  20 ...
  etc.
This sequence seen as a triangle read by rows:
  n\k:  1  2  3  4  5   6   7   8   9  10  11  12  ...
  ======================================================
   1    1
   2    1  2
   3    1  3  2
   4    1  3  4  2
   5    1  3  5  4  2
   6    1  3  5  6  4   2
   7    1  3  5  7  6   4   2
   8    1  3  5  7  8   6   4   2
   9    1  3  5  7  9   8   6   4   2
  10    1  3  5  7  9  10   8   6   4   2
  11    1  3  5  7  9  11  10   8   6   4   2
  12    1  3  5  7  9  11  12  10   8   6   4   2
  etc.
(End)
		

References

  • Clark Kimberling, "Fractal sequences and interspersions," Ars Combinatoria 45 (1997) 157-168.

Crossrefs

Cf. A000142, A000217, A005408, A005843, A008619, A057027, A064578, A209229, A210535, A219977; A000012 (col 1), A157532 (col 2), A040000 (row 1), A113311 (row 2); A194029 (introduces the natural fractal sequence and natural interspersion of a sequence - different from those introduced at A194959).
Cf. A003558 (g permutation order), A102417 (index), A330081 (on bits), A057058 (inverse).

Programs

  • Mathematica
    r = 2; p[n_] := 1 + Floor[n/r]
    Table[p[n], {n, 1, 90}]  (* A008619 *)
    g[1] = {1}; g[n_] := Insert[g[n - 1], n, p[n]]
    f[1] = g[1]; f[n_] := Join[f[n - 1], g[n]]
    f[20] (* A194959 *)
    row[n_] := Position[f[30], n];
    u = TableForm[Table[row[n], {n, 1, 5}]]
    v[n_, k_] := Part[row[n], k];
    w = Flatten[Table[v[k, n - k + 1], {n, 1, 13},
    {k, 1, n}]]  (* A057027 *)
    q[n_] := Position[w, n]; Flatten[
    Table[q[n], {n, 1, 80}]]  (* A064578 *)
    Flatten[FoldList[Insert[#1, #2, Floor[#2/2] + 1] &, {}, Range[10]]] (* Birkas Gyorgy, Jun 30 2012 *)
  • PARI
    T(n,k) = min(k<<1-1,(n-k+1)<<1); \\ Kevin Ryde, Oct 09 2020

Formula

From Werner Schulte, May 27 2018 and Jul 10 2018: (Start)
Seen as a triangle: It seems that the triangle T(n,k) for 1 <= k <= n (see Example) is the mirror image of A210535.
Seen as a square array A(n,k) and as a triangle T(n,k):
A(n,k) = 2*k-1 for 1 <= k <= n, and A(n,k) = 2*n for 1 <= n < k.
A(n+1,k+1) = A(n,k+1) + A(n,k) - A(n-1,k) for k > 0 and n > 1.
A(n,k) = A(k,n) - 1 for n > k >= 1.
P(n,x) = Sum_{k>0} A(n,k)*x^(k-1) = (1-x^n)*(1-x^2)/(1-x)^3 for n >= 1.
Q(y,k) = Sum_{n>0} A(n,k)*y^(n-1) = 1/(1-y) for k = 1 and Q(y,k) = Q(y,1) + P(k-1,y) for k > 1.
G.f.: Sum_{n>0, k>0} A(n,k)*x^(k-1)*y^(n-1) = (1+x)/((1-x)*(1-y)*(1-x*y)).
Sum_{k=1..n} A(n+1-k,k) = Sum_{k=1..n} T(n,k) = A000217(n) for n > 0.
Sum_{k=1..n} (-1)^(k-1) * A(n+1-k,k) = Sum_{k=1..n} (-1)^(k-1) * T(n,k) = A219977(n-1) for n > 0.
Product_{k=1..n} A(n+1-k,k) = Product_{k=1..n} T(n,k) = A000142(n) for n > 0.
A(n+m,n) = A005408(n-1) for n > 0 and some fixed m >= 0.
A(n,n+m) = A005843(n) for n > 0 and some fixed m > 0.
Let A_m be the upper left part of the square array A(n,k) with m rows and m columns. Then det(A_m) = 1 for some fixed m > 0.
The P(n,x) satisfy the recurrence equation P(n+1,x) = P(n,x) + x^n*P(1,x) for n > 0 and initial value P(1,x) = (1+x)/(1-x).
Let B(n,k) be multiplicative with B(n,p^e) = A(n,e+1) for e >= 0 and some fixed n > 0. That yields the Dirichlet g.f.: Sum_{k>0} B(n,k)/k^s = (zeta(s))^3/(zeta(2*s)*zeta(n*s)).
Sum_{k=1..n} A(k,n+1-k)*A209229(k) = 2*n-1. (conjectured)
(End)
From Kevin Ryde, Oct 09 2020: (Start)
T(n,k) = 2*k-1 if 2*k-1 <= n, or 2*(n+1-k) if 2*k-1 > n. [Lévy, chapter 1 section 1 equations (a),(b)]
Fixed points T(n,k)=k for k=1 and k = (2/3)*(n+1) when an integer. [Lévy, chapter 1 section 2 equation (3)]
(End)

Extensions

Name corrected by Franklin T. Adams-Watters, Jan 21 2012

A108299 Triangle read by rows, 0 <= k <= n: T(n,k) = binomial(n-[(k+1)/2],[k/2])*(-1)^[(k+1)/2].

Original entry on oeis.org

1, 1, -1, 1, -1, -1, 1, -1, -2, 1, 1, -1, -3, 2, 1, 1, -1, -4, 3, 3, -1, 1, -1, -5, 4, 6, -3, -1, 1, -1, -6, 5, 10, -6, -4, 1, 1, -1, -7, 6, 15, -10, -10, 4, 1, 1, -1, -8, 7, 21, -15, -20, 10, 5, -1, 1, -1, -9, 8, 28, -21, -35, 20, 15, -5, -1, 1, -1, -10, 9, 36, -28, -56, 35, 35, -15, -6, 1, 1, -1, -11, 10, 45, -36, -84, 56, 70
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 01 2005

Keywords

Comments

Matrix inverse of A124645.
Let L(n,x) = Sum_{k=0..n} T(n,k)*x^(n-k) and Pi=3.14...:
L(n,x) = Product_{k=1..n} (x - 2*cos((2*k-1)*Pi/(2*n+1)));
Sum_{k=0..n} T(n,k) = L(n,1) = A010892(n+1);
Sum_{k=0..n} abs(T(n,k)) = A000045(n+2);
abs(T(n,k)) = A065941(n,k), T(n,k) = A065941(n,k)*A087960(k);
T(2*n,k) + T(2*n+1,k+1) = 0 for 0 <= k <= 2*n;
T(n,0) = A000012(n) = 1; T(n,1) = -1 for n > 0;
T(n,2) = -(n-1) for n > 1; T(n,3) = A000027(n)=n for n > 2;
T(n,4) = A000217(n-3) for n > 3; T(n,5) = -A000217(n-4) for n > 4;
T(n,6) = -A000292(n-5) for n > 5; T(n,7) = A000292(n-6) for n > 6;
T(n,n-3) = A058187(n-3)*(-1)^floor(n/2) for n > 2;
T(n,n-2) = A008805(n-2)*(-1)^floor((n+1)/2) for n > 1;
T(n,n-1) = A008619(n-1)*(-1)^floor(n/2) for n > 0;
T(n,n) = L(n,0) = (-1)^floor((n+1)/2);
L(n,1) = A010892(n+1); L(n,-1) = A061347(n+2);
L(n,2) = 1; L(n,-2) = A005408(n)*(-1)^n;
L(n,3) = A001519(n); L(n,-3) = A002878(n)*(-1)^n;
L(n,4) = A001835(n+1); L(n,-4) = A001834(n)*(-1)^n;
L(n,5) = A004253(n); L(n,-5) = A030221(n)*(-1)^n;
L(n,6) = A001653(n); L(n,-6) = A002315(n)*(-1)^n;
L(n,7) = A049685(n); L(n,-7) = A033890(n)*(-1)^n;
L(n,8) = A070997(n); L(n,-8) = A057080(n)*(-1)^n;
L(n,9) = A070998(n); L(n,-9) = A057081(n)*(-1)^n;
L(n,10) = A072256(n+1); L(n,-10) = A054320(n)*(-1)^n;
L(n,11) = A078922(n+1); L(n,-11) = A097783(n)*(-1)^n;
L(n,12) = A077417(n); L(n,-12) = A077416(n)*(-1)^n;
L(n,13) = A085260(n);
L(n,14) = A001570(n); L(n,-14) = A028230(n)*(-1)^n;
L(n,n) = A108366(n); L(n,-n) = A108367(n).
Row n of the matrix inverse (A124645) has g.f.: x^floor(n/2)*(1-x)^(n-floor(n/2)). - Paul D. Hanna, Jun 12 2005
From L. Edson Jeffery, Mar 12 2011: (Start)
Conjecture: Let N=2*n+1, with n > 2. Then T(n,k) (0 <= k <= n) gives the k-th coefficient in the characteristic function p_N(x)=0, of degree n in x, for the n X n tridiagonal unit-primitive matrix G_N (see [Jeffery]) of the form
G_N=A_{N,1}=
(0 1 0 ... 0)
(1 0 1 0 ... 0)
(0 1 0 1 0 ... 0)
...
(0 ... 0 1 0 1)
(0 ... 0 1 1),
with solutions phi_j = 2*cos((2*j-1)*Pi/N), j=1,2,...,n. For example, for n=3,
G_7=A_{7,1}=
(0 1 0)
(1 0 1)
(0 1 1).
We have {T(3,k)}=(1,-1,-2,1), while the characteristic function of G_7 is p(x) = x^3-x^2-2*x+1 = 0, with solutions phi_j = 2*cos((2*j-1)*Pi/7), j=1,2,3. (End)
The triangle sums, see A180662 for their definitions, link A108299 with several sequences, see the crossrefs. - Johannes W. Meijer, Aug 08 2011
The roots to the polynomials are chaotic using iterates of the operation (x^2 - 2), with cycle lengths L and initial seeds returning to the same term or (-1)* the seed. Periodic cycle lengths L are shown in A003558 such that for the polynomial represented by row r, the cycle length L is A003558(r-1). The matrices corresponding to the rows as characteristic polynomials are likewise chaotic [cf. Kappraff et al., 2005] with the same cycle lengths but substituting 2*I for the "2" in (x^2 - 2), where I = the Identity matrix. For example, the roots to x^3 - x^2 - 2x + 1 = 0 are 1.801937..., -1.246979..., and 0.445041... With 1.801937... as the initial seed and using (x^2 - 2), we obtain the 3-period trajectory of 8.801937... -> 1.246979... -> -0.445041... (returning to -1.801937...). We note that A003558(2) = 3. The corresponding matrix M is: [0,1,0; 1,0,1; 0,1,1,]. Using seed M with (x^2 - 2*I), we obtain the 3-period with the cycle completed at (-1)*M. - Gary W. Adamson, Feb 07 2012

Examples

			Triangle begins:
  1;
  1,  -1;
  1,  -1,  -1;
  1,  -1,  -2,   1;
  1,  -1,  -3,   2,   1;
  1,  -1,  -4,   3,   3,  -1;
  1,  -1,  -5,   4,   6,  -3,  -1;
  1,  -1,  -6,   5,  10,  -6,  -4,   1;
  1,  -1,  -7,   6,  15, -10, -10,   4,   1;
  1,  -1,  -8,   7,  21, -15, -20,  10,   5,  -1;
  1,  -1,  -9,   8,  28, -21, -35,  20,  15,  -5,  -1;
  1,  -1, -10,   9,  36, -28, -56,  35,  35, -15,  -6,   1;
  ...
		

References

  • Friedrich L. Bauer, 'De Moivre und Lagrange: Cosinus eines rationalen Vielfachen von Pi', Informatik Spektrum 28 (Springer, 2005).
  • Jay Kappraff, S. Jablan, G. Adamson, & R. Sazdonovich: "Golden Fields, Generalized Fibonacci Sequences, & Chaotic Matrices"; FORMA, Vol 19, No 4, (2005).

Crossrefs

Cf. A049310, A039961, A124645 (matrix inverse).
Triangle sums (see the comments): A193884 (Kn11), A154955 (Kn21), A087960 (Kn22), A000007 (Kn3), A010892 (Fi1), A134668 (Fi2), A078031 (Ca2), A193669 (Gi1), A001519 (Gi3), A193885 (Ze1), A050935 (Ze3). - Johannes W. Meijer, Aug 08 2011
Cf. A003558.

Programs

  • Haskell
    a108299 n k = a108299_tabl !! n !! k
    a108299_row n = a108299_tabl !! n
    a108299_tabl = [1] : iterate (\row ->
       zipWith (+) (zipWith (*) ([0] ++ row) a033999_list)
                   (zipWith (*) (row ++ [0]) a059841_list)) [1,-1]
    -- Reinhard Zumkeller, May 06 2012
  • Maple
    A108299 := proc(n,k): binomial(n-floor((k+1)/2), floor(k/2))*(-1)^floor((k+1)/2) end: seq(seq(A108299 (n,k), k=0..n), n=0..11); # Johannes W. Meijer, Aug 08 2011
  • Mathematica
    t[n_, k_?EvenQ] := I^k*Binomial[n-k/2, k/2]; t[n_, k_?OddQ] := -I^(k-1)*Binomial[n+(1-k)/2-1, (k-1)/2]; Table[t[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 16 2013 *)
  • PARI
    {T(n,k)=polcoeff(polcoeff((1-x*y)/(1-x+x^2*y^2+x^2*O(x^n)),n,x)+y*O(y^k),k,y)} (Hanna)
    

Formula

T(n,k) = binomial(n-floor((k+1)/2),floor(k/2))*(-1)^floor((k+1)/2).
T(n+1, k) = if sign(T(n, k-1))=sign(T(n, k)) then T(n, k-1)+T(n, k) else -T(n, k-1) for 0 < k < n, T(n, 0) = 1, T(n, n) = (-1)^floor((n+1)/2).
G.f.: A(x, y) = (1 - x*y)/(1 - x + x^2*y^2). - Paul D. Hanna, Jun 12 2005
The generating polynomial (in z) of row n >= 0 is (u^(2*n+1) + v^(2*n+1))/(u + v), where u and v are defined by u^2 + v^2 = 1 and u*v = z. - Emeric Deutsch, Jun 16 2011
From Johannes W. Meijer, Aug 08 2011: (Start)
abs(T(n,k)) = A065941(n,k) = abs(A187660(n,n-k));
T(n,n-k) = A130777(n,k); abs(T(n,n-k)) = A046854(n,k) = abs(A066170(n,k)). (End)

Extensions

Corrected and edited by Philippe Deléham, Oct 20 2008
Showing 1-10 of 60 results. Next