Get the latest tech news

Powers of 2 with all even digits


OFFSET 1,1 COMMENTS Are there any more terms in this sequence? Evidence that the sequence may be finite, from Rick L. Shepherd, Jun 23 2002: 1) The sequence of last two digits of 2^n, A000855 of period 20, makes clear that 2^n > 4 must have n == 3, 6, 10, 11, or 19 (mod 20) for 2^n to be a member of this sequence.

(The clear runner-up, 2^34966, a 10526-digit number, required searching only to the 15th digit. *) f[n_] := Module[{ a, l, r, i}, a = IntegerDigits[n]; l = Length[a]; r = True; For[i = 1, i <= l, i++, If[Mod[a[[i]], 2] == 1, r = False; Break[ ]]]; r] (*main routine*) Do[p = 2^i; If[f[p], Print[p]], {i, 1, 10^4}] Select[2^Range[0, 100], Union[Take[DigitCount[#], {1, -1, 2}]]=={0}&] (* Harvey P. Dale, Dec 25 2012 *)

Get the Android app

Or read this on Hacker News

Read more on:

Photo of powers

powers

Photo of digits

digits

Related news:

News photo

NOAA's public weather data powers the local forecasts on your phone and TV

News photo

'Robot blood' powers soft-bodied jellyfish and worm robots

News photo

Why the World’s Powers Are Locked in a Battle Over Computer Chips