OFFSET
1,1
COMMENTS
This sequence was inspired by A134204.
The logarithmic scatterplot of the sequence has interesting features (see Links section).
We observe runs of consecutive equal terms:
- first pair: a(12) = a(13) = 11,
- first triple: a(39) = a(40) = a(41) = 67,
- first quadruple: a(24980) = a(24981) = a(24982) = a(24983) = 12983.
a(1) = prime(1).
a(2) = prime(2).
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, Logarithmic scatterplot of the sequence for n=1..50000
Rémy Sigrist, Colored logarithmic scatterplot of the sequence for n=1..50000 (where the color is function of (a(n) + prime(n))/n)
EXAMPLE
For n=3:
- prime(3) = 5,
- 3 does not divide 2 + 5,
- 3 does not divide 3 + 5,
- 3 does not divide 5 + 5,
- 3 divides 7 + 5,
- hence a(3) = 7.
PROG
(PARI) a(n) = my (q=prime(n)); forprime(p=2, , if ((p+q)%n==0, return (p)))
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Rémy Sigrist, Nov 05 2017
STATUS
approved