OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10214
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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Jan 09 2001
STATUS
approved