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.

A161351 a(n) = n + sum_of_digits(n) + product_of_digits(n).

Original entry on oeis.org

3, 6, 9, 12, 15, 18, 21, 24, 27, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 33, 38, 43, 48, 53, 58, 63, 68, 73, 78, 44, 50, 56, 62, 68, 74, 80, 86, 92, 98, 55, 62, 69, 76, 83, 90, 97, 104, 111, 118, 66, 74, 82, 90, 98, 106, 114, 122, 130
Offset: 1

Views

Author

Claudio Meller, Jun 07 2009

Keywords

Comments

a(10) = 10 + (1 + 0) + (1*0) = 11 ; a(19) = 19 + (9 + 1) + (9*1) = 38.

Crossrefs

Programs

  • Mathematica
    Table[n+Total[IntegerDigits[n]]+Times@@IntegerDigits[n],{n,70}] (* Harvey P. Dale, Jun 07 2020 *)
  • PARI
    a(n) = my(d=digits(n)); n + vecsum(d) + vecprod(d); \\ Michel Marcus, Nov 12 2022
    
  • Python
    from math import prod
    def a(n): d = list(map(int, str(n))); return n + sum(d) + prod(d)
    print([a(n) for n in range(1, 71)]) # Michael S. Branicky, Nov 20 2022

Formula

a(n) = n + A007953(n) + A007954(n). - Michel Marcus, Nov 12 2022
If n contains a digit 0 (A011540), then a(n) = A062028(n). - Bernard Schott, Nov 12 2022