A093781 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.
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, 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, 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
Offset: 1
Keywords
Links
- David Wasserman, Apr 19 2007, Table of n, a(n) for n = 1..1000
Programs
-
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
Extensions
More terms from David Wasserman, Apr 19 2007
Comments