OFFSET
1,1
EXAMPLE
Take first prime 2, subtract from 5: 5-2=3, distance to 5; take 5-5 = 0; or 4th term, 15-7=8. Sequence may be converted to distance to nearest value of n (absolute value, where n mod 10 = 5) by changing all 8's to 2's and all 6's to 4's.
PROG
(PARI) a(n) = {p = prime(n); k = 0; while ((p+k) % 10 != 5, k++); k; } \\ Michel Marcus, Aug 25 2013
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
STATUS
approved