A058903 Inconsummate numbers in base 7: no number is this multiple of the sum of its digits (in base 7).
30, 86, 102, 134, 138, 141, 158, 162, 167, 170, 183, 186, 194, 210, 213, 233, 284, 290, 306, 312, 314, 326, 330, 338, 354, 362, 366, 368, 428, 452, 480, 530, 534, 536, 540, 542, 554, 564, 578, 591, 602, 645, 648, 656, 705, 708, 714, 740, 746
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..10214
Programs
-
Maple
For Maple code see A058906.
-
Mathematica
base=7; Do[k=n; While[Apply[Plus, IntegerDigits[k, base]] n!=k&&k<250n, k+=n]; If[k==250 n, Print[n]], {n, 1, 10^3}] (* Vincenzo Librandi, Jan 30 2017 *)
-
Python
from itertools import count, islice, combinations_with_replacement from sympy.ntheory import digits def A058903_gen(startvalue=1): # generator of terms >= startvalue for n in count(max(startvalue,1)): for l in count(1): if 6*l*n < 7**(l-1): yield n break for d in combinations_with_replacement(range(7),l): if (s:=sum(d)) > 0 and sorted(digits(s*n,7)[1:]) == list(d): break else: continue break A058903_list = list(islice(A058903_gen(),20)) # Chai Wah Wu, May 10 2023