login
A212790
(prime(n) + n) mod (prime(n) - n).
0
0, 0, 0, 2, 4, 5, 4, 5, 4, 1, 2, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128
OFFSET
1,4
FORMULA
a(n) = (p(n)+n) modulo (p(n)-n) = (2*n) modulo (p(n)-n).
a(n) = 2*n for n > 11 because prime(n) > 3*n for n > 11.
MATHEMATICA
f[n_] := Block[{p = Prime[n]}, Mod[p + n, p - n]]; Array[f, 64] (* Robert G. Wilson v, May 27 2012 *)
CROSSREFS
Sequence in context: A334422 A317499 A004581 * A317558 A070784 A200289
KEYWORD
nonn
AUTHOR
Zak Seidov, May 27 2012
STATUS
approved