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.

A332046 a(n) is the smallest positive integer such that there exist exactly n positive integers less than a(n) whose digital sum in base 10 is equal to the digital sum of a(n).

Original entry on oeis.org

10, 20, 30, 40, 50, 60, 70, 80, 90, 108, 117, 126, 135, 144, 153, 162, 171, 180, 207, 216, 225, 234, 243, 252, 261, 270, 280, 307, 316, 325, 334, 343, 352, 361, 370, 406, 415, 424, 433, 442, 451, 460, 470, 506, 515, 524, 533, 542, 551, 560, 605, 614, 623, 632, 641, 650, 660
Offset: 1

Views

Author

Arnauld Chevallier, Feb 06 2020

Keywords

Examples

			For n=10, 108 is the smallest positive integer for which there exists exactly 10 smaller integers whose digit sum in base 10 is the same as the digit sum of 108 (i.e., 1+0+8=9). These integers are 9, 18, 27, 36, 45, 54, 63, 72, 81, 90.
		

Crossrefs

Cf. A081926 (similar but different definition).

Programs

  • PARI
    isok(k, n) = {my(v=vector(k, j, sumdigits(j))); #select(x->(x==v[k]), v) == n+1;}
    a(n) = {my(k=1); while(! isok(k, n), k++); k;} \\ Michel Marcus, Feb 16 2020