login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A377228
Repdigits which are also Harshad numbers.
0
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,2
EXAMPLE
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
MATHEMATICA
Select[Union[FromDigits/@Flatten[Table[PadRight[{}, i, n], {n, 9}, {i, 27}], 1]], Divisible[#, DigitSum[#]]&] (* James C. McMahon, Jan 07 2025 *)
PROG
(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
CROSSREFS
Intersection of A005349 and A010785.
Cf. A014950.
Sequence in context: A283868 A087995 A082232 * A117228 A032567 A134853
KEYWORD
nonn,base
AUTHOR
John Bibby, Oct 20 2024
EXTENSIONS
More terms from David A. Corneth, Oct 20 2024
STATUS
approved