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.

A045844 a(n+1) = a(n) + largest digit of a(n); a(0) = 1.

Original entry on oeis.org

1, 2, 4, 8, 16, 22, 24, 28, 36, 42, 46, 52, 57, 64, 70, 77, 84, 92, 101, 102, 104, 108, 116, 122, 124, 128, 136, 142, 146, 152, 157, 164, 170, 177, 184, 192, 201, 203, 206, 212, 214, 218, 226, 232, 235, 240, 244, 248, 256, 262, 268, 276, 283, 291, 300, 303, 306
Offset: 0

Views

Author

Keywords

Examples

			a(17) = 92; a(18) = 92 + 9 = 101; a(19) = 101 + 1 = 102; a(20) = 102 + 2 = 104
		

Crossrefs

Partial sums of A132137.

Programs

  • Haskell
    a045844 n = a045844_list !! n
    a045844_list = iterate a095815 1
    -- Reinhard Zumkeller, Aug 23 2011
    
  • Mathematica
    NestList[#+Max[IntegerDigits[#]]&,1,60] (* Harvey P. Dale, Oct 25 2011 *)
  • PARI
    print1(a=1);for(i=1,99,print1(","a+=vecmax(digits(a)))) \\ M. F. Hasler, Jan 14 2014

Formula

a(0) = 1; a(n) = a(n-1) + MaxDigit(a(n-1)) for n > 0 where MaxDigit(x) is the largest digit in decimal notation for an integer x.
a(n+1) = A095815(a(n)). [Reinhard Zumkeller, Aug 23 2011]