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.

Showing 1-2 of 2 results.

A176764 Smallest power of 4 whose decimal expansion contains n.

Original entry on oeis.org

1024, 1, 256, 16384, 4, 256, 16, 1048576, 16384, 4096, 1024, 1099511627776, 1125899906842624, 1180591620717411303424, 262144, 288230376151711744, 16, 17179869184, 1073741824, 4194304, 72057594037927936, 262144, 4722366482869645213696
Offset: 0

Views

Author

Jonathan Vos Post, Apr 25 2010

Keywords

Comments

This is to 4 as A176763 is to 3 and as A030001 is to 2.

Examples

			a(1) = 1 because 4^0 = 1 has "1" as a substring (not a proper substring, though).
a(2) = 256 because 4^4 = 256 has "2" as a substring.
a(3) = 16384 because 4^7 = 16384 has "3" as a substring.
		

Crossrefs

Programs

  • Mathematica
    A176764[n_] := Block[{k = -1}, While[StringFreeQ[IntegerString[4^++k], IntegerString[n]]]; 4^k]; Array[A176764, 50, 0] (* Paolo Xausa, Apr 03 2024 *)

Formula

a(n) = MIN{A000302(i) such that n in decimal representation is a substring of A000302(i)}.
a(n) = 4^A062521(n). - Michel Marcus, Sep 30 2014

Extensions

Corrected and extended by Sean A. Irvine and Jon E. Schoenfield, May 05 2010
a(0) prepended by Paolo Xausa, Apr 03 2024

A063567 Smallest positive power of 4 having n in its decimal representation.

Original entry on oeis.org

5, 2, 4, 7, 1, 4, 2, 10, 7, 6, 5, 20, 25, 35, 9, 29, 2, 17, 15, 11, 28, 9, 36, 29, 5, 4, 9, 19, 24, 16, 11, 37, 38, 43, 35, 14, 8, 15, 7, 21, 6, 11, 16, 11, 9, 14, 21, 18, 10, 16, 26, 20, 30, 8, 14, 8, 4, 10, 25, 22, 22, 29, 9, 7, 3, 8, 23, 12, 14, 17, 23, 13
Offset: 0

Views

Author

Robert G. Wilson v, Aug 10 2001

Keywords

Crossrefs

Essentially the same as A062521.

Programs

  • Mathematica
    a = {}; Do[k = 1; While[ StringPosition[ ToString[4^k], ToString[n] ] == {}, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
    sp4[n_]:=Module[{k=1,idn=IntegerDigits[n]},While[SequenceCount[ IntegerDigits[ 4^k], idn] == 0, k++];k]; Array[sp4,70,0] (* The program uses the SequenceCount function from Mathematica version 10 *) (* Harvey P. Dale, Mar 12 2016 *)
  • Python
    def a(n):
      target, k, pow4 = str(n), 1, 4
      while not target in str(pow4): k, pow4 = k+1, pow4*4
      return k
    print([a(n) for n in range(72)]) # Michael S. Branicky, May 02 2021

Extensions

Name edited and more terms from Michael S. Branicky, May 02 2021
Showing 1-2 of 2 results.