login
A305216
Smallest prime p such that some sequence defined recursively by s(k) = a*s(k-1) - b with s(0) = p produces primes for k = 1..n, where a < p and 0 < b < (a - 1)*p.
0
3, 5, 5, 7, 7, 11, 11, 31, 227, 281, 307, 307
OFFSET
1,1
COMMENTS
a(13) > 10^3.
PROG
(PARI) r=307; i=3; for(n=1, 12, f=0; forprime(p=i, r, for(a=2, p-1, if(f==1, break); b=0; while(f==0&&b<(a-1)*p, b++; if(gcd(a*p, b)==1, v=p; c=1; t=0; while(c==1, s=a*v-b; if(isprime(s)&&t<n, v=s; t++, c=0)); if(n==t, f=1; i=p; print1(p, ", ")))))));
CROSSREFS
Sequence in context: A066169 A242189 A302756 * A087821 A204894 A109258
KEYWORD
nonn,hard,more
AUTHOR
STATUS
approved