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.

A320930 Numbers k such that 4^k starts with k.

Original entry on oeis.org

10, 17, 556, 1771, 4695, 38537, 56969, 345797, 141419115, 1788191728
Offset: 1

Views

Author

Robert Israel, Oct 24 2018

Keywords

Examples

			4^10 = 1048576 starts with 10, so 10 is in the sequence.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local t, b;
      t:= 4^n;
    b:= ilog10(t) - ilog10(n);
    floor(t/10^b) = n
    end proc:
    select(filter, [$1..10^5]);
  • Python
    def afind(limit, startk=1):
        k, pow4 = startk, 4**startk
        for k in range(startk, limit+1):
            if str(pow4).startswith(str(k)):
                print(k, end=", ")
            pow4 *= 4
    afind(10**4) # Michael S. Branicky, Oct 17 2021

Extensions

a(8)-a(10) from Giovanni Resta, Oct 25 2018