login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A351872 Numbers k such that either k-1 or k/2 is prime, but not both. 0
3, 8, 10, 12, 18, 20, 22, 24, 26, 30, 32, 34, 42, 44, 46, 48, 54, 58, 60, 68, 72, 80, 82, 84, 86, 90, 94, 98, 102, 104, 106, 108, 110, 114, 118, 122, 128, 132, 134, 138, 140, 142, 146, 150, 152, 164, 166, 168, 174, 178, 180, 182, 192, 198, 200, 202, 206, 212, 214, 218, 224, 226 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Numbers k with exactly 1 divisor d such that k-d is prime.
LINKS
MATHEMATICA
Select[Range[250], Xor @@ PrimeQ[{#-1, #/2}] &] (* Amiram Eldar, Feb 23 2022 *)
Select[Range[250], Total[Boole[PrimeQ[{#-1, #/2}]]]==1&] (* Harvey P. Dale, Nov 05 2023 *)
PROG
(PARI) isok(k) = bitxor(isprime(k-1), !(k%2) && isprime(k/2)); \\ Michel Marcus, Feb 23 2022
CROSSREFS
Cf. A351863.
Sequence in context: A327308 A350667 A287371 * A226641 A212966 A074186
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Feb 22 2022
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 18 22:11 EDT 2024. Contains 375284 sequences. (Running on oeis4.)