login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = n^6 mod 42.
0

%I #15 Dec 26 2023 19:54:50

%S 0,1,22,15,22,1,36,7,22,15,22,1,36,1,28,15,22,1,36,1,22,21,22,1,36,1,

%T 22,15,28,1,36,1,22,15,22,7,36,1,22,15,22,1,0,1,22,15,22,1,36,7,22,15,

%U 22,1,36,1,28,15,22,1,36,1,22,21,22,1,36,1,22,15,28,1,36,1,22,15,22,7

%N a(n) = n^6 mod 42.

%H <a href="/index/Rec#order_42">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).

%F a(n) = a(n-42). - _Wesley Ivan Hurt_, Dec 26 2023

%t PowerMod[Range[0,100],6,42] (* or *) PadRight[{},100,{0,1,22,15,22,1,36,7,22,15,22,1,36,1,28,15,22,1,36,1,22,21,22,1,36,1,22,15,28,1,36,1,22,15,22,7,36,1,22,15,22,1}] (* _Harvey P. Dale_, May 01 2022 *)

%o (Sage) [power_mod(n,6,42)for n in range(0, 78)] # _Zerinvary Lajos_, Nov 07 2009

%o (PARI) a(n)=n^6%42 \\ _Charles R Greathouse IV_, Apr 06 2016

%K nonn,easy

%O 0,3

%A _N. J. A. Sloane_, May 13 2002