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.

A159852 n^2 mod 60.

Original entry on oeis.org

0, 1, 4, 9, 16, 25, 36, 49, 4, 21, 40, 1, 24, 49, 16, 45, 16, 49, 24, 1, 40, 21, 4, 49, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 49, 4, 21, 40, 1, 24, 49, 16, 45, 16, 49, 24, 1, 40, 21, 4, 49, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 49, 4, 21, 40, 1, 24, 49, 16, 45, 16, 49, 24, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 24 2009

Keywords

Comments

Periodic with period 30: a(n+30) = a(n);
a(15*n+k) = a(15*n-k) for k<=15*n;
a(m*n) = a(m)*a(n) mod 60;
A010421 gives the range of this sequence.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},{0, 1, 4, 9, 16, 25, 36, 49, 4, 21, 40, 1, 24, 49, 16, 45, 16, 49, 24, 1, 40, 21, 4, 49, 36, 25, 16, 9, 4, 1},80] (* Ray Chandler, Aug 26 2015 *)
    PowerMod[Range[0,80],2,60] (* or *) PadRight[{},80,{0,1,4,9,16,25,36,49,4,21,40,1,24,49,16,45,16,49,24,1,40,21,4,49,36,25,16,9,4,1}] (* Harvey P. Dale, Jun 19 2018 *)
  • PARI
    a(n)=n^2%60 \\ Charles R Greathouse IV, May 09 2013