[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A111256
a(n) = If Prime[n+2]+Prime[n]+1 is prime then Prime[n+2]+Prime[n]+1 else Prime[n+1]+Prime[n]+1.
2
6, 11, 17, 19, 29, 31, 41, 43, 53, 67, 73, 79, 89, 97, 107, 113, 127, 129, 139, 151, 157, 163, 181, 191, 199, 205, 211, 217, 223, 241, 259, 271, 277, 289, 307, 309, 321, 337, 347, 353, 361, 373, 389, 391, 409, 411, 439, 451, 461, 463, 473, 491, 499, 509, 521
OFFSET
1,1
COMMENTS
A switch between two sums of primes when the alternating sum is not prime then a direct sequence prime sum is switched.
LINKS
MATHEMATICA
a=Table[If[PrimeQ[Prime[n + 2] + Prime[n] + 1], Prime[n + 2] + Prime[n] + 1, Prime[n + 1] + Prime[n] + 1], {n, 1, 200}]
If[PrimeQ[#[[3]]+#[[1]]+1], #[[3]]+#[[1]]+1, #[[2]]+#[[1]]+1]&/@Partition[ Prime[ Range[ 100]], 3, 1] (* Harvey P. Dale, Jun 10 2022 *)
CROSSREFS
Sequence in context: A284293 A117800 A118847 * A315506 A315507 A315508
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Nov 01 2005
STATUS
approved