OFFSET
1,2
COMMENTS
Also called "Fiven" numbers [Dahlenberg and Edgar]. - N. J. A. Sloane, Jun 25 2018
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
Paul Dahlenberg and Tom Edgar, Consecutive factorial base Niven numbers, The Fibonacci Quarterly, Vol. 56, No. 2 (2018), pp. 163-166.
EXAMPLE
a(8) = 16 because it is written 220 in factorial base and 2 + 2 + 0 = 4, which is a divisor of 16.
17 is not on the list because it is written 221 in factorial base and 2 + 2 + 1 = 5, which is not a divisor of 17.
MATHEMATICA
(*For the definition of the factorial base version of IntegerDigits, see A007623*) Select[Range[250], IntegerQ[ #/(Plus@@factBaseIntDs[ # ])]&]
PROG
(Scheme, with Antti Karttunen's IntSeq-library) (define A118363 (ZERO-POS 1 1 A286604)) ;; Antti Karttunen, Jun 18 2017
(Python)
def a007623(n, p=2): return n if n<p else a007623(n//p, p+1)*10 + n%p
def ok(n): return n%sum(map(int, list(str(a007623(n)))))==0
print([n for n in range(1, 251) if ok(n)]) # Indranil Ghosh, Jun 21 2017
(PARI) is(n) = {my(k = n, m = 2, r, s = 0); while([k, r] = divrem(k, m); k != 0 || r != 0, s += r; m++); !(n % s); } \\ Amiram Eldar, Oct 08 2024
CROSSREFS
Positions of zeros in A286604.
KEYWORD
base,easy,nonn
AUTHOR
Alonso del Arte, May 15 2006
STATUS
approved