login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A108861 Numbers k that divide the sum of the digits of 2^k * k!. 2

%I #37 Jul 11 2023 15:13:57

%S 1,2,3,5,6,9,27,81,126,159,205,252,254,267,285,675,1053,1086,1125,

%T 1146,2007,5088,5382,5448,14652,23401,23574,24009,41004,66789,67482,

%U 111480,866538,1447875,2413152,2414019,2417828,2421360,4045482,6713982

%N Numbers k that divide the sum of the digits of 2^k * k!.

%C Next term after 5448 is greater than 10000.

%C a(34) > 10^6. - _D. S. McNeil_, Mar 03 2009

%C a(39) > 2.54 * 10^6, if it exists. - _Kevin P. Thompson_, Oct 20 2021

%C a(41) > 7*10^6, if it exists. - _Kevin P. Thompson_, Dec 08 2021

%e 9 is a term because the sum of the digits of 2^9 * 9! = 185794560 is 45 which is divisible by 9.

%t Do[If[Mod[Plus @@ IntegerDigits[2^n * n! ], n] == 0, Print[n]], {n, 1, 10000}]

%t Select[Range[6714000],Mod[Total[IntegerDigits[2^# #!]],#]==0&] (* _Harvey P. Dale_, Jul 11 2023 *)

%o (PARI) isok(k) = !(sumdigits(2^k * k!) % k); \\ _Michel Marcus_, Oct 20 2021

%o (Python)

%o from itertools import islice

%o def A108861(): # generator of terms

%o k, k2, kf = 1, 2, 1

%o while True:

%o c = sum(int(d) for d in str(k2*kf))

%o if not c % k: yield k

%o k += 1

%o k2 *= 2

%o kf *= k

%o A108861_list = list(islice(A108861(),10)) # _Chai Wah Wu_, Oct 26 2021

%Y Cf. A000165, A007953, A052582.

%K nonn,base,hard,more

%O 1,2

%A _Ryan Propper_, Jul 11 2005

%E a(25)-a(33) from _D. S. McNeil_, Mar 03 2009

%E a(34)-a(38) from _Kevin P. Thompson_, Oct 20 2021

%E a(39)-a(40) from _Kevin P. Thompson_, Dec 08 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 17 23:23 EDT 2024. Contains 371767 sequences. (Running on oeis4.)