cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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

Views

Author

Ryan Propper, Jul 11 2005

Keywords

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

Examples

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

Crossrefs

Programs

  • 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 *)
  • 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

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