A194991 Primes whose squares are odious.
2, 5, 7, 11, 17, 19, 23, 29, 31, 41, 43, 59, 67, 71, 79, 89, 97, 101, 103, 113, 127, 131, 139, 149, 157, 163, 167, 173, 179, 181, 193, 197, 223, 227, 229, 239, 251, 257, 263, 271, 283, 307, 313, 349, 353, 373, 379, 383, 389, 401, 409, 421, 431, 433, 439, 449, 457, 467, 479, 487, 509, 523, 547, 563
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..5240
Programs
-
Magma
[p : p in PrimesInInterval(2, 600) |IsOdd(&+Intseq(p^2, 2))]; // Vincenzo Librandi, Dec 15 2018
-
Mathematica
Select[Prime@ Range@ 120, OddQ@ First@ DigitCount[#^2, 2] &] (* Amiram Eldar, Dec 14 2018 after Michael De Vlieger at A027697 *)
-
PARI
isok(p) = isprime(p) && (hammingweight(p^2) % 2); \\ Michel Marcus, Dec 14 2018
Comments