OFFSET
0,11
COMMENTS
EXAMPLE
a(7) = 0 because 2^7 (modulo 5) = 1003, which contains 0 digits 4 plus 0 non-final digits 3 (it has a digit 3, but that digit is finial, meaning rightmost).
a(10) = 3 because 2^10 mod 5 = 13044, which contains 2 digits 4 plus 1 non-final digits 3, so 2 + 1 = 3.
a(60) = 10 because 2^60 mod 5 = 34132411211412413323100401, which contains 5 digits 4 plus 5 non-final digits 3, so 5 + 5 = 10.
MATHEMATICA
f[n_] := Block[{id = IntegerDigits[2^n, 5]}, Count[id, 4] + Count[Most@id, 3]]; Table[ f[n], {n, 0, 88}] (* Robert G. Wilson v *)
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Jonathan Vos Post, Mar 23 2006
EXTENSIONS
More terms from Robert G. Wilson v, Apr 01 2006
STATUS
approved