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.

A334403 Harshad numbers with sum of digits equal to 18.

Original entry on oeis.org

198, 288, 378, 396, 468, 486, 558, 576, 594, 648, 666, 684, 738, 756, 774, 792, 828, 846, 864, 882, 918, 936, 954, 972, 990, 1098, 1188, 1278, 1296, 1368, 1386, 1458, 1476, 1494, 1548, 1566, 1584, 1638, 1656, 1674, 1692, 1728, 1746, 1764, 1782, 1818, 1836, 1854
Offset: 1

Views

Author

Davide Rotondo, Sep 08 2020

Keywords

Comments

Even numbers with sum of digits equal to 18 are Harshad numbers (A005349).
If k is a term, then so is 10*k. - Robert Israel, Mar 26 2023

Examples

			198/18 = 11.
		

Crossrefs

Intersection of A005349 and A235228.
Subsequence of A008600.
Cf. A002998.

Programs

  • Maple
    filter:= n -> convert(convert(n,base,10),`+`) = 18:
    select(filter, [seq(i,i=18...4000, 18)]); # Robert Israel, Mar 26 2023
  • Mathematica
    Select[18 * Range[100], Plus @@ IntegerDigits[#] == 18 &] (* Amiram Eldar, Sep 08 2020 *)
  • PARI
    isok(m) = my(s=sumdigits(m)); (s==18) && !(m%s); \\ Michel Marcus, Sep 08 2020
    
  • PARI
    first(n) = {my(res = vector(n), t = 0); forstep(i = 18, oo, 18, if(vecsum(digits(i)) == 18, t++; res[t] = i; if(t >= n, return(res) ) ) ) } \\ David A. Corneth, Sep 08 2020

Extensions

More terms from Michel Marcus, Sep 08 2020