%I #31 Feb 25 2024 05:59:33
%S 2,3,7,5,19,5,11,5,13,11,2,11,11,13,13,11,43,11,47,29,11,31,101,7,3,3,
%T 5,5,7,7,59,29,61,31,61,29,139,103,67,67,67,29,67,71,73,31,71,17,67,
%U 71,73,73,607,19,73,17,73,19,313,19,83,17,71,73,337,13,71
%N a(n) = least prime p such that n divides p + prime(n).
%C This sequence was inspired by A134204.
%C The logarithmic scatterplot of the sequence has interesting features (see Links section).
%C We observe runs of consecutive equal terms:
%C - first pair: a(12) = a(13) = 11,
%C - first triple: a(39) = a(40) = a(41) = 67,
%C - first quadruple: a(24980) = a(24981) = a(24982) = a(24983) = 12983.
%C a(1) = prime(1).
%C a(2) = prime(2).
%H Rémy Sigrist, <a href="/A294639/b294639.txt">Table of n, a(n) for n = 1..10000</a>
%H Rémy Sigrist, <a href="/A294639/a294639.png">Logarithmic scatterplot of the sequence for n=1..50000</a>
%H Rémy Sigrist, <a href="/A294639/a294639_1.png">Colored logarithmic scatterplot of the sequence for n=1..50000</a> (where the color is function of (a(n) + prime(n))/n)
%e For n=3:
%e - prime(3) = 5,
%e - 3 does not divide 2 + 5,
%e - 3 does not divide 3 + 5,
%e - 3 does not divide 5 + 5,
%e - 3 divides 7 + 5,
%e - hence a(3) = 7.
%o (PARI) a(n) = my (q=prime(n)); forprime(p=2,, if ((p+q)%n==0, return (p)))
%Y Cf. A134204, A254862.
%K nonn,look
%O 1,1
%A _Rémy Sigrist_, Nov 05 2017