A058907 Inconsummate numbers in base 12: no number is this multiple of the sum of its digits (in base 12).
86, 87, 88, 90, 99, 101, 102, 112, 113, 114, 125, 126, 138, 229, 235, 244, 245, 246, 256, 258, 269, 270, 282, 307, 373, 379, 385, 391, 392, 400, 402, 426, 451, 464, 530, 535, 536, 542, 543, 547, 548, 607, 608, 620, 667, 673, 674, 679, 680, 685
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..10100
Crossrefs
Programs
-
Maple
For Maple code see A058906.
-
Mathematica
base=12; 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, Sep 23 2017; after N. J. A. Sloane in A058906 *)
-
Python
from itertools import count, islice, combinations_with_replacement from sympy.ntheory import digits def A058907_gen(startvalue=1): # generator of terms >= startvalue for n in count(max(startvalue,1)): for l in count(1): if 11*l*n < 12**(l-1): yield n break for d in combinations_with_replacement(range(12),l): if (s:=sum(d)) > 0 and sorted(digits(s*n,12)[1:]) == list(d): break else: continue break A058907_list = list(islice(A058907_gen(),20)) # Chai Wah Wu, May 10 2023