login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A028731 Nonsquares mod 18. 2
2, 3, 5, 6, 8, 11, 12, 14, 15, 17 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Table of n, a(n) for n=1..10.

EXAMPLE

Since 6 is not a perfect square and there is no solution in integers to x^2 = 6 mod 18, 6 is in the sequence.

Although 7 is not a perfect square either, we verify that x^2 = 7 mod 18 does have solutions, such as x = 5, x = 13. Therefore 7 is not in the sequence.

MATHEMATICA

Complement[Range[17], PowerMod[Range[18], 2, 18]] (* Alonso del Arte, Nov 18 2019 *)

PROG

(Scala) val squaresMod18 = (0 to 17).map(n => n * n).map(_ % 18)

(0 to 17).diff(squaresMod18) // Alonso del Arte, Nov 18 2019

(PARI) is(n) = n<18 && !issquare(Mod(n, 18)) \\ Felix Fröhlich, Dec 18 2019

CROSSREFS

Cf. A010380.

Row 18 of A096013.

Sequence in context: A188064 A104424 A028806 * A028740 A028794 A028966

Adjacent sequences:  A028728 A028729 A028730 * A028732 A028733 A028734

KEYWORD

nonn,fini,full

AUTHOR

N. J. A. Sloane

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 19 00:22 EDT 2021. Contains 347549 sequences. (Running on oeis4.)