This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A064536 #14 Dec 30 2024 12:51:44 %S A064536 1,3,2,13,20,3,51,87,121,711,1139,3537,8034,15752,27922,49629,33201, %T A064536 35975,143900,136341,545364,2181456,1060135,4240540,16962160,28647197, %U A064536 13597858,205877827,100616667,381266393,1397863922,3825576990,8216376565,14181633879,22366797148 %N A064536 a(n) = (4^n mod 3^n) mod 2^n. %C A064536 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. %H A064536 Harry J. Smith, <a href="/A064536/b064536.txt">Table of n, a(n) for n = 1..200</a> %F A064536 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. %t A064536 Table[Mod[PowerMod[4,n,3^n],2^n],{n,40}] (* _Harvey P. Dale_, Apr 09 2013 *) %o A064536 (PARI) a(n) = { (4^n % 3^n) % 2^n } \\ _Harry J. Smith_, Sep 17 2009 %Y A064536 Cf. A002380, A064853-A064855, A060692, A064628-A064631. %K A064536 nonn %O A064536 1,2 %A A064536 _Labos Elemer_, Oct 08 2001