login
a(n) = (4^n-1)/3 mod n.
2

%I #9 Feb 18 2023 22:48:51

%S 0,1,0,1,1,3,1,5,0,5,1,9,1,5,6,5,1,9,1,5,0,5,1,21,16,5,0,1,1,15,1,21,

%T 21,5,26,9,1,5,21,5,1,21,1,41,36,5,1,21,22,25,21,33,1,27,11,5,21,5,1,

%U 45,1,5,0,21,16,45,1,17,21,15,1,45,1,5,66,9,5,39,1,5,0,5,1,21,1,5,21,21,1,45

%N a(n) = (4^n-1)/3 mod n.

%H Antti Karttunen, <a href="/A094919/b094919.txt">Table of n, a(n) for n = 1..20000</a>

%t Table[Mod[(4^n-1)/3,n],{n,100}] (* _Harvey P. Dale_, Apr 11 2013 *)

%o (PARI) A094919(n) = ((((4^n)-1)/3)%n); \\ _Antti Karttunen_, Feb 18 2023

%Y Cf. also A094922.

%K nonn

%O 1,6

%A _N. J. A. Sloane_, Jun 18 2004