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.

A300999 Add to a(n) the first digit of a(n+1) to get a(n+2), with a(1) = 1 and a(2) = 2.

Original entry on oeis.org

1, 2, 3, 5, 8, 13, 9, 22, 11, 23, 13, 24, 15, 25, 17, 26, 19, 27, 21, 29, 23, 31, 26, 33, 29, 35, 32, 38, 35, 41, 39, 44, 43, 48, 47, 52, 52, 57, 57, 62, 63, 68, 69, 74, 76, 81, 84, 89, 92, 98, 101, 99, 110, 100, 111, 101, 112, 102, 113, 103, 114, 104, 115, 105, 116, 106, 117, 107, 118, 108, 119
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Mar 20 2018

Keywords

Comments

The sequence, starting with a(1) = 1 and a(2) = 2, never enters into a loop.

Examples

			a(1) + first digit of a(2) =  1 + 2 = a(3) =  3,
a(2) + first digit of a(3) =  2 + 3 = a(4) =  5,
a(3) + first digit of a(4) =  3 + 5 = a(5) =  8,
a(4) + first digit of a(5) =  5 + 8 = a(6) = 13,
a(5) + first digit of a(6) =  8 + 1 = a(7) =  9,
a(6) + first digit of a(7) = 13 + 9 = a(8) = 22,
a(7) + first digit of a(8) =  9 + 2 = a(9) = 11,
etc.
		

Crossrefs

Cf. A267809.

Programs

  • Mathematica
    nxt[{a_,b_}]:={b,a+IntegerDigits[b][[1]]}; NestList[nxt,{1,2},80][[;;,1]] (* Harvey P. Dale, Nov 19 2023 *)
  • PARI
    a=vector(10^4); a[1]=1; a[2]=2; for(n=3, #a, a[n]=digits(a[n-1])[1]+a[n-2]); a \\ Altug Alkan, Mar 20 2018