login
A372238
Least number m such that 9*k*m+1 is prime for k=1..n.
1
2, 2, 4, 170, 9860, 23450, 56980, 56980, 6723767050, 48276858630, 77460393371130, 97581361797920, 97581361797920, 1269928100726715430
OFFSET
1,1
FORMULA
If A088250(n) is divisible by 9, then a(n) = A088250(n) / 9. - Jason Yuen, Apr 25 2024
EXAMPLE
a(1) = 2, because 9*1*2 + 1 = 19 is prime and no lesser number has this property.
MATHEMATICA
p[m_, n_] := AllTrue[Range[n], PrimeQ[9*#*m + 1] &];
a[n_] := a[n] = Module[{m = 1}, While[! p[m, n], m++]; m]
Table[a[n], {n, 1, 9}] (* Robert P. P. McKone, May 02 2024 *)
PROG
(PARI) is(n, m)=my(u=vector(n, k, 9*k*m+1)); for(i=1, n, if(!isprime(u[i]), return(0))); 1
a(n)=my(pas=1); if(n<15, if(n>2, pas=factorback(primes(primepi(n))); pas/=3; my(m=pas)); forstep(m=pas, +oo, pas, if(is(n, m), return(m))))
(PARI) See PARI link
CROSSREFS
Sequence in context: A114695 A134084 A267346 * A264933 A012858 A366756
KEYWORD
nonn,hard,more
AUTHOR
Jean-Marc Rebert, Apr 23 2024
EXTENSIONS
a(11)-a(13) from David A. Corneth, Apr 24 2024
a(14) from Jason Yuen, Apr 25 2024
STATUS
approved