OFFSET
1,3
COMMENTS
It is an open problem of long standing to show that 86 is the last term.
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
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).
LINKS
W. Schneider, NoZeros: Powers n^k without Digit Zero [Cached copy]
Eric Weisstein's World of Mathematics, Zero
R. G. Wilson, V, Letter to N. J. A. Sloane, Oct. 1993
EXAMPLE
Here is 2^86, conjecturally the largest power of 2 not containing a 0: 77371252455336267181195264. - N. J. A. Sloane, Feb 10 2023
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 *)
PROG
(Magma) [ n: n in [0..50000] | not 0 in Intseq(2^n) ]; // Bruno Berselli, Jun 08 2011
(Perl) use bignum;
for(0..99) {
if((1<<$_) =~ /^[1-9]+$/) {
print "$_, "
}
} # Charles R Greathouse IV, Jun 30 2011
(PARI) for(n=0, 99, if(vecmin(eval(Vec(Str(2^n)))), print1(n", "))) \\ Charles R Greathouse IV, Jun 30 2011
(Haskell)
import Data.List (elemIndices)
a007377 n = a007377_list !! (n-1)
a007377_list = elemIndices 0 a027870_list
-- Reinhard Zumkeller, Apr 30 2013
(Python)
def ok(n): return '0' not in str(2**n)
print(list(filter(ok, range(10**4)))) # Michael S. Branicky, Aug 08 2021
CROSSREFS
KEYWORD
base,nonn
AUTHOR
EXTENSIONS
a(1) = 0 prepended by Reinhard Zumkeller, Apr 30 2013
STATUS
approved