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 10 results.

A007377 Numbers k such that the decimal expansion of 2^k contains no 0.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 15, 16, 18, 19, 24, 25, 27, 28, 31, 32, 33, 34, 35, 36, 37, 39, 49, 51, 67, 72, 76, 77, 81, 86
Offset: 1

Views

Author

Keywords

Comments

It is an open problem of long standing to show that 86 is the last term.
A027870(a(n)) = A224782(a(n)) = 0. - Reinhard Zumkeller, Apr 30 2013
See A030700 for the analog for 3^k, which seems to end with k=68. - M. F. Hasler, Mar 07 2014
Checked up to k = 10^10. - David Radcliffe, Aug 21 2022

Examples

			Here is 2^86, conjecturally the largest power of 2 not containing a 0: 77371252455336267181195264. - _N. J. A. Sloane_, Feb 10 2023
		

References

  • J. S. Madachy, Mathematics on Vacation, Scribner's, NY, 1966, p. 126.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Some similar sequences are listed in A035064.
Cf. also A031142.

Programs

  • Haskell
    import Data.List (elemIndices)
    a007377 n = a007377_list !! (n-1)
    a007377_list = elemIndices 0 a027870_list
    -- Reinhard Zumkeller, Apr 30 2013
    
  • Magma
    [ n: n in [0..50000] | not 0 in Intseq(2^n) ];  // Bruno Berselli, Jun 08 2011
    
  • Maple
    remove(t -> has(convert(2^t,base,10),0),[$0..1000]); # Robert Israel, Dec 29 2015
  • Mathematica
    Do[ If[ Union[ RealDigits[ 2^n ] [[1]]] [[1]] != 0, Print[ n ] ], {n, 1, 60000}]
    Select[Range@1000, First@Union@IntegerDigits[2^# ] != 0 &]
    Select[Range[0,100],DigitCount[2^#,10,0]==0&] (* Harvey P. Dale, Feb 06 2015 *)
  • PARI
    for(n=0,99,if(vecmin(eval(Vec(Str(2^n)))),print1(n", "))) \\ Charles R Greathouse IV, Jun 30 2011
    
  • Perl
    use bignum;
    for(0..99) {
      if((1<<$_) =~ /^[1-9]+$/) {
        print "$_, "
      }
    } # Charles R Greathouse IV, Jun 30 2011
    
  • Python
    def ok(n): return '0' not in str(2**n)
    print(list(filter(ok, range(10**4)))) # Michael S. Branicky, Aug 08 2021

Extensions

a(1) = 0 prepended by Reinhard Zumkeller, Apr 30 2013

A094776 a(n) = largest k such that the decimal representation of 2^k does not contain the digit n.

Original entry on oeis.org

86, 91, 168, 153, 107, 71, 93, 71, 78, 108
Offset: 0

Views

Author

Michael Taktikos, Jun 09 2004

Keywords

Comments

These values are only conjectural.
The sequence could be extended to any nonnegative integer index n defining a(n) to be the largest k such that n does not appear as substring in the decimal expansion of 2^k. I conjecture that for n = 10, 11, 12, ... it continues (2000, 3020, 1942, 1465, 1859, 2507, 1950, 1849, 1850, ...). For example, curiously enough, the largest power of 2 in which the string "10" does not appear seems to be 2^2000. - M. F. Hasler, Feb 10 2023

Examples

			a(0) = 86 because 2^86 = 77371252455336267181195264 is conjectured to be the highest power of 2 that doesn't contain the digit 0.
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 71, p. 25, Ellipses, Paris 2008.

Crossrefs

Cf. A027870 and A065712 - A065744 (number of '0's, ..., '9's in 2^n).
Cf. A034293 (numbers k such that 2^k has no '2').

Programs

  • Mathematica
    f[n_] := Block[{a = {}, k = 1}, While[k < 10000, If[ Position[ Union[ IntegerDigits[ 2^k, 10]], n] == {}, AppendTo[a, k]]; k++ ]; a]; Table[ f[n][[ -1]], {n, 0, 9}] (* Robert G. Wilson v, Jun 12 2004 *)
  • PARI
    A094776(n,L=10*20^#Str(n))={forstep(k=L, 0, -1, foreach(digits(1<M. F. Hasler, Feb 13 2023
    
  • Python
    def A094776(n, L=0):
       n = str(n)
       for k in range(L if L else 10*20**len(n), 0, -1):
          if n not in str(2**k): return k # M. F. Hasler, Feb 13 2023

A065710 Number of 2's in the decimal expansion of 2^n.

Original entry on oeis.org

0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 2, 2, 0, 2, 0, 0, 1, 1, 0, 2, 1, 1, 1, 1, 2, 1, 0, 0, 0, 1, 1, 0, 1, 4, 0, 3, 1, 2, 0, 1, 1, 3, 3, 3, 1, 2, 0, 1, 2, 1, 2, 2, 2, 3, 1, 3, 0, 2, 2, 3, 3, 2, 2, 4, 4, 4, 0, 1, 2, 4, 3, 1, 3, 6, 2, 0, 2, 4, 4, 4, 2, 3, 6, 2, 1, 5, 1, 2, 4, 4, 1, 2, 6
Offset: 0

Views

Author

Benoit Cloitre, Dec 04 2001

Keywords

Comments

See A034293 for indices of zeros: It is conjectured that the last 0 appears at index 168 = A094776(2). More generally, I conjecture that any value x = 0, 1, 2, 3, ... occurs only a finite number of times N(x) = 23, 35, 28, 26, 41, 37, 34, 26, 34, 38, 33, 41, ... in this sequence, for the last time at a well defined index i(x) = 168, 176, 186, 268, 423, 361, 472, 555, 470, 562, 563, 735, .... - M. F. Hasler, Feb 10 2023, edited by M. F. Hasler, Jul 09 2025

Examples

			2^31 = 2147483648 so a(31) = 1.
		

Crossrefs

Cf. 0's A027870, 1's A065712, 3's A065714, 4's A065715, 5's A065716, 6's A065717, 7's A065718, 8's A065719, 9's A065744.
Cf. A034293, A094776 (largest k for which 2^k has no digit n).

Programs

  • Maple
    seq(numboccur(2, convert(2^n,base,10)),n=0..100); # Robert Israel, Jul 09 2025
  • Mathematica
    Table[ Count[ IntegerDigits[2^n], 2], {n, 0, 100} ]
  • PARI
    a(n) = #select(x->(x==2), digits(2^n)); \\ Michel Marcus, Jun 15 2018
    
  • Python
    def A065710(n):
        return str(2**n).count('2') # Chai Wah Wu, Feb 14 2020

Formula

a(n) = a(floor(n/10)) + [n == 2 (mod 10)], where [...] is the Iverson bracket. - M. F. Hasler, Feb 10 2023

Extensions

More terms from Robert G. Wilson v, Dec 07 2001

A035064 Numbers k such that 2^k does not contain the digit 9 (probably finite).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 28, 30, 31, 45, 46, 47, 57, 58, 59, 71, 77, 99, 108
Offset: 1

Views

Author

Patrick De Geest, Nov 15 1998

Keywords

Examples

			Here is 2^108, conjecturally the largest power of 2 that does not contain a 9: 324518553658426726783156020576256. - _N. J. A. Sloane_, Feb 10 2023
		

Crossrefs

Cf. numbers n such that decimal expansion of 2^n contains no k: A007377 (k=0), A035057 (k=1), A034293 (k=2), A035058 (k=3), A035059 (k=4), A035060 (k=5), A035061 (k=6), A035062 (k=7), A035063 (k=8), this sequence (k=9).
Indices of zeros in A065744 (number of 9s in digits of 2^n).

Programs

Extensions

Initial 0 added by Vincenzo Librandi, May 06 2015
Removed keyword "fini" at the suggestion of Nathan Fox, since it is only a conjecture that this sequence contains only finitely many terms. - N. J. A. Sloane, Mar 03 2016

A113951 Largest number whose n-th power is exclusionary (or 0 if no such number exists).

Original entry on oeis.org

639172, 7658, 2673, 0, 92, 93, 712, 0, 18, 12, 4, 0, 37, 0, 9, 0, 0, 3, 4, 0, 7, 2, 7, 0, 8, 3, 9, 0, 0, 0, 0, 0, 3, 2, 2, 0, 0, 7, 3, 0, 2, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3
Offset: 2

Views

Author

Lekraj Beedassy, Nov 09 2005

Keywords

Comments

The number m with no repeated digits has an exclusionary n-th power m^n if the latter is made up of digits not appearing in m. For the corresponding m^n see A113952. In principle, no exclusionary n-th power exists for n == 1 (mod 4) = A016813.
After a(84) = 3, the next nonzero term is a(168) = 2, where 168 is the last known term in A034293. - Michael S. Branicky, Aug 28 2021

Examples

			a(4) = 2673 because no number with distinct digits beyond 2673 has a 4th power that shares no digit in common with it (see A111116). Here we have 2673^4 = 51050010415041.
		

References

  • H. Ibstedt, Solution to Problem 2623, "Exclusionary Powers", pp. 346-9 Journal of Recreational Mathematics, Vol. 32 No.4 2003-4, Baywood NY.

Crossrefs

Programs

  • Python
    from itertools import combinations, permutations
    def no_repeated_digits():
        for d in range(1, 11):
            for p in permutations("0123456789", d):
                if p[0] == '0': continue
                yield int("".join(p))
    def a(n):
        m = 0
        for k in no_repeated_digits():
            if set(str(k)) & set(str(k**n)) == set():
                m = max(m, k)
        return m
    for n in range(2, 4): print(a(n), end=", ") # Michael S. Branicky, Aug 28 2021

Extensions

a(34), a(39), a(40) corrected by and a(43) and beyond from Michael S. Branicky, Aug 28 2021

A136291 Array read by rows: each row is a sequence of numbers k such that n^k does not contain the digit n.

Original entry on oeis.org

0, 2, 3, 4, 6, 12, 14, 16, 20, 22, 23, 26, 34, 35, 36, 39, 42, 46, 54, 64, 74, 83, 168, 0, 2, 3, 4, 6, 7, 8, 10, 11, 14, 19, 27, 28, 34, 40, 50, 55, 84, 0, 2, 4, 8, 12, 20, 0, 0, 0, 2, 3, 4, 7, 16, 22, 24, 39, 0, 2, 3, 4, 6, 7, 8, 26, 0, 2, 4, 6, 8, 10, 16, 28
Offset: 0

Views

Author

Zak Seidov, Mar 20 2008

Keywords

Comments

Last values in each row are 168,84,20,0,0,39,26,28 (all terms highly probably correct).

Examples

			Each row is sequence of numbers k such that n^k does not contain the digit n (all rows probably finite, checked up to k=10^4), n=2..9:
0,2,3,4,6,12,14,16,20,22,23,26,34,35,36,39,42,46,54,64,74,83,168 (A034293)
0,2,3,4,6,7,8,10,11,14,19,27,28,34,40,50,55,84 (A131629)
0,2,4,8,12,20
0,
0,
0,2,3,4,7,16,22,24,39
0,2,3,4,6,7,8,26
0,2,4,6,8,10,16,28.
		

Crossrefs

A185186 Numbers divisible by at least one of their digits other than 1.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 12, 15, 20, 22, 24, 25, 26, 28, 30, 32, 33, 35, 36, 39, 40, 42, 44, 45, 48, 50, 52, 55, 60, 62, 63, 64, 65, 66, 70, 72, 75, 77, 80, 82, 84, 85, 88, 90, 92, 93, 95, 96, 99, 102, 104, 105, 112, 115, 120, 122, 123, 124, 125, 126, 128, 132
Offset: 1

Views

Author

Zak Seidov, Mar 11 2011

Keywords

Comments

The only primes in the sequence are 2, 3, 5, 7. No repunits are eligible.
Also, an interesting class of non-eligible integers consists of some powers of 2, 3 and 7:
"2, 4, 8-less" powers of 2, 2^m = 1, 16, 65536 with m = 0, 4, 16 (a subsequence of A034293);
"3, 9-less" powers of 3, 3^m = {1, 27, 81, 177147, 1162261467}, with m = {0, 3, 4, 11, 19} (a subsequence of A131629);
"seven-less" powers of 7, 7^m, with m = 0, 2, 3, 4, 7, 16, 22, 24, 39 (see 6th row of A136291 Array read by rows: each row is a sequence of numbers k such that n^k does not contain the digit n).
Asymptotic density 27/35 = 0.771... - Charles R Greathouse IV, Mar 11 2011
The asymptotic density of numbers having a prime digit is 1 for each prime digit. The asymptotic density of numbers being divisible by 2, 3, 5 or 7 is -Sum_{d|210, d>1}((-1)^omega(d) / d) = 27/35. Also, the asymptotic density of numbers divisible by the first n primes is r(n) where r(1) = 1/2 and r(n) = r(n - 1) + (1 - r(n - 1)) / prime(n). - David A. Corneth, May 28 2017

Crossrefs

Programs

  • Mathematica
    digDivQ[n_] := AnyTrue[IntegerDigits[n], # > 1 && Mod[n, #] == 0 &]; Select[Range[200], digDivQ] (* Giovanni Resta, May 27 2017 *)
  • PARI
    is(n) = my(d = vecsort(digits(n), , 8), t = 1); while(t<=#d&&d[t] < 2, t++); sum(i=t, #d, n%d[i]==0) > 0 \\ David A. Corneth, May 27 2017

Extensions

Name edited by Alonso del Arte, May 16 2017

A235052 a(n) = smallest number > 1 such that a(n)^n contains a(n) as a substring.

Original entry on oeis.org

2, 5, 4, 5, 2, 4, 2, 2, 2, 2, 2, 3, 2, 4, 2, 3, 2, 2, 2, 3, 2, 3, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 4, 3, 3, 2, 2, 3, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2
Offset: 1

Views

Author

Derek Orr, Jan 02 2014

Keywords

Comments

It is very probable that a(n) = 2 for n > 169.
a(n) <= 5 since 5^n ends in 5 for n > 0. - Michael S. Branicky, Jan 25 2022

Examples

			4 is the smallest number such that 4^3 contains a 4 and 4^6 contains a 4, so a(3) = 4 and a(6) = 4.
		

Crossrefs

Programs

  • Haskell
    import Data.List (isInfixOf)
    a235052 n = head [x | x <- [2..], show x `isInfixOf` (show $ x ^ n)]
    -- Reinhard Zumkeller, Jan 18 2014
    
  • Mathematica
    a[n_] := Block[{k = 2}, While[StringPosition[ToString[k^n], ToString@k] == {}, k++]; k]; Array[a, 80] (* Giovanni Resta, Jan 11 2014 *)
  • PARI
    a(n) = my(k=2); while(#strsplit(Str(k^n), Str(k))==1, k++); k; \\ Michel Marcus, Jan 25 2022
  • Python
    def f(x):
      for n in range(2,10**3):
        if str(n**x).count(str(n)) > 0:
          return n
    x = 1
    while x < 200:
      print(f(x))
      x += 1
    
  • Python
    def a(n): return min(k for k in range(2, 6) if str(k) in str(k**n))
    print([a(n) for n in range(1, 88)]) # Michael S. Branicky, Jan 25 2022
    

Extensions

a(81) and beyond from Michael S. Branicky, Jan 25 2022

A236046 Smallest number m > 1 such that m^n does not contain m as a substring.

Original entry on oeis.org

2, 2, 2, 11, 2, 3, 3, 11, 3, 3, 2, 11, 2, 11, 2, 11, 11, 3, 2, 14, 2, 2, 7, 11, 2, 3, 3, 11, 11, 12, 14, 11, 2, 2, 2, 11, 11, 2, 3, 14, 2, 13, 12, 11, 2, 11, 12, 11, 3, 14, 11, 11, 2, 3, 11, 11, 12, 11, 11, 14, 12, 11, 2, 11, 12, 11, 11, 13, 11, 13, 13, 18
Offset: 2

Views

Author

Reinhard Zumkeller, Jan 18 2014

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (isInfixOf)
    a236046 n = head [x | x <- [2..], not $ show x `isInfixOf` (show $ x ^ n)]
    
  • PARI
    a(n) = my(k=2); while(#strsplit(Str(k^n), Str(k))!=1, k++); k; \\ Michel Marcus, Jan 25 2022

A378556 Powers of 2 that do not include the digit 2.

Original entry on oeis.org

1, 4, 8, 16, 64, 4096, 16384, 65536, 1048576, 4194304, 8388608, 67108864, 17179869184, 34359738368, 68719476736, 549755813888, 4398046511104, 70368744177664, 18014398509481984, 18446744073709551616, 18889465931478580854784, 9671406556917033397649408, 374144419156711147060143317175368453031918731001856
Offset: 1

Views

Author

Erich Friedman, Nov 30 2024

Keywords

Comments

Any additional terms have exponent at least 10^5.

Crossrefs

Programs

  • Mathematica
    Select[2^Range[0,100000],Not[MemberQ[IntegerDigits[#],2]]&]

Formula

a(n) = 2^A034293(n).
Showing 1-10 of 10 results.