login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A108861
Numbers k that divide the sum of the digits of 2^k * k!.
2
1, 2, 3, 5, 6, 9, 27, 81, 126, 159, 205, 252, 254, 267, 285, 675, 1053, 1086, 1125, 1146, 2007, 5088, 5382, 5448, 14652, 23401, 23574, 24009, 41004, 66789, 67482, 111480, 866538, 1447875, 2413152, 2414019, 2417828, 2421360, 4045482, 6713982
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
A108861_list = list(islice(A108861(), 10)) # Chai Wah Wu, Oct 26 2021
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