OFFSET
2,5
COMMENTS
Each '1' begins a row.
Row lengths are A046073. - Geoffrey Critzer, Jan 02 2015
LINKS
Eric Weisstein's World of Mathematics, Quadratic Residue
EXAMPLE
1;
1;
1;
1,4;
1;
1, 2, 4;
1;
1, 4, 7;
1, 9;
1, 3, 4, 5, 9;
1;
1, 3, 4, 9, 10, 12;
1, 9, 11;
1, 4;
MATHEMATICA
Table[Union[Mod[Select[Range[n], CoprimeQ[#, n] &]^2, n]], {n, 2, 20}] // Grid (* Geoffrey Critzer, Jan 02 2015 *)
PROG
(PARI) maybesqgcd1(n) = { for(x=2, n, b=floor(x/2); a=vector(b+1); for(y=1, b, z=y^2%x; if(z<>0, a[y]=z; ) ); s=vecsort(a); c=1; for(j=2, b+1, if(s[j]<>s[j-1], c++; if(gcd(x, s[j])==1, print1(s[j]", ")) ) ); ) }
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Cino Hilliard, Jul 21 2004
EXTENSIONS
Edited by Don Reble, Apr 16 2007
STATUS
approved