login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A070471 a(n) = n^3 mod 5. 3

%I #39 Feb 21 2023 11:27:50

%S 0,1,3,2,4,0,1,3,2,4,0,1,3,2,4,0,1,3,2,4,0,1,3,2,4,0,1,3,2,4,0,1,3,2,

%T 4,0,1,3,2,4,0,1,3,2,4,0,1,3,2,4,0,1,3,2,4,0,1,3,2,4,0,1,3,2,4,0,1,3,

%U 2,4,0,1,3,2,4,0,1,3,2,4,0,1,3,2,4,0,1,3,2,4,0,1,3,2,4,0,1,3,2,4,0

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

%C Also, a(n) = n^7 mod 5 since 7 == 3 (mod 5-1).

%C Decimal expansion of 1324/99999. - _Vincenzo Librandi_, Dec 09 2010

%H Vincenzo Librandi, <a href="/A070471/b070471.txt">Table of n, a(n) for n = 0..200</a>

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

%F G.f.: -x*(1+3*x+2*x^2+4*x^3) / ( (x-1)*(1+x+x^2+x^3+x^4) ). - _R. J. Mathar_, Dec 10 2010

%F a(n) = a(n-5). - _G. C. Greubel_, Mar 26 2016

%t CoefficientList[Series[-x (1 + 3 x + 2 x^2 + 4 x^3)/((x - 1) (1 + x + x^2 + x^3 + x^4)), {x, 0, 100}], x] (* _Vincenzo Librandi_, May 21 2014 *)

%t PowerMod[Range[0, 100], 3, 5] (* _G. C. Greubel_, Mar 26 2016 *)

%t Table[If[Mod[n, 5] == 0, 0, ModularInverse[n, 5]], {n, 0, 100}] (* _Jean-François Alcover_, May 03 2017 *)

%o (Sage) [power_mod(n,3,5) for n in (0..101)] # _Zerinvary Lajos_, Oct 29 2009

%o (PARI) x='x+O('x^99); concat(0, Vec(-x*(1+3*x+2*x^2+4*x^3)/((x-1)*(1+x+x^2+x^3+x^4)))) \\ _Altug Alkan_, Mar 27 2016

%K nonn,easy

%O 0,3

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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 09:18 EDT 2024. Contains 371935 sequences. (Running on oeis4.)