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-1 of 1 results.

A256577 Sum_{k>=0} (d_k)^(k+1)*10^k, where Sum_{k>=0} (d_k)*10^k is the decimal expansion of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 490
Offset: 0

Views

Author

Michael De Vlieger, Apr 02 2015

Keywords

Comments

a(n) = n when 0 <= n < 20 or 10^i <= n < 10^i + 20 for some i>1.
a(n) = n if and only if every digit of n (in base 10), except possibly the ones digit, is 0 or 1. Otherwise, n < a(n). - Danny Rorabaugh, Apr 02 2015

Examples

			a(19) = 1^2 * 10^1 + 9^1 * 10^0 = 19.
a(20) = 2^2 * 10^1 + 0^1 * 10^0 = 40.
a(40) = 4^2 * 10^1 + 0^1 * 10^0 = 160.
a(199) = 1^3 * 10^2 + 9^2 * 10^1 + 9^1 * 10^0 = 100 + 810 + 9 = 919.
		

Crossrefs

Cf. A066566 (first 39 terms identical).
Cf. A255073 (primes that remain prime, no carry).

Programs

  • Mathematica
    Array[Total@ MapIndexed[#1^(#2)*10^(#2 - 1) & @@ {#1, First[#2]} &, Reverse@ IntegerDigits[#]] &, 71, 0] (* Michael De Vlieger, Nov 16 2022 *)
  • PARI
    vector(80, n, d = digits(n); sum(k=1, #d, d[k]^(#d-k+1)*10^(#d-k))) \\ Michel Marcus, Apr 09 2015

Extensions

Name and comments corrected by Paul Tek, Apr 11 2015
Showing 1-1 of 1 results.