login
A181610
The last n digits of powers of 2 start cycling. a(n) is the number of zero-free terms in this cycle.
1
4, 18, 81, 364, 1638, 7371, 33170, 149268, 671701, 3022653, 13601945, 61208743, 275439346, 1239477074, 5577646830, 25099410745, 112947348510, 508263067945, 2287183805359, 10292327123878, 46315472056678, 208419624257654, 937888309161430, 4220497391215744
OFFSET
1,1
LINKS
Hiroaki Yamanouchi, Table of n, a(n) for n = 1..26
EXAMPLE
The last two digits of powers of two cycle through 20 terms (A000855): 04, 08, 16, 32, 64, 28, 56, 12, 24, 48, 96, 92, 84, 68, 36, 72, 44, 88, 76, 52. Out of those 18 do not contain a zero. Hence a(2) = 18.
MATHEMATICA
f[n_] := Block[{c = 0, k = n, lmt = n + 4*5^(n - 1)},
While[k < lmt, m = PowerMod[2, k, 10^n];
If[m >= 10^(n - 1) && !MemberQ[ IntegerDigits@ m, 0], c++ ]; k++ ]; c];
Array[ f, 11] (* Robert G. Wilson v, Jan 30 2011 *)
CROSSREFS
The corresponding cycle length is A005054. See A126605 for n=3.
Sequence in context: A252823 A264191 A257060 * A264927 A257059 A194460
KEYWORD
nonn,base
AUTHOR
Tanya Khovanova, Jan 30 2011
EXTENSIONS
a(8)-a(11) from Robert G. Wilson v, Jan 30 2011
a(12)-a(24) from Hiroaki Yamanouchi, Mar 21 2015
STATUS
approved