%I #59 Nov 04 2023 13:29:03
%S 1,2,3,4,5,6,7,8,9,21,27,81,191,243,729,999,2187,2997,6561,8991,19683,
%T 26973,33321,36963,39049,59049,80919,100389,110889,118827,177147,
%U 177897,183951,242757,332667,356481,531441,551853,728271,998001,1069443,1367631,1594323,1655559,2184813
%N Numbers k that divide the smallest number whose sum of digits is k.
%C By definition, if k divides A051885(k), then k is a term of this sequence.
%C From _Ruediger Jehn_, Jun 17 2021: (Start)
%C None of the terms is divisible by 2*5*11*13.
%C If a term x has the form 3^m * y where m > 1 (which is the case for the overwhelming number of terms of this sequence), then all prime factors of y are terms of A066364.
%C If a term x has the form 3^m * p * q where m > 1, where p is a term of A066364 and where q is the product of all other factors of the prime factorization of x, then all numbers 3^m * p^i * q are also terms for any integer i. (End)
%H Kester Habermann, <a href="/A342810/b342810.txt">Table of n, a(n) for n = 1..792</a> (first 200 terms from Chai Wah Wu)
%H RĂ¼diger Jehn and Kester Habermann, <a href="https://arxiv.org/abs/2106.05866">Properties of terms of OEIS A342810</a>, arXiv:2106.05866 [math.GM], 2021.
%e 21 is a term because the smallest number with a digital sum of 21 is 399 (A051885(21) = 399) which is divisible by 21.
%o (PARI) MAX=10000; for (e = 0, MAX, for (d = 1, 9, k =(d+1)*10^e - 1; x = d+9*e; if (k%x==0, print1(x, ", ");)))
%o (Python)
%o A342810_list = [n for n in range(1,10**6) if n==1 or ((n % 9)+1)*pow(10,n//9,n) % n == 1] # _Chai Wah Wu_, Apr 04 2021
%Y Cf. A007953, A051885, A066364.
%K nonn,base
%O 1,2
%A _Ruediger Jehn_, Mar 22 2021
%E Name clarified by _Jon E. Schoenfield_, Apr 27 2021