login
A058903
Inconsummate numbers in base 7: no number is this multiple of the sum of its digits (in base 7).
2
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,1
LINKS
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Jan 09 2001
STATUS
approved