login
Squares mod 30.
7

%I #27 Nov 30 2019 16:45:24

%S 0,1,4,6,9,10,15,16,19,21,24,25

%N Squares mod 30.

%C Range of A070452; a(k) + a(13-k) = 25, 1 <= k <= 12. - _Reinhard Zumkeller_, Apr 24 2009

%e 3^2 = 9, so 9 is in the sequence.

%e 10^2 and 20^2 are both congruent to 10 mod 30, so 10 is in the sequence.

%e There are no solutions to x^2 = 11 mod 30, so 11 is not in the sequence.

%t Union[PowerMod[Range[30], 2, 30]] (* _Alonso del Arte_, Jan 30 2018 *)

%o (Sage) [quadratic_residues(30)] # _Zerinvary Lajos_, May 24 2009

%o (Scala) (1 to 30).map(n => n * n).map(_ % 30).toSet.toSeq.sorted // _Alonso del Arte_, Nov 30 2019

%Y Cf. A010378, A010382, A010421. - _Reinhard Zumkeller_, Apr 24 2009

%Y Row 30 of A096008.

%Y Cf. A028743.

%K nonn,fini,full

%O 1,3

%A _N. J. A. Sloane_