login
Numbers n such that the decimal expansions of 2^n and 5^n contain no 0's (probably 33 is last term).
(Formerly M0497)
28

%I M0497 #46 Feb 04 2022 09:51:12

%S 0,1,2,3,4,5,6,7,9,18,33

%N Numbers n such that the decimal expansions of 2^n and 5^n contain no 0's (probably 33 is last term).

%C Intersection of A007377 and A008839. - _Lekraj Beedassy_, Jul 27 2004

%C From _Jonathan Vos Post_, Jul 20 2005: (Start)

%C Equivalently, numbers n such that 10^n is the product of two integers without any zero digits.

%C 10^0 = 1 * 1

%C 10^1 = 2 * 5

%C 10^2 = 4 * 25

%C 10^3 = 8 * 125

%C 10^4 = 16 * 625

%C 10^5 = 32 * 3125

%C 10^6 = 64 * 15625

%C 10^7 = 128 * 78125

%C 10^9 = 512 * 1953125

%C 10^18 = 262144 * 3814697265625

%C 10^33 = 8589934592 * 116415321826934814453125. (End)

%C Searched for n up to 10^10. - _David Radcliffe_, Dec 27 2015

%D J. S. Madachy, Madachy's Mathematical Recreation, "#2. Number Toughies", pp. 126-8, Dover NY 1979.

%D C. S. Ogilvy and J. T. Anderson, Excursions in Number Theory. Oxford Univ. Press, 1966, p. 89.

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Leroy C. Dalton & Henry D. Snyder, <a href="http://files.eric.ed.gov/fulltext/ED079163.pdf">Topics for Mathematics Clubs</a>, pp. 68-69, NCTM Reston VA 1983.

%H G. P. Michon, <a href="http://www.numericana.com/answer/numeration.htm#nozero">What two integers without zero digits have a product of 1000000000</a>?

%H C. S. Ogilvy and J. T. Anderson, <a href="/A007496/a007496.pdf">Excursions in Number Theory</a>, Oxford Univ. Press, 1966, p. 89. (Annotated scanned copy).

%H W. Schneider, <a href="/A007496/a007496.html">NoZeros: Powers n^k without Digit Zero</a> [Cached copy]

%p q:= n-> andmap(t-> not 0 in convert(t, base, 10), [2^n, 5^n]):

%p select(q, [$0..40])[]; # _Alois P. Heinz_, Feb 03 2022

%t Range@(10^5) // Select[Last@DigitCount@(5^#) == 0 &] // Select[Last@DigitCount@(2^#) == 0 &] (* _Hans Rudolf Widmer_, Feb 02 2022 *)

%o (PARI) isok(n) = vecmin(digits(2^n)) && vecmin(digits(5^n)); \\ _Michel Marcus_, Dec 28 2015

%Y Cf. A007377, A008839.

%K fini,nonn,full,base

%O 1,3

%A _N. J. A. Sloane_, _Robert G. Wilson v_

%E Edited by _N. J. A. Sloane_, Oct 24 2009 at the suggestion of _M. F. Hasler_