A377228 Repdigits which are also Harshad numbers.
1, 2, 3, 4, 5, 6, 7, 8, 9, 111, 222, 333, 444, 555, 666, 777, 888, 999, 111111111, 222222222, 333333333, 444444444, 555555555, 666666666, 777777777, 888888888, 999999999, 111111111111111111111111111, 222222222222222222222222222, 333333333333333333333333333, 444444444444444444444444444
Offset: 1
Examples
999 is in the sequence as it is a repdigit (all digits are equal (in base 10)) and 999 is divisible by its sum of digits; 9 + 9 + 9 = 27 is a divisors of 999. - _David A. Corneth_, Oct 20 2024
Programs
-
Mathematica
Select[Union[FromDigits/@Flatten[Table[PadRight[{}, i, n], {n, 9}, {i, 27}], 1]],Divisible[#,DigitSum[#]]&] (* James C. McMahon, Jan 07 2025 *)
-
PARI
repd(n) = 10^((n+8)\9)\9*((n-1)%9+1); \\ A010785 lista(nn) = select(x->(x%sumdigits(x)==0), vector(nn, k, repd(k))); \\ Michel Marcus, Jan 07 2025
Extensions
More terms from David A. Corneth, Oct 20 2024