The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A048199 Distance of primes to next odd multiple of 5 (where n mod 10 = 5), 1
3, 2, 0, 8, 4, 2, 8, 6, 2, 6, 4, 8, 4, 2, 8, 2, 6, 4, 8, 4, 2, 6, 2, 6, 8, 4, 2, 8, 6, 2, 8, 4, 8, 6, 6, 4, 8, 2, 8, 2, 6, 4, 4, 2, 8, 6, 4, 2, 8, 6, 2, 6, 4, 4, 8, 2, 6, 4, 8, 4, 2, 2, 8, 4, 2, 8, 4, 8, 8, 6, 2, 6, 8, 2, 6, 2, 6, 8, 4, 6, 6, 4, 4, 2, 6, 2, 6, 8, 4, 2, 8, 6, 8, 4, 6, 2, 6, 4, 2, 4, 8, 8, 2, 6, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
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
Sequence in context: A173787 A116191 A257303 * A335998 A152441 A248181
KEYWORD
easy,nonn
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 4 08:15 EDT 2024. Contains 373092 sequences. (Running on oeis4.)