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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A330310 Let p = prime(n); a(n) = (p-1)/2 if that is prime, or (p+1)/2 if that is prime, and otherwise p itself. 2
 2, 2, 2, 3, 5, 7, 17, 19, 11, 29, 31, 19, 41, 43, 23, 53, 29, 31, 67, 71, 37, 79, 41, 89, 97, 101, 103, 53, 109, 113, 127, 131, 137, 139, 149, 151, 79, 163, 83, 173, 89, 181, 191, 97, 197, 199, 211, 223, 113, 229, 233, 239, 241, 251, 257, 131, 269, 271, 139 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Rémy Sigrist, Table of n, a(n) for n = 1..25000 MAPLE a:=[2]; for n from 2 to 80 do p:=ithprime(n); if isprime((p-1)/2) then t:=(p-1)/2; elif isprime((p+1)/2) then t:=(p+1)/2 else t:=p; fi; a:=[op(a), t]; od: a; PROG (PARI) a(n) = { my (p=prime(n), q); if (p%2, if (isprime(q=(p-1)/2), return (q), isprime(q=(p+1)/2), return (q))); return (p) } \\ Rémy Sigrist, Dec 11 2019 CROSSREFS Suggested by A328686. Sequence in context: A014208 A243358 A059690 * A121256 A022867 A268595 Adjacent sequences:  A330307 A330308 A330309 * A330311 A330312 A330313 KEYWORD nonn AUTHOR N. J. A. Sloane, Dec 10 2019 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.

Last modified June 14 10:04 EDT 2021. Contains 345025 sequences. (Running on oeis4.)