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.

Showing 1-3 of 3 results.

A062028 a(n) = n + sum of the digits of n.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 77
Offset: 0

Views

Author

Amarnath Murthy, Jun 02 2001

Keywords

Comments

a(n) = A248110(n,A007953(n)). - Reinhard Zumkeller, Oct 01 2014

Examples

			a(34) = 34 + 3 + 4 = 41, a(40) = 40 + 4 = 44.
		

Crossrefs

Indices of: A047791 (primes), A107743 (composites), A066564 (squares), A084661 (cubes).
Iterations: A004207 (start=1), A016052 (start=3), A007618 (start=5), A006507 (start=7), A016096 (start=9).

Programs

  • Haskell
    a062028 n = a007953 n + n  -- Reinhard Zumkeller, Oct 11 2013
    
  • Maple
    with(numtheory): for n from 1 to 100 do a := convert(n,base,10):
    c := add(a[i],i=1..nops(a)): printf(`%d,`,n+c); od:
    A062028 := n -> n+add(i,i=convert(n,base,10)) # M. F. Hasler, Nov 08 2018
  • Mathematica
    Table[n + Total[IntegerDigits[n]], {n, 0, 100}]
  • PARI
    A062028(n)=n+sumdigits(n) \\ M. F. Hasler, Jul 19 2015
    
  • Python
    def a(n): return n + sum(map(int, str(n)))
    print([a(n) for n in range(71)]) # Michael S. Branicky, Jan 09 2023

Formula

a(n) = n + A007953(n).
a(n) = A160939(n+1) - 1. - Filip Zaludek, Oct 26 2016

Extensions

More terms from Vladeta Jovovic, Jun 05 2001

A229527 Start with 1, skip (sum of digits of n) numbers, accept next number.

Original entry on oeis.org

1, 3, 7, 15, 22, 27, 37, 48, 61, 69, 85, 99, 118, 129, 142, 150, 157, 171, 181, 192, 205, 213, 220, 225, 235, 246, 259, 276, 292, 306, 316, 327, 340, 348, 364, 378, 397, 417, 430, 438, 454, 468, 487, 507, 520, 528, 544, 558, 577, 597
Offset: 1

Views

Author

Dave Durgin, Sep 25 2013

Keywords

Examples

			a(1)=1, a(2)=1+1+1=3, a(3)=3+3+1=7, a(4)=7+7+1=15, a(5)=15+1+5+1=22, a(6)=22+2+2+1=27, ...
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = a[n - 1] + 1 + Plus @@ IntegerDigits@a[n - 1]; a[1] = 1; Array[a, 50] (* Robert G. Wilson v, Aug 01 2018 *)
  • Python
    from itertools import islice
    def A229527_gen(): # generator of terms
        a = 1
        while True:
            yield a
            a += sum(map(int,str(a)))+1
    A229527_list = list(islice(A229527_gen(),40)) # Chai Wah Wu, Aug 09 2025

Formula

a(n+1) = a(n) + (sum of digits of a(n)) + 1.

A160943 a(n) = n + digital sum(n-1) + digital sum(n+1).

Original entry on oeis.org

3, 6, 9, 12, 15, 18, 21, 24, 18, 21, 15, 18, 21, 24, 27, 30, 33, 36, 30, 33, 27, 30, 33, 36, 39, 42, 45, 48, 42, 45, 39, 42, 45, 48, 51, 54, 57, 60, 54, 57, 51, 54, 57, 60, 63, 66, 69, 72, 66, 69, 63, 66, 69, 72, 75, 78, 81, 84, 78, 81, 75, 78, 81, 84, 87, 90, 93, 96, 90, 93
Offset: 1

Views

Author

Claudio Meller, May 30 2009

Keywords

Examples

			a(8)  = 8 +ds(7) +ds(9)  = 7+8+9  = 24;
a(15) = 15+ds(14)+ds(16) = 15+5+7 = 27;
a(26) = 26+ds(25)+ds(27) = 26+7+9 = 42.
		

Crossrefs

Programs

  • Mathematica
    Table[n+Total[IntegerDigits[n-1]]+Total[IntegerDigits[n+1]],{n,70}] (* Harvey P. Dale, Jun 24 2011 *)
  • PARI
    a(n) = n + sumdigits(n-1) + sumdigits(n+1); \\ Michel Marcus, Mar 11 2021
  • Python
    def A160943(n): return n+sum(int(d) for d in str(n-1))+sum(int(d) for d in str(n+1)) # Chai Wah Wu, Mar 11 2021
    

Formula

a(n) = n + A007953(n-1) + A007953(n+1)
Showing 1-3 of 3 results.