|
|
A038026
|
|
Last position reached by winner of n-th Littlewood Frog Race.
|
|
9
|
|
|
2, 3, 7, 5, 19, 7, 29, 17, 19, 19, 43, 13, 103, 29, 31, 41, 103, 19, 191, 41, 67, 43, 137, 73, 149, 103, 109, 83, 317, 31, 311, 97, 181, 103, 191, 71, 439, 191, 233, 89, 379, 67, 463, 113, 181, 137, 967, 97, 613, 149, 197, 181, 607, 109, 331, 233
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
a(n) is the smallest prime such that some subset of primes <= a(n) is a reduced residue system modulo n. - Vladimir Shevelev, Feb 19 2013
|
|
LINKS
|
|
|
FORMULA
|
Let p(n,b) be the smallest prime in the arithmetic progression k*n+b, with k >= 0. Then a(n) = max(p(n,b)) with 0 < b < n and gcd(b,n) = 1. - Charles R Greathouse IV, Sep 08 2012
|
|
EXAMPLE
|
a(6) = 7 since the primes less than or equal to 7, {2, 3, 5, 7}, reduced modulo 6 are {2, 3, 5, 1}. This contains the reduced residue system modulo 6, which is {1, 5}, and 7 is clearly the smallest such prime. - Vladimir Shevelev, Feb 19 2013
|
|
PROG
|
(PARI) a(n)={
my(todo=(1<<n)-1, r=2, q=2);
if(n==1, return(2));
for(a=0, n-1,
if(gcd(a, n)>1, todo=bitnegimply(todo, 1<<a))
);
todo=bitnegimply(todo, 1<<2);
forprime(p=3, default(primelimit),
r+=p-q;
r=r%n;
todo=bitnegimply(todo, 1<<r);
if(!todo, return(p));
q=p;
);
error("Not enough precomputed primes")
(PARI) p(n, b)=while(!isprime(b), b+= n); b
|
|
CROSSREFS
|
This sequence is a lower bound for the related sequence A085420.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|