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.

A047210 Largest square modulo n.

This page as a plain text file.
%I A047210 #18 Feb 16 2025 08:32:39
%S A047210 0,1,1,1,4,4,4,4,7,9,9,9,12,11,10,9,16,16,17,16,18,20,18,16,24,25,25,
%T A047210 25,28,25,28,25,31,33,30,28,36,36,36,36,40,39,41,37,40,41,42,36,46,49,
%U A047210 49,49,52,52,49,49,55,57,57,49,60,59,58,57,64,64,65,64,64,65,64,64,72
%N A047210 Largest square modulo n.
%H A047210 T. D. Noe, <a href="/A047210/b047210.txt">Table of n, a(n) for n=1..1000</a>
%H A047210 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/QuadraticResidue.html">Quadratic Residue</a>
%t A047210 Table[r=Range[n]; Max[Mod[r^2, n]], {n, 100}] (* _T. D. Noe_, Dec 18 2008 *)
%t A047210 Table[r = Range[1 + n/2]; Max[Mod[r^2, n]], {n, 100}] (* _Zak Seidov_, Dec 18 2008 *)
%o A047210 Contribution from _Michael B. Porter_, May 04 2010: (Start)
%o A047210 (PARI) residue(n,m)={local(r);r=0;for(i=0,floor(m/2),if(i^2%m==n,r=1));r}
%o A047210 A047210(n)={local(r,m);r=0;m=n;while(r==0,m=m-1;if(residue(m,n),r=1));m} (End)
%Y A047210 Last elements of rows of A096008.
%K A047210 easy,nonn
%O A047210 1,5
%A A047210 _Henry Bottomley_, Jun 08 2000