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-10 of 26 results. Next

A372044 Records in A030000.

Original entry on oeis.org

10, 15, 40, 43, 52, 58, 66, 111, 114, 136, 170, 171, 196, 215, 271, 286, 383, 519, 571, 611, 756, 758, 809, 1651, 1889, 2234, 2560, 2750, 3153, 5078, 5126, 5876, 6075, 6382, 6472, 8531, 8876, 9112, 9598, 14847, 17085, 17300, 17700, 20964, 26478, 28019, 28459, 28964, 32407, 32804
Offset: 1

Views

Author

Paolo Xausa, Apr 17 2024

Keywords

Examples

			From _David A. Corneth_, Apr 17 2024: (Start)
10 is in the sequence as A030000(0) = 10.
15 is the next term after 10 as the next record in A030000 occurs at k = 7 and A030000(7) = 15. (End)
		

Crossrefs

Programs

  • Mathematica
    d2k[k_] := d2k[k] = IntegerString[2^k];
    A030000[n_] := Block[{d = IntegerString[n], k = -1}, While[StringFreeQ[d2k[++k], d]]; k];
    Block[{upto = 10000, n = -1, a, r = -1}, Reap[While[++n <= upto, If[(a = A030000[n]) > r, Sow[r = a]]]][[2,1]]]
  • PARI
    \\ See PARI link

Extensions

More terms from David A. Corneth, Apr 17 2024

A372045 Positions of records in A030000.

Original entry on oeis.org

0, 7, 11, 22, 50, 61, 78, 100, 121, 122, 127, 155, 263, 548, 1000, 1002, 1003, 1016, 1559, 1583, 1877, 3087, 9634, 10001, 10029, 10199, 10620, 25672, 100002, 100005, 100085, 100116, 100457, 100956, 101597, 101624, 114323, 191974, 1000004, 1000006, 1000055, 1000227, 1000517, 1000717, 1000728, 1027986, 1098714, 1127153, 1429848, 3659369
Offset: 1

Views

Author

Paolo Xausa, Apr 17 2024

Keywords

Examples

			From _David A. Corneth_, Apr 17 2024: (Start)
0 is a term as it is the least nonnegative integer and A030000(0) = 10.
7 is a term after 0 as 7 is the first number that is first seen at a k such that 2^k contains 7 as a substring (namely at k = 15). (End)
		

Crossrefs

Programs

  • Mathematica
    d2k[k_] := d2k[k] = IntegerString[2^k];
    A030000[n_] := Block[{d = IntegerString[n], k = -1}, While[StringFreeQ[d2k[++k], d]]; k];
    Block[{upto = 10000, n = -1, a, r = -1}, Reap[While[++n <= upto, If[(a = A030000[n]) > r, r = a; Sow[n]]]][[2, 1]]]

Extensions

More terms from David A. Corneth, Apr 17 2024

A038689 Duplicate of A030000.

Original entry on oeis.org

10, 0, 1, 5, 2, 8, 4, 15, 3, 12, 10, 40, 7, 17, 18, 21, 4, 27, 30, 13, 11, 18, 43, 41, 10, 8
Offset: 0

Views

Author

Keywords

A030001 Smallest power of 2 whose decimal expansion contains n.

Original entry on oeis.org

1024, 1, 2, 32, 4, 256, 16, 32768, 8, 4096, 1024, 1099511627776, 128, 131072, 262144, 2097152, 16, 134217728, 1073741824, 8192, 2048, 262144, 8796093022208, 2199023255552, 1024, 256, 262144, 32768, 128, 4294967296, 4194304, 131072, 32, 33554432, 134217728, 33554432
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A030000 (the exponents), A000079.

Programs

  • Haskell
    import Data.List (isInfixOf)
    a030001 n = head $ filter ((show n `isInfixOf`) . show) a000079_list
    -- Reinhard Zumkeller, Nov 02 2011
    
  • Mathematica
    a[n_] := (k = 0; While[ !MatchQ[ IntegerDigits[2^k], {_, Sequence @@ IntegerDigits[n], _}], k++]; 2^k); Table[a[n], {n, 1, 30}](* Jean-François Alcover, Nov 30 2011 *)
    Module[{p2=2^Range[0,50]},Table[SelectFirst[p2,SequenceCount[ IntegerDigits[ #], IntegerDigits[ n]]>0&],{n,0,40}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 13 2019 *)
  • Python
    def a(n):
      k, strn = 0, str(n)
      while strn not in str(2**k): k += 1
      return 2**k
    print([a(n) for n in range(36)]) # Michael S. Branicky, Apr 03 2024

Extensions

a(30) corrected by Reinhard Zumkeller, Nov 02 2011
a(0) added by N. J. A. Sloane, Jul 04 2017

A018856 2^a(n) is the smallest power of 2 beginning with n.

Original entry on oeis.org

0, 1, 5, 2, 9, 6, 46, 3, 53, 10, 50, 7, 17, 47, 77, 4, 34, 54, 84, 11, 31, 51, 61, 81, 8, 18, 38, 48, 68, 78, 98, 5, 25, 35, 45, 55, 75, 85, 95, 12, 22, 32, 42, 145, 52, 62, 72, 82, 92, 102, 9, 19, 29, 39, 142, 49, 59, 162, 69, 79, 89, 192, 99, 6, 16, 119, 26
Offset: 1

Views

Author

Keywords

References

  • A. M. Yaglom and I. M. Yaglom, Challenging Mathematical Problems With Elementary Solutions, Vol. 1, pp. 29, 199-200, Prob. 91a, Dover, NY, 1987.

Crossrefs

Cf. A018802.
Cf. A100129 (a(n) = n).

Programs

  • Haskell
    import Data.List (isPrefixOf, findIndex)
    import Data.Maybe (fromJust)
    a018856 n =
       fromJust $ findIndex (show n `isPrefixOf`) $ map show a000079_list
    -- Reinhard Zumkeller, Aug 04 2011
    
  • Mathematica
    f[n_] := Block[{k = 1, m = Floor[ Log[10, n]]}, While[ Log[10, 2^k] < Floor[ Log[10, n]], k++ ]; While[ Quotient[2^k, 10^(Floor[k*Log[10, 2]] - m)] != n, k++ ]; k]; f[1] = 0;; Array[f, 73] (* Robert G. Wilson v, Jun 02 2009 *)
  • Python
    from itertools import count
    def aupton(terms):
        adict, pow2 = dict(), 1
        for i in count(0):
            s = str(pow2)
            for j in range(len(s)):
                t = int(s[:j+1])
                if t > terms:
                    break
                if t not in adict:
                    adict[t] = i
            if len(adict) == terms:
                return [adict[i+1] for i in range(terms)]
            pow2 *= 2
    print(aupton(67)) # Michael S. Branicky, Apr 08 2023

A176763 Smallest power of 3 whose decimal expansion contains n.

Original entry on oeis.org

59049, 1, 27, 3, 243, 6561, 6561, 27, 81, 9, 10460353203, 1162261467, 129140163, 31381059609, 177147, 1594323, 129140163, 177147, 2187, 19683, 387420489, 2187, 1162261467, 1594323, 243, 2541865828329, 1162261467, 27, 282429536481, 729, 43046721, 531441, 1594323
Offset: 0

Views

Author

Jonathan Vos Post, Apr 25 2010

Keywords

Comments

This is to 3 as A030001 is to 2.

Examples

			a(1) = 1 because 3^0 = 1 has "1" as a substring (not a proper substring, though).
a(2) = 27 because 3^3 = 27 has "2" as a substring.
a(10) = 10460353203 because 3^21 = 10460353203 is the smallest power of 3 whose decimal expansion contains "10" (in this case, "10" happens to be the left-hand or initial digits, but that is not generally true).
		

Crossrefs

Programs

  • Mathematica
    A176763[n_] := Block[{k = -1}, While[StringFreeQ[IntegerString[3^++k], IntegerString[n]]]; 3^k]; Array[A176763, 50, 0] (* Paolo Xausa, Apr 03 2024 *)
  • Python
    def a(n):
        k, strn = 0, str(n)
        while strn not in str(3**k): k += 1
        return 3**k
    print([a(n) for n in range(33)]) # Michael S. Branicky, Apr 03 2024

Formula

a(n) = MIN{A000244(i) such that n in decimal representation is a substring of A000244(i)}.

Extensions

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

A063565 Smallest positive number k such that 2^k contains n.

Original entry on oeis.org

10, 4, 1, 5, 2, 8, 4, 15, 3, 12, 10, 40, 7, 17, 18, 21, 4, 27, 30, 13, 11, 18, 43, 41, 10, 8, 18, 15, 7, 32, 22, 17, 5, 25, 27, 25, 16, 30, 14, 42, 12, 22, 19, 22, 18, 28, 42, 31, 11, 32, 52, 9, 19, 16, 25, 16, 8, 20, 33, 33, 23, 58, 18, 14, 6, 16, 46, 24, 15, 34, 29, 21, 17, 30
Offset: 0

Views

Author

Robert G. Wilson v, Aug 10 2001

Keywords

Examples

			a(7) = 15 because 2^15 = 32768.
		

Crossrefs

Apart from initial term, a duplicate of A030000.

Programs

  • Mathematica
    a = {}; Do[k = 1; While[ StringPosition[ ToString[2^k], ToString[n] ] == {}, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
  • Python
    def A063565(n):
        s, k, k2 = str(n), 1, 2
        while True:
            if s in str(k2):
                return k
            k += 1
            k2 *= 2 # Chai Wah Wu, Jun 20 2015

Extensions

More terms from Hans Havermann

A082058 a(n) is the smallest k such that prime(k) contains the digits of n as a substring.

Original entry on oeis.org

26, 5, 1, 2, 13, 3, 18, 4, 23, 8, 26, 5, 31, 6, 35, 36, 38, 7, 42, 8, 197, 47, 48, 9, 53, 54, 56, 31, 60, 10, 63, 11, 216, 51, 69, 71, 73, 12, 76, 34, 79, 13, 82, 14, 86, 88, 89, 15, 93, 35, 96, 36, 98, 16, 100, 102, 103, 37, 107, 17, 110, 18, 257, 38, 116
Offset: 0

Views

Author

Labos Elemer, Apr 03 2003

Keywords

Examples

			0 appears first in 26th prime (101), so a(0) = 26;
9 appears first in 8th prime (19), so a(9) = 8;
24 appears first in 53rd prime (241), so a(24) = 53.
		

Crossrefs

Programs

  • Mathematica
    tg=101; T=0*Range[tg]; k=0; subs[n_] := Block[{d = IntegerDigits[n]}, Flatten@ Table[ FromDigits@ Take[d, {i, j}], {j, Length[d]}, {i, j}]]; While[tg > 0, s = subs[Prime[++k]]; Do[ If[e <= 100 && T[[e+1]] == 0, T[[e+1]] = k; tg--], {e, s}]]; T (* Giovanni Resta, Apr 29 2017 *)

Formula

A062584(n) = prime(a(n)). - Giovanni Resta, Apr 29 2017
a(n) >= A088781(n) for n >= 1. The smallest positive n for which a(n) > A088781(n) is 114. - Pontus von Brömssen, Nov 29 2024

Extensions

Data corrected by Giovanni Resta, Apr 29 2017
Name clarified by Pontus von Brömssen, Nov 29 2024

A062525 8^a(n) is smallest power of 8 containing the string 'n'.

Original entry on oeis.org

4, 0, 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, 25, 6, 27, 2, 14, 24, 8, 5, 20, 23, 7, 8, 10, 10, 13
Offset: 0

Views

Author

Robert G. Wilson v, Jun 24 2001

Keywords

Crossrefs

Programs

  • Maple
    F:= proc(dmax) local R,count,x,N,L,d,i,v, p;
    count:= 0: x:= 1/8: N:= 10^dmax:
    for p from 0 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]:= p fi
    od od od;
    seq(R[v],v=0..N-1);
    end proc:
    F(2); # Robert Israel, Dec 25 2019
  • Mathematica
    Table[k = 0; While[ StringPosition[ ToString[8^k], ToString[n] ] == {}, k++ ]; k, {n, 0, 75} ]
    Join[{4,0},With[{c=Table[{n,IntegerDigits[8^n]},{n,50}]},Table[ SelectFirst[ c,SequenceCount[ #[[2]],IntegerDigits[k]]>0&],{k,2,80}]][[All,1]]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 13 2019 *)

A321043 Single-digit numbers in the order in which they first appear in the decimal expansions of powers of 2, followed by the two-digit numbers in the order in which they appear, then the three-digit numbers, and so on.

Original entry on oeis.org

1, 2, 4, 8, 6, 3, 5, 0, 9, 7, 16, 32, 64, 12, 28, 25, 56, 51, 10, 24, 20, 48, 40, 96, 81, 19, 92, 63, 38, 84, 27, 76, 68, 65, 55, 53, 36, 13, 31, 72, 26, 62, 21, 14, 44, 52, 42, 88, 85, 57, 97, 71, 15, 41, 94, 43, 30, 83, 86, 60, 67, 77, 33, 35, 54, 34, 17, 45
Offset: 1

Views

Author

David Williams, Oct 26 2018

Keywords

Comments

Apparently this algorithm applied to most sequences will produce a fractal scatterplot graph. - David Williams, Jan 20 2019

Examples

			1,2,4,8,16,32,64,128,256,512,1024, ..., 4096, ..., 32768, ... gives 1,2,4,8,6,3,5,0,9,7.
Then we get 16,32,64,12,28,25,56,51,10,24,20,48,40,96,81,19,92,...
11 does not appear until 2^40 = 1099511627776.
		

Crossrefs

See A030000 for an inverse.

Programs

  • PARI
    \\ See Links section.

Extensions

Edited by N. J. A. Sloane, Oct 27 2018
More terms from Rémy Sigrist, Oct 27 2018
Showing 1-10 of 26 results. Next