OFFSET
1,1
COMMENTS
Sequence lists squares of prime numbers that end in 1 or 9.
EXAMPLE
Prime 11*11=121 and 19*19=361; 121 and 361 are terms of this sequence.
Prime 13*13=169 and 17*17=289; 169 and 289 are not terms of this sequence.
MAPLE
seq(ifelse(isprime(n) and (modp(n^2, 30) = 1), n^2, NULL), n = 2..420); # Peter Luschny, Nov 10 2025
MATHEMATICA
Select[Range[360], PrimeQ[#] && Mod[#^2, 30] == 1 &]^2 (* Amiram Eldar, Dec 28 2019 *)
PROG
(PARI) isok(m) = issquare(m) && isprime(sqrtint(m)) && ((m % 30) == 1); \\ Michel Marcus, Dec 26 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Harry E. Neel, Dec 24 2019
EXTENSIONS
a(19) corrected by Georg Fischer, Nov 10 2025
a(35) corrected by Michel Marcus, Nov 10 2025
STATUS
approved
