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.

Previous Showing 11-20 of 26 results. Next

A062523 6^a(n) is smallest nonnegative power of 6 containing the string 'n'.

Original entry on oeis.org

9, 0, 3, 2, 6, 6, 1, 5, 12, 4, 9, 16, 4, 13, 28, 18, 3, 10, 15, 21, 26, 3, 22, 12, 27, 26, 17, 7, 16, 4, 13, 22, 24, 12, 27, 19, 2, 21, 22, 30, 13, 14, 22, 25, 17, 15, 6, 15, 28, 15, 21, 31, 46, 23, 28, 18, 6, 15, 20, 17, 10, 8, 11, 33, 14, 6, 6, 8, 18, 9, 11, 22, 26, 17, 16, 33
Offset: 0

Views

Author

Robert G. Wilson v, Jun 24 2001

Keywords

Crossrefs

Cf. A030000. Essentially the same as A063569.

Programs

  • Mathematica
    Table[k = 0; While[ StringPosition[ ToString[6^k], ToString[n] ] == {}, k++ ]; k, {n, 0, 75} ]
    Module[{nn=100,p},p=Table[{n,6^n},{n,0,nn}];Table[SelectFirst[p,SequenceCount[ IntegerDigits[ #[[2]]],IntegerDigits[k]]>0&],{k,0,nn}]][[;;,1]] (* Harvey P. Dale, Jun 02 2023 *)

A062526 9^a(n) is smallest power of 9 containing the string 'n'.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Jun 24 2001

Keywords

Comments

Table[k = 0; While[ StringPosition[ ToString[9^k], ToString[n] ] == {}, k++ ]; k, {n, 0, 75} ]

Crossrefs

Cf. A030000.

A062520 3^a(n) is smallest nonnegative power of 3 containing n.

Original entry on oeis.org

10, 0, 3, 1, 5, 8, 8, 3, 4, 2, 21, 19, 17, 22, 11, 13, 17, 11, 7, 9, 18, 7, 19, 13, 5, 26, 19, 3, 24, 6, 16, 12, 13, 31, 15, 21, 24, 29, 18, 31, 17, 12, 18, 5, 12, 28, 16, 11, 15, 10, 35, 32, 33, 12, 26, 27, 8, 40, 26, 10, 21, 8, 19, 17, 24, 8, 33, 16, 9, 14, 35, 11, 6, 29, 18, 47
Offset: 0

Views

Author

Robert G. Wilson v, Jun 24 2001

Keywords

Examples

			a(1) = 0 since 3^0 = 1. a(2) = a(7) = a(27) = 3 because 3^3 = 27.
		

Crossrefs

Cf. A030000. Essentially the same as A063566. Cf. A000244.

Programs

  • Maple
    N:= 99:
    count:= 1: A["0"]:= 10:
    for n from 0 while count <= N do
      S:= convert(3^n,string); nS:= length(S);
      for m from 1 to 2 while count <= N do
        for i from 1 to nS+1-m while count <= N do
          if S[i] <> "0" and not assigned(A[S[i..i+m-1]]) then
             count:= count+1; A[S[i..i+m-1]]:= n;
          fi
        od
      od
    od:
    seq(A[convert(n,string)],n=0..N); # Robert Israel, Jun 14 2018
  • Mathematica
    Table[k = 0; While[ StringPosition[ ToString[3^k], ToString[n] ] == {}, k++ ]; k, {n, 0, 75} ]
  • Python
    def a(n):
        s, k = str(n), 0
        while s not in str(3**k): k += 1
        return k
    print([a(n) for n in range(76)]) # Michael S. Branicky, Oct 04 2021

A062521 4^a(n) is smallest nonnegative power of 4 containing the string 'n'.

Original entry on oeis.org

5, 0, 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, 12, 15, 15, 22
Offset: 0

Views

Author

Robert G. Wilson v, Jun 24 2001

Keywords

Crossrefs

Cf. A030000. Essentially the same as A063567.

Programs

  • Mathematica
    Table[k = 0; While[ StringPosition[ ToString[4^k], ToString[n] ] == {}, k++ ]; k, {n, 0, 75} ]

A062522 5^a(n) is smallest nonnegative power of 5 containing the string 'n'.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Jun 24 2001

Keywords

Comments

Table[k = 0; While[ StringPosition[ ToString[5^k], ToString[n]] == {}, k++ ]; k, {n, 0, 75} ]

Crossrefs

Cf. A030000. Essentially the same as A063568.

A062524 7^a(n) is smallest nonnegative power of 7 containing the string 'n'.

Original entry on oeis.org

4, 0, 4, 3, 2, 7, 5, 1, 5, 2, 13, 6, 12, 12, 19, 15, 5, 6, 19, 11, 12, 22, 14, 7, 4, 30, 11, 23, 10, 16, 14, 19, 11, 16, 3, 7, 9, 19, 12, 17, 4, 12, 27, 3, 18, 21, 32, 10, 8, 2, 15, 17, 10, 9, 7, 21, 15, 8, 21, 18, 9, 15, 18, 17, 6, 27, 20, 11, 5, 16, 33, 27, 12, 11, 11, 10
Offset: 0

Views

Author

Robert G. Wilson v, Jun 24 2001

Keywords

Comments

See A176767 for the actual powers 7^a(n). - M. F. Hasler, Oct 03 2014

Crossrefs

Cf. A030000.
Essentially the same as A063570.

Programs

  • Mathematica
    Table[k = 0; While[ StringPosition[ ToString[7^k], ToString[n] ] == {}, k++ ]; k, {n, 0, 75} ]

A331619 a(n) is the smallest positive number k such that the decimal expansion of n*2^k contains the string n.

Original entry on oeis.org

1, 4, 4, 7, 4, 9, 4, 8, 4, 10, 10, 10, 10, 10, 10, 10, 10, 7, 10, 10, 4, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 4, 10, 28, 19, 13, 15, 16, 40, 20, 30, 53, 27, 20, 27, 35, 30, 20, 53, 31, 20, 4, 8, 18, 35, 20, 10, 30, 23, 20
Offset: 0

Views

Author

Rémy Sigrist, Jan 22 2020

Keywords

Examples

			  n   a(n)  n*2^a(n)
  --  ----  --------
   0     1         0
   1     4        16
   2     4        32
   3     7       384
   4     4        64
   5     9      2560
   6     4        96
   7     8      1792
   8     4       128
   9    10      9216
  10    10     10240
		

Crossrefs

A346120 a(n) is the smallest nonnegative number k such that the decimal expansion of k! contains the string n.

Original entry on oeis.org

5, 0, 2, 8, 4, 7, 3, 6, 9, 11, 19, 22, 5, 15, 26, 25, 11, 14, 27, 29, 5, 19, 13, 18, 4, 23, 26, 13, 9, 14, 15, 32, 8, 24, 28, 17, 9, 18, 23, 11, 7, 27, 17, 15, 21, 19, 26, 12, 24, 23, 7, 19, 23, 32, 29, 17, 17, 18, 23, 25, 12, 26, 9, 26, 18, 30, 20, 15, 11, 27, 13
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 05 2021

Keywords

Examples

			a(3) = 8 since 3 occurs in 8! = 40320, but not in 0!, 1!, 2!, ..., 7!.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := (k = 0; While[! MatchQ[IntegerDigits[k!], {_, Sequence @@ IntegerDigits[n], _}], k++]; k); Table[a[n], {n, 0, 70}]
  • PARI
    a(n) = my(k=0, s=Str(n)); while (#strsplit(Str(k!), s) < 2, k++); k; \\ Michel Marcus, Jul 05 2021
    
  • Python
    def A346120(n):
        s, k, f = str(n), 0, 1
        while s not in str(f):
            k += 1
            f *= k
        return k # Chai Wah Wu, Jul 05 2021

A371887 a(1) = 1; for n > 1, a(n) is the smallest positive integer k such that the digits of 2^k contain 2^a(n-1) as a proper substring.

Original entry on oeis.org

1, 5, 15, 507
Offset: 1

Views

Author

Adam Vulic, Apr 11 2024

Keywords

Comments

From David A. Corneth, Apr 11 2024: (Start)
This sequence is well defined as A030000 is well defined; every finite string of digits is contained in some power of 2.
An upper bound for a(n), n > 1, can be found by solving 2^k == 2^a(n-1) (mod 10^m) where m is the number of digits of 2^a(n-1) (cf. A034887). This gives a(n) <= k = a(n-1) + 4*5^(m-1) (cf. A005054). So a(5) <= 507 + 4*5^152, which is about 7*10^106. (End)

Examples

			a(2) is the smallest k > 0 such that the digits of 2^k contain 2^a(1) = 2^1 = 2 as a proper substring, so a(2) = 5. (2^5 = 32.)
a(3) is the smallest k > 0 such that the digits of 2^k contain 2^a(2) = 32 as a proper substring, so a(3) = 15. (2^15 = 32768.)
		

Crossrefs

Programs

  • Mathematica
    k = 0; Rest@ NestList[(While[SequenceCount[IntegerDigits[2^k], IntegerDigits[2^#]] == 0, k++]; k++; k - 1) &, 1, 4] (* Michael De Vlieger, Apr 19 2024 *)

A175389 Smallest nonnegative number k such that 2^k contains n, 2n and 3n as substrings of its decimal expansion.

Original entry on oeis.org

10, 17, 18, 29, 50, 87, 86, 31, 70, 62, 101, 147, 86, 124, 93, 144, 82, 81, 157, 113, 100, 110, 146, 110, 88, 96, 141, 158, 94, 69, 79, 75, 123, 244, 192, 297, 181, 168, 128, 255, 101, 140, 197, 182, 147, 228, 111, 189, 224, 303, 288, 510, 321, 289, 232, 432, 342
Offset: 0

Views

Author

Zak Seidov, Apr 27 2010

Keywords

Examples

			2^10 = 1024 is the smallest power of 2 containing a 0, so a(0) = 10.
2^101 = 2535301200456458802993406410752 is the smallest power of 2 containing 10, 20, and 30 as substrings, so a(10) = 101.
		

Crossrefs

Cf. A030000 (Susanna's sequence: smallest nonnegative number k such that 2^k contains n).

Programs

  • Maple
    N:= 100: # to get a(0) to a(N)
    R:= 'R': count:= 0:
    for k from 0 while count < N+1 do
       t:= 2^k;
       d:= ilog10(t);
       V:= select(`<=`,{seq(seq(floor(t/10^i) mod 10^j, j=1..d+1-i),
          i=0..d)},3*N);
       V3:= select(t -> t <= N and has(V,2*t) and has(V,3*t), V);
       for v in V3 do
         if not assigned(R[v]) then
           count:= count+1;
           R[v]:= k;
         fi
       od;
    od:
    seq(R[n],n=0..N); # Robert Israel, Jul 19 2016
  • Mathematica
    Table[SelectFirst[Range[0, 10^3], Function[k, Length@ DeleteCases[
    Map[SequencePosition[IntegerDigits[2^k], IntegerDigits@ #] &, n Range@ 3] /. {} -> 0, m_ /; m == 0] == 3]], {n, 0, 56}] (* Michael De Vlieger, Jul 19 2016, Version 10.1 *)
Previous Showing 11-20 of 26 results. Next