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.

A000007 The characteristic function of {0}: a(n) = 0^n.

This page as a plain text file.
%I A000007 M0002 #307 May 13 2025 10:20:52
%S A000007 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
%T A000007 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
%U A000007 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
%N A000007 The characteristic function of {0}: a(n) = 0^n.
%C A000007 Changing the offset to 1 gives the arithmetical function a(1) = 1, a(n) = 0 for n > 1, the identity function for Dirichlet multiplication (see Apostol). - _N. J. A. Sloane_
%C A000007 Changing the offset to 1 makes this the decimal expansion of 1. - _N. J. A. Sloane_, Nov 13 2014
%C A000007 Hankel transform (see A001906 for definition) of A000007 (powers of 0), A000012 (powers of 1), A000079 (powers of 2), A000244 (powers of 3), A000302 (powers of 4), A000351 (powers of 5), A000400 (powers of 6), A000420 (powers of 7), A001018 (powers of 8), A001019 (powers of 9), A011557 (powers of 10), A001020 (powers of 11), etc. - _Philippe Deléham_, Jul 07 2005
%C A000007 This is the identity sequence with respect to convolution. - _David W. Wilson_, Oct 30 2006
%C A000007 a(A000004(n)) = 1; a(A000027(n)) = 0. - _Reinhard Zumkeller_, Oct 12 2008
%C A000007 The alternating sum of the n-th row of Pascal's triangle gives the characteristic function of 0, a(n) = 0^n. - _Daniel Forgues_, May 25 2010
%C A000007 The number of maximal self-avoiding walks from the NW to SW corners of a 1 X n grid. - _Sean A. Irvine_, Nov 19 2010
%C A000007 Historically there has been some disagreement as to whether 0^0 = 1. Graphing x^0 seems to support that conclusion, but graphing 0^x instead suggests that 0^0 = 0. Euler and Knuth have argued in favor of 0^0 = 1. For some calculators, 0^0 triggers an error, while in Mathematica, 0^0 is Indeterminate. - _Alonso del Arte_, Nov 15 2011
%C A000007 Another consequence of changing the offset to 1 is that then this sequence can be described as the sum of Moebius mu(d) for the divisors d of n. - _Alonso del Arte_, Nov 28 2011
%C A000007 With the convention 0^0 = 1, 0^n = 0 for n > 0, the sequence a(n) = 0^|n-k|, which equals 1 when n = k and is 0 for n >= 0, has g.f. x^k. A000007 is the case k = 0. - _George F. Johnson_, Mar 08 2013
%C A000007 A fixed point of the run length transform. - _Chai Wah Wu_, Oct 21 2016
%D A000007 T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 30.
%D A000007 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%D A000007 S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.
%H A000007 David Wasserman, <a href="/A000007/b000007.txt">Table of n, a(n) for n = 0..1000</a>
%H A000007 Paul Barry, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL8/Barry/barry84.html">A Catalan Transform and Related Transformations on Integer Sequences</a>, Journal of Integer Sequences, Vol. 8 (2005), Article 05.4.5.
%H A000007 Paul Barry, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL16/Barry2/barry231.html">A Note on a Family of Generalized Pascal Matrices Defined by Riordan Arrays</a>, Journal of Integer Sequences, 16 (2013), #13.5.4.
%H A000007 Dr. Math, <a href="http://mathforum.org/dr.math/faq/faq.0.to.0.power.html">0^0 (zero to the zero power)</a>
%H A000007 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 A000007 Donald E. Knuth, <a href="http://arxiv.org/abs/math/9205211">Two notes on notation</a>, arXiv:math/9205211 [math.HO], 1992. See page 6 on 0^0.
%H A000007 Robert Price, <a href="/A000007/a000007.txt">Comments on A000007</a>, Jan 27 2016
%H A000007 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/ElementaryCellularAutomaton.html">Elementary Cellular Automaton</a>
%H A000007 S. Wolfram, <a href="http://wolframscience.com/">A New Kind of Science</a>
%H A000007 <a href="/index/Cor#core">Index entries for "core" sequences</a>
%H A000007 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%H A000007 <a href="/index/Ce#cell">Index entries for sequences related to cellular automata</a>
%H A000007 <a href="https://oeis.org/wiki/Index_to_Elementary_Cellular_Automata">Index to Elementary Cellular Automata</a>
%H A000007 <a href="/index/Rec#order_01">Index entries for linear recurrences with constant coefficients</a>, signature (1).
%F A000007 Multiplicative with a(p^e) = 0. - _David W. Wilson_, Sep 01 2001
%F A000007 a(n) = floor(1/(n + 1)). - _Franz Vrabec_, Aug 24 2005
%F A000007 As a function of Bernoulli numbers (cf. A027641: (1, -1/2, 1/6, 0, -1/30, ...)), triangle A074909 (the beheaded Pascal's triangle) * B_n as a vector = [1, 0, 0, 0, 0, ...]. - _Gary W. Adamson_, Mar 05 2012
%F A000007 a(n) = Sum_{k = 0..n} exp(2*Pi*i*k/(n+1)) is the sum of the (n+1)th roots of unity. - _Franz Vrabec_, Nov 09 2012
%F A000007 a(n) = (1-(-1)^(2^n))/2. - _Luce ETIENNE_, May 05 2015
%F A000007 a(n) = 1 - A057427(n). - _Alois P. Heinz_, Jan 20 2016
%F A000007 From _Ilya Gutkovskiy_, Sep 02 2016: (Start)
%F A000007 Binomial transform of A033999.
%F A000007 Inverse binomial transform of A000012. (End)
%p A000007 A000007 := proc(n) if n = 0 then 1 else 0 fi end: seq(A000007(n), n=0..20);
%p A000007 spec := [A, {A=Z} ]: seq(combstruct[count](spec, size=n+1), n=0..20);
%t A000007 Table[If[n == 0, 1, 0], {n, 0, 99}]
%t A000007 Table[Boole[n == 0], {n, 0, 99}] (* _Michael Somos_, Aug 25 2012 *)
%t A000007 Join[{1},LinearRecurrence[{1},{0},102]] (* _Ray Chandler_, Jul 30 2015 *)
%t A000007 PadRight[{1},120,0] (* _Harvey P. Dale_, Jul 18 2024 *)
%o A000007 (PARI) {a(n) = !n};
%o A000007 (Magma) [1] cat [0:n in [1..100]]; // Sergei Haller, Dec 21 2006
%o A000007 (Haskell)
%o A000007 a000007 = (0 ^)
%o A000007 a000007_list = 1 : repeat 0
%o A000007 -- _Reinhard Zumkeller_, May 07 2012, Mar 27 2012
%o A000007 (Python)
%o A000007 def A000007(n): return int(n==0) # _Chai Wah Wu_, Feb 04 2022
%Y A000007 Characteristic function of {g}: this sequence (g = 0), A063524 (g = 1), A185012 (g = 2), A185013 (g = 3), A185014 (g = 4), A185015 (g = 5), A185016 (g = 6), A185017 (g = 7). - _Jason Kimberley_, Oct 14 2011
%Y A000007 Characteristic function of multiples of g: this sequence (g = 0), A000012 (g = 1), A059841 (g = 2), A079978 (g = 3), A121262 (g = 4), A079998 (g = 5), A079979 (g = 6), A082784 (g = 7). - _Jason Kimberley_, Oct 14 2011
%Y A000007 Cf. A074909, A027641, A057427.
%K A000007 core,nonn,mult,cons,easy
%O A000007 0,1
%A A000007 _N. J. A. Sloane_