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.

A053879 a(n) = n^2 mod 7.

This page as a plain text file.
%I A053879 #61 Jul 02 2025 16:01:59
%S A053879 0,1,4,2,2,4,1,0,1,4,2,2,4,1,0,1,4,2,2,4,1,0,1,4,2,2,4,1,0,1,4,2,2,4,
%T A053879 1,0,1,4,2,2,4,1,0,1,4,2,2,4,1,0,1,4,2,2,4,1,0,1,4,2,2,4,1,0,1,4,2,2,
%U A053879 4,1,0,1,4,2,2,4,1,0,1,4,2,2,4,1,0,1,4,2,2,4,1,0,1,4,2,2,4,1,0,1,4,2,2,4,1
%N A053879 a(n) = n^2 mod 7.
%H A053879 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,1).
%F A053879 Periodic with period 7.
%F A053879 G.f.: -x*(1+x)*(x^4 + 3*x^3 - x^2 + 3*x + 1) / ( (x-1)*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6) ). - _R. J. Mathar_, Feb 24 2011
%t A053879 Table[Mod[n^2,7],{n,0,200}] (* _Vladimir Joseph Stephan Orlovsky_, Apr 21 2011 *)
%t A053879 LinearRecurrence[{0, 0, 0, 0, 0, 0, 1},{0, 1, 4, 2, 2, 4, 1},105] (* _Ray Chandler_, Aug 26 2015 *)
%t A053879 PowerMod[Range[0,120],2,7] (* or *) PadRight[{},120,{0,1,4,2,2,4,1}] (* _Harvey P. Dale_, Sep 01 2017 *)
%o A053879 (PARI) a(n)=n^2%7 \\ _Charles R Greathouse IV_, Jun 11 2015
%Y A053879 Cf. A070430, A070431.
%K A053879 nonn,easy
%O A053879 0,3
%A A053879 Stuart M. Ellerstein (ellerstein(AT)aol.com), Apr 01 2000
%E A053879 More terms from _James Sellers_, Apr 08 2000