OFFSET
1,2
COMMENTS
Next term after 5448 is greater than 10000.
a(34) > 10^6. - D. S. McNeil, Mar 03 2009
a(39) > 2.54 * 10^6, if it exists. - Kevin P. Thompson, Oct 20 2021
a(41) > 7*10^6, if it exists. - Kevin P. Thompson, Dec 08 2021
EXAMPLE
9 is a term because the sum of the digits of 2^9 * 9! = 185794560 is 45 which is divisible by 9.
MATHEMATICA
Do[If[Mod[Plus @@ IntegerDigits[2^n * n! ], n] == 0, Print[n]], {n, 1, 10000}]
Select[Range[6714000], Mod[Total[IntegerDigits[2^# #!]], #]==0&] (* Harvey P. Dale, Jul 11 2023 *)
PROG
(PARI) isok(k) = !(sumdigits(2^k * k!) % k); \\ Michel Marcus, Oct 20 2021
(Python)
from itertools import islice
def A108861(): # generator of terms
k, k2, kf = 1, 2, 1
while True:
c = sum(int(d) for d in str(k2*kf))
if not c % k: yield k
k += 1
k2 *= 2
kf *= k
CROSSREFS
KEYWORD
nonn,base,hard,more
AUTHOR
Ryan Propper, Jul 11 2005
EXTENSIONS
a(25)-a(33) from D. S. McNeil, Mar 03 2009
a(34)-a(38) from Kevin P. Thompson, Oct 20 2021
a(39)-a(40) from Kevin P. Thompson, Dec 08 2021
STATUS
approved