The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.



(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A000012 The simplest sequence of positive numbers: the all 1's sequence.
(Formerly M0003)

%I M0003

%S 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,

%T 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,

%U 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1

%N The simplest sequence of positive numbers: the all 1's sequence.

%C Number of ways of writing n as a product of primes.

%C Number of ways of writing n as a sum of distinct powers of 2.

%C Continued fraction for golden ratio A001622.

%C Partial sums of A000007 (characteristic function of 0). - _Jeremy Gardiner_, Sep 08 2002

%C An example of an infinite sequence of positive integers whose distinct pairwise concatenations are all primes! - _Don Reble_, Apr 17 2005

%C Binomial transform of A000007; inverse binomial transform of A000079. - _Philippe Deléham_, Jul 07 2005

%C A063524(a(n)) = 1. - _Reinhard Zumkeller_, Oct 11 2008

%C For n >= 0, let M(n) be the matrix with first row = (n n+1) and 2nd row = (n+1 n+2). Then a(n) = absolute value of det(M(n)). - _K.V.Iyer_, Apr 11 2009

%C The partial sums give the natural numbers (A000027). - _Daniel Forgues_, May 08 2009

%C From _Enrique Pérez Herrero_, Sep 04 2009: (Start)

%C a(n) is also tau_1(n) where tau_2(n) is A000005.

%C a(n) is a completely multiplicative arithmetical function.

%C a(n) is both squarefree and a perfect square. See A005117 and A000290. (End)

%C Also smallest divisor of n. - _Juri-Stepan Gerasimov_, Sep 07 2009

%C Also decimal expansion of 1/9. - _Enrique Pérez Herrero_, Sep 18 2009; corrected by _Klaus Brockhaus_, Apr 02 2010

%C a(n) is also the number of complete graphs on n nodes. - Pablo Chavez (pchavez(AT)cmu.edu), Sep 15 2009

%C Totally multiplicative sequence with a(p) = 1 for prime p. Totally multiplicative sequence with a(p) = a(p-1) for prime p. - _Jaroslav Krizek_, Oct 18 2009

%C n-th prime minus phi(prime(n)); number of divisors of n-th prime minus number of perfect partitions of n-th prime; the number of perfect partitions of n-th prime number; the number of perfect partitions of n-th noncomposite number. - _Juri-Stepan Gerasimov_, Oct 26 2009

%C For all n>0, the sequence of limit values for a(n) = n!*Sum_{k>=n} k/(k+1)!. Also, a(n) = n^0. - _Harlan J. Brothers_, Nov 01 2009

%C a(n) is also the number of 0-regular graphs on n vertices. - _Jason Kimberley_, Nov 07 2009

%C Differences between consecutive n. - _Juri-Stepan Gerasimov_, Dec 05 2009

%C From _Matthew Vandermast_, Oct 31 2010: (Start)

%C 1) When sequence is read as a regular triangular array, T(n,k) is the coefficient of the k-th power in the expansion of (x^(n+1)-1)/(x-1).

%C 2) Sequence can also be read as a uninomial array with rows of length 1, analogous to arrays of binomial, trinomial, etc., coefficients. In a q-nomial array, T(n,k) is the coefficient of the k-th power in the expansion of ((x^q -1)/(x-1))^n, and row n has a sum of q^n and a length of (q-1)*n + 1. (End)

%C The number of maximal self-avoiding walks from the NW to SW corners of a 2 X n grid.

%C When considered as a rectangular array, A000012 is a member of the chain of accumulation arrays that includes the multiplication table A003991 of the positive integers. The chain is ... < A185906 < A000007 < A000012 < A003991 < A098358 < A185904 < A185905 < ... (See A144112 for the definition of accumulation array.) - _Clark Kimberling_, Feb 06 2011

%C a(n) = A007310(n+1) (Modd 3) := A193680(A007310(n+1)), n>=0. For general Modd n (not to be confused with mod n) see a comment on A203571. The nonnegative members of the three residue classes Modd 3, called [0], [1], and [2], are shown in the array A088520, if there the third row is taken as class [0] after inclusion of 0. - _Wolfdieter Lang_, Feb 09 2012

%C Let M = Pascal's triangle without 1's (A014410) and V = a variant of the Bernoulli numbers A027641 but starting [1/2, 1/6, 0, -1/30, ...]. Then M*V = [1, 1, 1, 1, ...]. - _Gary W. Adamson_, Mar 05 2012

%C As a lower triangular array, T is an example of the fundamental generalized factorial matrices of A133314. Multiplying each n-th diagonal by t^n gives M(t) = I/(I-t*S) = I + t*S + (t*S)^2 + ... where S is the shift operator A129184, and T = M(1). The inverse of M(t) is obtained by multiplying the first sub-diagonal of T by -t and the other sub-diagonals by zero, so A167374 is the inverse of T. Multiplying by t^n/n! gives exp(t*S) with inverse exp(-t*S). - _Tom Copeland_, Nov 10 2012

%C The original definition of the meter was one ten-millionth of the distance from the Earth's equator to the North Pole. According to that historical definition, the length of one degree of latitude, that is 60 nautical miles, would be exactly 111111.111... meters. - _Jean-François Alcover_, Jun 02 2013

%C Deficiency of 2^n. - _Omar E. Pol_, Jan 30 2014

%C Consider n >= 1 nonintersecting spheres each with surface area S. Define point p on sphere S_i to be a "public point" if and only if there exists a point q on sphere S_j, j != i, such that line segment pq INTERSECT S_i = {p} and pq INTERSECT S_j = {q}; otherwise, p is a "private point". The total surface area composed of exactly all private points on all n spheres is a(n)*S = S. ("The Private Planets Problem" in Zeitz.) - _Rick L. Shepherd_, May 29 2014

%C For n>0, digital roots of centered 9-gonal numbers (A060544). - _Colin Barker_, Jan 30 2015

%C Product of nonzero digits in base 2 representation of n. - _Franklin T. Adams-Watters_, May 16 2016

%C Alternating row sums of triangle A104684. - _Wolfdieter Lang_, Sep 11 2016

%C A fixed point of the run length transform. - _Chai Wah Wu_, Oct 21 2016

%C Length of period of continued fraction for sqrt(A002522) or sqrt(A002496). - _A.H.M. Smeets_, Oct 10 2017

%C a(n) is also the determinant of the (n+1) X (n+1) matrix M defined by M(i,j) = binomial(i,j) for 0 <= i,j <= n, since M is a lower triangular matrix with main diagonal all 1's. - _Jianing Song_, Jul 17 2018

%C a(n) is also the determinant of the symmetric n X n matrix M defined by M(i,j) = min(i,j) for 1 <= i,j <= n (see Xavier Merlin reference). - _Bernard Schott_, Dec 05 2018

%C a(n) is also the determinant of the symmetric n X n matrix M defined by M(i,j) = tau(gcd(i,j)) for 1 <= i,j <= n (see De Koninck & Mercier reference). - _Bernard Schott_, Dec 08 2020

%D J.-M. De Koninck & A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 692 pp. 90 and 297, Ellipses, Paris, 2004.

%D L. B. W. Jolley, Summation of Series, Second Revised Edition, Dover (1961).

%D Xavier Merlin, Méthodix Algèbre, Exercice 1-a), page 153, Ellipses, Paris, 1995.

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%D S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

%D Paul Zeitz, The Art and Craft of Mathematical Problem Solving, The Great Courses, The Teaching Company, 2010 (DVDs and Course Guidebook, Lecture 6: "Pictures, Recasting, and Points of View", pp. 32-34).

%H Charles R Greathouse IV, <a href="/A000012/b000012.txt">Table of n, a(n) for n = 0..10000</a> [Useful when plotting one sequence against another. See Swayne link.]

%H Jeremiah Bartz, Bruce Dearden, and Joel Iiams, <a href="https://arxiv.org/abs/1810.07895">Classes of Gap Balancing Numbers</a>, arXiv:1810.07895 [math.NT], 2018.

%H Harlan Brothers, <a href="http://functions.wolfram.com/GammaBetaErf/Factorial/23/01/0002/">Factorial: Summation (formula</a>, The Wolfram Functions Site - _Harlan J. Brothers_, Nov 01 2009

%H Daniele A. Gewurz and Francesca Merola, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL6/Gewurz/gewurz5.html">Sequences realized as Parker vectors of oligomorphic permutation groups</a>, J. Integer Seqs., Vol. 6, 2003.

%H A. M. Hinz, S. Klavžar, U. Milutinović, and C. Petr, <a href="http://dx.doi.org/10.1007/978-3-0348-0237-6">The Tower of Hanoi - Myths and Maths</a>, Birkhäuser 2013. See page 172. <a href="http://tohbook.info">Book's website</a>

%H Jerry Metzger and Thomas Richards, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Metzger/metz1.html">A Prisoner Problem Variation</a>, Journal of Integer Sequences, Vol. 18 (2015), Article 15.2.7.

%H László Németh, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL21/Nemeth/nemeth6.html">The trinomial transform triangle</a>, J. Int. Seqs., Vol. 21 (2018), Article 18.7.3. Also <a href="https://arxiv.org/abs/1807.07109">arXiv:1807.07109</a> [math.NT], 2018.

%H Robert Price, <a href="/A000012/a000012_1.txt">Comments on A000012 concerning Elementary Cellular Automata</a>, Jan 31 2016

%H N. J. A. Sloane, <a href="/A000012/a000012.html">Illustration of initial terms</a>

%H Michael Z. Spivey and Laura L. Steil, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL9/Spivey/spivey7.html">The k-Binomial Transforms and the Hankel Transform</a>, Journal of Integer Sequences, Vol. 9 (2006), Article 06.1.1.

%H D. F. Swayne, <a href="/plot2.html">Plot pairs of sequences in the OEIS</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/GoldenRatio.html">Golden Ratio</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/ChromaticNumber.html">Chromatic Number</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/GraphCycle.html">Graph Cycle</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/ElementaryCellularAutomaton.html">Elementary Cellular Automaton</a>

%H S. Wolfram, <a href="http://wolframscience.com/">A New Kind of Science</a>

%H G. Xiao, <a href="http://wims.unice.fr/~wims/en_tool~number~contfrac.en.html">Contfrac</a>

%H <a href="/index/Cor#core">Index entries for "core" sequences</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%H <a href="/index/Con#confC">Index entries for continued fractions for constants</a>

%H <a href="/index/Di#divseq">Index to divisibility sequences</a>

%H <a href="/index/Par#partN">Index entries for related partition-counting sequences</a>

%H <a href="/index/Rec#order_01">Index entries for linear recurrences with constant coefficients</a>, signature (1).

%H <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a>

%F a(n) = 1.

%F G.f.: 1/(1-x).

%F E.g.f.: exp(x).

%F G.f.: Product_{k>=0} (1 + x^(2^k)). - _Zak Seidov_, Apr 06 2007

%F Completely multiplicative with a(p^e) = 1.

%F Regarded as a square array by antidiagonals, g.f. 1/((1-x)(1-y)), e.g.f. Sum T(n,m) x^n/n! y^m/m! = e^{x+y}, e.g.f. Sum T(n,m) x^n y^m/m! = e^y/(1-x). Regarded as a triangular array, g.f. 1/((1-x)(1-xy)), e.g.f. Sum T(n,m) x^n y^m/m! = e^{xy}/(1-x). - _Franklin T. Adams-Watters_, Feb 06 2006

%F Dirichlet g.f.: zeta(s). - _Ilya Gutkovskiy_, Aug 31 2016

%F a(n) = Sum_{l=1..n} (-1)^(l+1)*2*cos(Pi*l/(2*n+1)) = 1 identically in n >= 1 (for n=0 one has 0 from the undefined sum). From the Jolley reference, (429) p. 80. Interpretation: consider the n segments between x=0 and the n positive zeros of the Chebyshev polynomials S(2*n, x) (see A049310). Then the sum of the lengths of every other segment starting with the one ending in the largest zero (going from the right to the left) is 1. - _Wolfdieter Lang_, Sep 01 2016

%F As a lower triangular matrix, T = M*T^(-1)*M = M*A167374*M, where M(n,k) = (-1)^n A130595(n,k). Note that M = M^(-1). Cf. A118800 and A097805. - _Tom Copeland_, Nov 15 2016

%e 1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + ...)))) = A001622.

%e 1/9 = 0.11111111111111...

%e From _Wolfdieter Lang_, Feb 09 2012: (Start)

%e Modd 7 for nonnegative odd numbers not divisible by 3:

%e A007310: 1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, ...

%e Modd 3: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...

%e (End)

%p seq(1, i=0..150);

%t Array[1 &, 50] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Dec 26 2006 *)

%o (MAGMA) [1 : n in [0..100]];

%o (PARI) {a(n) = 1};

%o (Haskell)

%o a000012 = const 1

%o a000012_list = repeat 1 -- _Reinhard Zumkeller_, May 07 2012

%o (Maxima) makelist(1, n, 1, 30); /* _Martin Ettl_, Nov 07 2012 */

%Y Cf. A000004, A007395, A010701, A000027, A027641, A014410, A211216, A212393, A060544, A051801, A104684.

%Y For other q-nomial arrays, see A007318, A027907, A008287, A035343, A063260, A063265, A171890. - _Matthew Vandermast_, Oct 31 2010

%Y Cf. A097805, A118800, A130595, A167374, A008284 (multisets).

%K nonn,core,easy,mult,cofr,cons,tabl

%O 0,1

%A _N. J. A. Sloane_, May 16 1994

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 01:20 EDT 2021. Contains 343117 sequences. (Running on oeis4.)