%I #15 Feb 26 2022 21:15:58
%S 7,7,1,7,18,10,3,4,11,7,8,8,10,7,3,13,8,6,7,8,6,4,7,8,9,4,6,3,4,11,5,
%T 8,3,4,4,8,8,13,3,10,21,15,6,8,3,4,13,5,3,4,8,14,6,10,3,6,12,6,10,6,6,
%U 13,8,4,6,3,11,5,3,4,13,6,10,8,4,26,8,7,11,4,7,10,7,5,4,7,16,8,7,9,3,5,5,6
%N a(n) is the position of the prime 5 in the Euclid-Mullin (EM) sequence of type A000945, if it were started with prime(n) instead of 2.
%C a(38) = 13 because prime(38) = 163 and the corresponding EM sequence is {163, 2, 3, 11, 7, 75307, 3931, 5399, 3041, 409, 179, 92958641873, 5, 2003, ...}, where 5 appears at the 13th position. - _David Wasserman_, Apr 19 2007
%H David Wasserman, Apr 19 2007, <a href="/A093781/b093781.txt">Table of n, a(n) for n = 1..1000</a>
%o (PARI) em(i) = local(p, c, n, f, q); p = prime(i); if (p == 5, return(1)); c = 1; n = p; while (1, c++; f = factor(n + 1, 2^31 - 1); q = f[1, 1]; if (!isprime(q), f = factor(n + 1); q = f[1, 1]); if (q == 5, return(c)); n *= q); \\ _David Wasserman_, Apr 19 2007
%Y Cf. A000945, A051308-A051334, A056756, A093777-A093780.
%Y Cf. A093782.
%K nonn
%O 1,1
%A _Labos Elemer_, May 04 2004
%E More terms from _David Wasserman_, Apr 19 2007