OFFSET
1,1
COMMENTS
a(n) = number of neighboring natural numbers of n (e.g., n, n-1, n+1).
a(n) = A158799(n) for n >= 1. - Jaroslav Krizek, Nov 18 2009
Also decimal expansion of 7/3. - Natan Arie Consigli, May 02 2015
Decimal expansion of Sum_{i>=0} (4/7)^i. - Bruno Berselli, Aug 23 2017
LINKS
FORMULA
a(n) = 1[0]1[1]1...1[n-1]1[n]1, where [0] is zeration or successor (y[0]x = x+1), [1] addition, [2] multiplication, [3] exponentiation, [4] repeated exponentiation, etc. - Natan Arie Consigli, May 02 2015
G.f.: x*(2+x)/(1-x). - Robert Israel, May 07 2015
EXAMPLE
a(4) = 1[0]1[1]1[2]1[3]1[4]1 = '1+1*1^1^^1 = 3. - Natan Arie Consigli, May 02 2015
MATHEMATICA
{2}~Join~Table[3, {120}] (* Michael De Vlieger, May 05 2015 *)
PadRight[{2}, 120, 3] (* Harvey P. Dale, Aug 12 2021 *)
PROG
(PARI) A157532(n)=2+(n>1) \\ M. F. Hasler, Jul 30 2015
CROSSREFS
KEYWORD
AUTHOR
Jaroslav Krizek, Mar 02 2009
EXTENSIONS
More threes from R. J. Mathar, Mar 14 2009; truncated to three lines by M. F. Hasler, Jul 30 2015
STATUS
approved