cp's OEIS Frontend

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.

A204671 a(n) = n^n (mod 6).

This page as a plain text file.
%I A204671 #39 Sep 08 2022 08:46:01
%S A204671 1,1,4,3,4,5,0,1,4,3,4,5,0,1,4,3,4,5,0,1,4,3,4,5,0,1,4,3,4,5,0,1,4,3,
%T A204671 4,5,0,1,4,3,4,5,0,1,4,3,4,5,0,1,4,3,4,5,0,1,4,3,4,5,0,1,4,3,4,5,0,1,
%U A204671 4,3,4,5,0,1,4,3,4,5,0,1,4,3,4,5,0,1,4
%N A204671 a(n) = n^n (mod 6).
%C A204671 For n>0, periodic with period 6 = A174824: repeat [1, 4, 3, 4, 5, 0].
%H A204671 Andrew Howroyd, <a href="/A204671/b204671.txt">Table of n, a(n) for n = 0..1000</a>
%H A204671 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,1).
%F A204671 G.f.: (x^6-5*x^5-4*x^4-3*x^3-4*x^2-x-1)/((x-1)*(x+1)*(x^2-x+1)*(x^2+x+1)). [_Colin Barker_, Jul 20 2012]
%F A204671 From _Wesley Ivan Hurt_, Jun 23 2016: (Start)
%F A204671 a(n) = a(n-6) for n>5.
%F A204671 a(0) = 1, a(n) = (17 - cos(n*Pi) - 8*cos(n*Pi/3) - 8*cos(2*n*Pi/3) - 4*sqrt(3)*sin(n*Pi/3) - 4*sqrt(3)*sin(2*n*Pi/3))/6 for n>0. (End)
%F A204671 a(n) = A010875(A000312(n)). - _Michel Marcus_, Jun 27 2016
%p A204671 A204671:=n->[1, 4, 3, 4, 5, 0][(n mod 6)+1]: 1, seq(A204671(n), n=0..100); # _Wesley Ivan Hurt_, Jun 23 2016
%t A204671 Table[PowerMod[n,n,6], {n,0,140}]
%t A204671 Join[{1},LinearRecurrence[{0, 0, 0, 0, 0, 1},{1, 4, 3, 4, 5, 0},86]] (* _Ray Chandler_, Aug 26 2015 *)
%o A204671 (Magma) [1] cat &cat [[1, 4, 3, 4, 5, 0]^^20]; // _Wesley Ivan Hurt_, Jun 23 2016
%o A204671 (PARI) a(n)=lift(Mod(n, 6)^n) \\ _Andrew Howroyd_, Feb 25 2018
%Y A204671 Cf. A000312, A010875, A174824, A204690.
%K A204671 nonn,easy
%O A204671 0,3
%A A204671 _José María Grau Ribas_, Jan 18 2012