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”).

A378201
a(n) = 2*n mod q, where q is the greatest prime such that 2*n - q is also prime.
0
0, 0, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 5, 7, 3, 3, 5, 7, 3, 5, 3, 3, 5, 3, 5, 7, 3, 5, 7, 3, 3, 5, 7, 3, 5, 3, 3, 5, 7, 3, 5, 3, 5, 7, 3, 5, 7, 19, 3, 5, 3, 3, 5, 3, 3, 5, 3, 5, 7, 13, 11, 13, 19, 3, 5, 3, 5, 7, 3, 3, 5, 7, 11, 11, 3, 3, 5, 7, 3, 5, 7, 3, 5, 3, 5, 7, 3, 5, 7, 3, 3, 5, 7, 11, 11, 3, 3, 5
OFFSET
2,3
MATHEMATICA
Table[Module[{p = 2, q},
While[True, q = 2 n - p; If[PrimeQ[p] && PrimeQ[q], Break[]];
p = NextPrime[p]]; Mod[2 n, q]], {n, 2, 100}]
CROSSREFS
Cf. A002373.
Sequence in context: A206550 A284723 A190911 * A204903 A054906 A269733
KEYWORD
nonn,new
AUTHOR
STATUS
approved