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-3 of 3 results.

A018862 5^a(n) is smallest power of 5 beginning with n.

Original entry on oeis.org

0, 2, 5, 11, 1, 4, 7, 50, 10, 63, 23, 3, 56, 26, 6, 69, 49, 29, 9, 82, 62, 42, 22, 12, 2, 75, 55, 45, 25, 15, 5, 88, 68, 58, 48, 38, 28, 18, 8, 91, 81, 71, 61, 51, 41, 31, 21, 11, 104, 94, 84, 74, 167, 64, 54, 44, 137, 34, 24, 117, 14, 4, 97, 87, 180, 77, 67, 160, 57, 150, 47, 37, 130
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • PARI
    a(n) = my(k=0, ss=Str(n)); while(strsplit(Str(5^k), ss)[1] != "", k++); k; \\ Michel Marcus, Aug 19 2025

A063571 Smallest power of 8 having n in its decimal representation.

Original entry on oeis.org

4, 3, 3, 5, 2, 3, 2, 5, 1, 4, 10, 14, 3, 9, 6, 7, 8, 9, 10, 12, 7, 6, 17, 21, 10, 17, 6, 5, 9, 20, 26, 25, 5, 21, 9, 15, 12, 10, 13, 14, 4, 10, 9, 14, 6, 11, 14, 12, 17, 13, 18, 3, 7, 29, 13, 13, 16, 25, 11, 11, 20
Offset: 0

Views

Author

Robert G. Wilson v, Aug 10 2001

Keywords

Comments

Variant of A062525 allowing only exponents larger than zero. [From R. J. Mathar, Dec 15 2008]

Programs

  • Mathematica
    a = {}; Do[k = 1; While[ StringPosition[ ToString[8^k], ToString[n] ] == {}, k++ ]; a = Append[a, k], {n, 0, 60} ]; a
    sp8[n_]:=Module[{k=1},While[SequenceCount[IntegerDigits[ 8^k], IntegerDigits[ n]]<1,k++];k]; Array[sp8,70,0] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 07 2017 *)
  • Python
    def a(n):
      k, pow8, s = 1, 8, str(n)
      while s not in str(pow8): k += 1; pow8 *= 8
      return k
    print([a(n) for n in range(61)]) # Michael S. Branicky, Apr 03 2021

A176768 Smallest power of 8 whose decimal expansion contains n.

Original entry on oeis.org

4096, 1, 512, 32768, 64, 512, 64, 32768, 8, 4096, 1073741824, 4398046511104, 512, 134217728, 262144, 2097152, 16777216, 134217728, 1073741824, 68719476736, 2097152, 262144, 2251799813685248, 9223372036854775808, 1073741824
Offset: 0

Views

Author

Jonathan Vos Post, Apr 25 2010

Keywords

Comments

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

Examples

			a(1) = 1 because 8^0 = 1 has "1" as a substring (not a proper substring, though).
a(2) = 512 because 8^3 = 512 has "2" as a substring.
a(3) = 32768 because 8^5 = 32768 has "3" as a substring.
		

Crossrefs

Programs

  • Maple
    F:= proc(dmax) local R,count,x,N,L,d,i,v;
    count:= 0: x:= 1/8: N:= 10^dmax:
    while count < N do
      x:= 8*x;
      L:= convert(x,base,10);
      for d from 1 to min(dmax, nops(L)) do
        for i from 1 to nops(L)-d+1 do
          v:= add(L[j]*10^(j-i),j=i..i+d-1);
          if not assigned(R[v]) then count:= count+1; R[v]:= x fi
    od od od:
    seq(R[v],v=0..N-1);
    end proc:
    F(2); # Robert Israel, Dec 25 2019
  • Mathematica
    A176768[n_] := Block[{k = -1}, While[StringFreeQ[IntegerString[8^++k], IntegerString[n]]]; 8^k]; Array[A176768, 50, 0] (* Paolo Xausa, Apr 04 2024 *)

Formula

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

Extensions

More terms from Sean A. Irvine and Jon E. Schoenfield, May 05 2010
a(0)=4096 inserted by Robert Israel, Dec 25 2019
Showing 1-3 of 3 results.