login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = 5^n mod 4^n.
8

%I #22 Oct 04 2017 02:09:19

%S 0,1,9,61,113,53,3337,12589,62945,118117,328441,2690781,9259601,

%T 12743573,197935593,452807053,2264035265,7025209029,35126045145,

%U 106910748989,809431651889,1848135003893,9240675019465,28611189052909,213424689442209,785648470500389

%N a(n) = 5^n mod 4^n.

%H Seiichi Manyama, <a href="/A138589/b138589.txt">Table of n, a(n) for n = 0..1661</a>

%t Table[PowerMod[5, n, 4^n], {n,0,50}] (* _G. C. Greubel_, Oct 01 2017 *)

%o (PARI) concat([0], vector(50, n, lift(Mod(5, 4^n)^n))) \\ _Michel Marcus_, Oct 02 2017

%Y Cf. k^n mod (k-1)^n: A002380 (k=3), A064629 (k=4), this sequence (k=5), A138649 (k=6), A139786 (k=7), A138973 (k=8), A139733 (k=9).

%K nonn

%O 0,3

%A _N. J. A. Sloane_, May 20 2008