Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #25 Nov 16 2024 15:02:52
%S 2,31,3,5,7,3067,89,307,11,3049,13,313,19,23539,3023,269,223,17,251,
%T 23497,29,23,37,41,911,59,43,47,61,1303051,79,73,107,2647,811,109,113,
%U 2671,2663,2683,787,1303091,53,2609,8059,2621,67,2591,71,23431,2693,2699
%N a(n) is the smallest prime not yet in the sequence such that pi(a(n)) divides the sum a(n) + n, or -1 if no such prime exists.
%C The defining question is, what is the next term after a(1) = 2, that must be the smallest odd prime not yet used, to which adding that term's index n, that sum is divisible by the index of that fitting prime number, pi(a(n))?
%e a(2) = 31 because 31 + 2 = 33, and since 31 is the 11th prime, pi(31) = 11, which divides 33, and there is no smaller prime than 31 which satisfies that condition.
%e a(7) = 89 because 89 + 7 = 96, and since 89 is the 24th prime, pi(89) = 24, which divides 96, and there is no smaller prime than 89 which satisfies that condition.
%Y Cf. A000040, A000720.
%K sign
%O 1,1
%A _Tamas Sandor Nagy_, Nov 07 2024