OFFSET
1,2
COMMENTS
A generalization of A002380. It arises also as a coefficient (=c1) of 1^n=1 in a special (greedy) decomposition of 4^n into like powers as follows: 4^n = c3*3^n + c2*2^n + c1*1^n.
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..200
FORMULA
n = 7: 4^7 = 16384 = 7*2187 + 8*128 + 51*1 where a(7)=51, the last coefficient; A064630(7) = 7 + 8 + a(7) = 66.
MATHEMATICA
Table[Mod[PowerMod[4, n, 3^n], 2^n], {n, 40}] (* Harvey P. Dale, Apr 09 2013 *)
PROG
(PARI) { for (n=1, 200, write("b064536.txt", n, " ", (4^n % 3^n) % 2^n) ) } \\ Harry J. Smith, Sep 17 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Oct 08 2001
STATUS
approved