login

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”).

A070452
a(n) = n^2 mod 30.
11
0, 1, 4, 9, 16, 25, 6, 19, 4, 21, 10, 1, 24, 19, 16, 15, 16, 19, 24, 1, 10, 21, 4, 19, 6, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 6, 19, 4, 21, 10, 1, 24, 19, 16, 15, 16, 19, 24, 1, 10, 21, 4, 19, 6, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 6, 19, 4, 21, 10, 1, 24, 19, 16, 15, 16, 19, 24, 1
OFFSET
0,3
COMMENTS
Equivalently, n^6 mod 30. - Ray Chandler, Dec 27 2023
LINKS
Index entries for linear recurrences with constant coefficients, signature (-1, 0, 1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, 1).
FORMULA
From Reinhard Zumkeller, Apr 24 2009: (Start)
a(m*n) = a(m)*a(n) mod 30.
a(15*n+k) = a(15*n-k) for k<=15*n.
a(n+30) = a(n). (End)
a(n)= -a(n-1) +a(n-3) +a(n-4) -a(n-6) -a(n-7) +a(n-9) +a(n-10) -a(n-12) -a(n-13) +a(n-15) +a(n-16) -a(n-18) -a(n-19) +a(n-21) +a(n-22) -a(n-24) -a(n-25) +a(n-27) +a(n-28). - R. J. Mathar, Jul 23 2009
MATHEMATICA
Table[Mod[n^2, 30], {n, 0, 200}] (* Vladimir Joseph Stephan Orlovsky, Apr 27 2011 *)
LinearRecurrence[{-1, 0, 1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, 1}, {0, 1, 4, 9, 16, 25, 6, 19, 4, 21, 10, 1, 24, 19, 16, 15, 16, 19, 24, 1, 10, 21, 4, 19, 6, 25, 16, 9}, 80] (* Ray Chandler, Aug 26 2015 *)
PowerMod[Range[0, 80], 6, 30] (* or *) PadRight[{}, 80, {0, 1, 4, 9, 16, 25, 6, 19, 4, 21, 10, 1, 24, 19, 16, 15, 16, 19, 24, 1, 10, 21, 4, 19, 6, 25, 16, 9, 4, 1}] (* Harvey P. Dale, Jul 10 2023 *)
PROG
(Sage) [power_mod(n, 2, 30)for n in range(0, 75)] # Zerinvary Lajos, Nov 03 2009
(PARI) a(n)=n^2%30 \\ Charles R Greathouse IV, Oct 07 2015
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 12 2002
STATUS
approved