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.
%I A158799 #66 Mar 10 2025 11:02:45 %S A158799 1,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, %T A158799 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, %U A158799 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 %N A158799 a(0)=1, a(1)=2, a(n)=3 for n >= 2. %C A158799 a(n) = number of neighboring natural numbers of n (i.e., n, n - 1, n + 1). a(n) = number of natural numbers m such that n - 1 <= m <= n + 1. Generalization: If a(n,k) = number of natural numbers m such that n - k <= m <= n + k (k >= 1) then a(n,k) = a(n-1,k) + 1 = n + k for 0 <= n <= k, a(n,k) = a(n-1,k) = 2*k + 1 for n >= k + 1. - _Jaroslav Krizek_, Nov 18 2009 %C A158799 Partial sums of A130716; partial sums give A008486. - _Jaroslav Krizek_, Dec 06 2009 %C A158799 In atomic spectroscopy, a(n) is the number of P term symbols with spin multiplicity equal to n+1, i.e., there is one singlet-P term (n=0), there are two doublet-P terms (n=1), and there are three P terms for triple multiplicity (n=2) and higher (n>2). - _A. Timothy Royappa_, Mar 16 2012 %C A158799 a(n+1) is also the domination number of the n-Andrásfai graph. - _Eric W. Weisstein_, Apr 09 2016 %C A158799 Decimal expansion of 37/300. - _Elmo R. Oliveira_, May 11 2024 %C A158799 a(n+1) is also the domination number of the n X n rook complement graph. - _Eric W. Weisstein_, Mar 10 2025 %H A158799 David Applegate, <a href="/A139250/a139250.anim.html">The movie version</a> %H A158799 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/AndrasfaiGraph.html">Andrásfai Graph</a>. %H A158799 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DominationNumber.html">Domination Number</a>. %H A158799 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RookComplementGraph.html">Rook Complement Graph</a>. %H A158799 <a href="/index/Rec#order_01">Index entries for linear recurrences with constant coefficients</a>, signature (1). %F A158799 G.f.: (1+x+x^2)/(1-x) = (1-x^3)/(1-x)^2. %F A158799 a(n) = (n>=0)+(n>=1)+(n>=2). %F A158799 a(n) = 1 + n for 0 <= n <= 1, a(n) = 3 for n >= 2. a(n) = A157532(n) for n >= 1. - _Jaroslav Krizek_, Nov 18 2009 %F A158799 E.g.f.: 3*exp(x) - x - 2 = x^2/(2*G(0)) where G(k) = 1 + (k+2)/(x - x*(k+1)/(x + k + 1 - x^4/(x^3 + (k+1)*(k+2)*(k+3)/G(k+1)))); (continued fraction). - _Sergei N. Gladkovskii_, Jul 06 2012 %F A158799 a(n) = min(n+1,3). - _Wesley Ivan Hurt_, Apr 16 2014 %F A158799 a(n) = 1 + A130130(n). - _Elmo R. Oliveira_, May 11 2024 %t A158799 PadRight[{1,2},120,{3}] (* or *) Min[#,3]&/@Range[120] (* _Harvey P. Dale_, Apr 08 2018 *) %o A158799 (PARI) a(n)=if(n>1,3,if(n<0,0,n++)) %Y A158799 Cf. A040000, A122553, A130130, A139250, A157532, A158411, A158478, A158515. %Y A158799 Cf. A008486, A130716. %K A158799 nonn,easy %O A158799 0,2 %A A158799 _Jaume Oliver Lafont_, Mar 27 2009 %E A158799 Corrected by _Jaroslav Krizek_, Dec 17 2009