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.

A344486 a(n) is the least k such that the sum of digits of k is a substring of n and the sum of digits of n is a substring of k.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 29, 39, 49, 59, 69, 79, 89, 99, 10, 2, 399, 499, 599, 699, 799, 899, 999, 101, 11, 3, 4999, 5999, 6999, 7999, 8999, 9999, 102, 111, 12, 4, 59999, 69999, 79999, 89999, 99999, 103, 112, 112, 13, 5, 699999, 799999, 899999, 999999
Offset: 0

Views

Author

Rémy Sigrist, May 21 2021

Keywords

Comments

The sequence is well defined:
- for any number n with sum of digits d,
- by necessity, d <= n,
- the number k obtained by concatenating n-d 1's in front of d meets the requirements.

Examples

			For n = 11:
- the sum of digits of 11 is 2,
- the sum of digits of a(n) must equal 1 or 11,
    - the numbers whose sum of digits is 1 are the powers of 10,
    - 2 cannot be a substring of a power of 10,
    - the first number with sum of digits 11 is 29,
    - 2 is a substring of 29,
- so a(11) = 29.
		

Crossrefs

Programs

  • Perl
    See Links section.

Formula

a(10 * n) = a(n).