login
Index of prime(n) in A067836, or -1 if prime(n) does not occur in it.
1

%I #11 Oct 15 2023 11:59:17

%S 1,2,3,4,6,5,7,8,9,12,13,10,19,14,20,16,26,42,18,25,11,15,17,43,118,

%T 33,24,31,29,212,40,68,30,98,22,45,34,109,28,39,21,23,46,143,27,35,37,

%U 55,47,123,58,90,132,32,139,91,41,44,38,52,36,77,54,48,53,83,51

%N Index of prime(n) in A067836, or -1 if prime(n) does not occur in it.

%C All terms in A067836 are distinct, making this sequence defined.

%C If the conjecture holds that A067836 contains only primes, then a(A062894(n)) = n.

%C If all primes eventually occur in A067836, then all terms in this sequence are positive and A062894(a(n)) = n.

%o (Python)

%o from itertools import count

%o from sympy import prime, nextprime

%o def A364824(n):

%o a, f, p = 2, 1, prime(n)

%o for i in count(1):

%o if a == p:

%o return i

%o a=nextprime((f:=f*a)+1)-f # _Chai Wah Wu_, Sep 09 2023

%Y Cf. A062894, A067836.

%K nonn

%O 1,2

%A _Bert Dobbelaere_, Aug 09 2023