Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #14 Aug 26 2015 10:17:52
%S 0,2,6,5,6,2,0,0,2,6,5,6,2,0,0,2,6,5,6,2,0,0,2,6,5,6,2,0,0,2,6,5,6,2,
%T 0,0,2,6,5,6,2,0,0,2,6,5,6,2,0,0,2,6,5,6,2,0,0,2,6,5,6,2,0,0,2,6,5,6,
%U 2,0,0,2,6,5,6,2,0,0,2,6,5,6,2,0,0,2,6,5,6,2,0,0,2,6,5,6,2,0,0,2,6,5,6,2,0
%N n^2+n modulo 7.
%C Pronic residues (mod m) are analogous to quadratic residues.
%C Periodic with period 7.
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 0, 1).
%t Table[Mod[n^2+n,7],{n,0,120}] (* _Harvey P. Dale_, Aug 26 2012 *)
%t LinearRecurrence[{0, 0, 0, 0, 0, 0, 1},{0, 2, 6, 5, 6, 2, 0},105] (* _Ray Chandler_, Aug 26 2015 *)
%o (PARI) A053793(n)=[0, 2, 6, 5, 6, 2, 0][n%7+1] \\ - _M. F. Hasler_, Aug 27 2012
%K nonn,easy
%O 0,2
%A Stuart M. Ellerstein (ellerstein(AT)aol.com), Mar 27 2000
%E More terms from _James A. Sellers_, Apr 08 2000