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.

A364606 Numbers k such that the average digit of 2^k is an integer.

Original entry on oeis.org

0, 1, 2, 3, 6, 13, 16, 26, 46, 51, 56, 73, 122, 141, 166, 313, 383
Offset: 1

Views

Author

Jon E. Schoenfield, Jul 29 2023

Keywords

Examples

			2^26 = 67108864 is an 8-digit number; its average digit is (6+7+1+0+8+8+6+4)/8 = 40/8 = 5, an integer, so 26 is a term.
		

Crossrefs

Programs

  • Maple
    q:= n-> (l-> irem(add(i, i=l), nops(l))=0)(convert(2^n, base, 10)):
    select(q, [$0..400])[];  # Alois P. Heinz, Jul 29 2023
  • Mathematica
    Select[Range[0, 2^12], IntegerQ@ Mean@ IntegerDigits[2^#] &] (* Michael De Vlieger, Jul 29 2023 *)
  • PARI
    isok(k) = my(d=digits(2^k)); !(vecsum(d) % #d); \\ Michel Marcus, Jul 29 2023
    
  • Python
    from itertools import count, islice
    from gmpy2 import mpz, digits
    def A364606_gen(startvalue=0): # generator of terms >= startvalue
        m = mpz(1)<A364606_list = list(islice(A364606_gen(),10)) # Chai Wah Wu, Jul 31 2023

Formula

{ k : A001370(k) mod A034887(k) = 0 }.