login
A374146
a(n) = prime(g) mod g where prime gap g = prime(n+1) - prime(n).
0
0, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 3, 1, 1, 3, 1, 3, 3, 1, 3, 1, 3, 1, 3, 1, 1, 9, 1, 1, 1, 3, 1, 1, 1, 9, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 9, 1, 1, 1, 1, 1, 3, 1, 9, 1, 3, 1, 3, 1, 1, 9, 1, 3, 1, 3, 1, 1, 3, 1, 3, 3, 3, 9, 1, 9, 1, 1, 3, 1, 3, 3, 1, 3, 1, 3, 3, 3, 3, 1, 1, 1, 7
OFFSET
1,4
FORMULA
a(n) = A004648(A001223(n)).
EXAMPLE
a(4) = prime(11 - 7) mod (11 - 7) = 7 mod 4 = 3.
MATHEMATICA
a[n_]:=Mod[Prime[Prime[n+1]-Prime[n]], Prime[n+1]-Prime[n]]; Array[a, 99] (* Stefano Spezia, Jun 29 2024 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zachary Marino, Jun 28 2024
STATUS
approved