login
A088444
Smallest divisor d of n such that all intervals [(k-1)*d+1:k*d] contain at least one prime, 1<=k<=n/d; a(1)=1.
8
1, 2, 3, 2, 5, 2, 7, 2, 3, 5, 11, 3, 13, 7, 3, 4, 17, 3, 19, 4, 3, 11, 23, 3, 5, 13, 9, 7, 29, 5, 31, 8, 11, 17, 5, 6, 37, 19, 13, 5, 41, 6, 43, 11, 5, 23, 47, 6, 7, 5, 17, 13, 53, 6, 5, 7, 19, 29, 59, 5, 61, 31, 7, 8, 5, 6, 67, 17, 23, 5, 71, 6, 73, 37, 5, 19, 7, 6, 79, 5, 9, 41, 83, 6, 5, 43, 29, 8, 89, 5, 7, 23
OFFSET
1,2
LINKS
Eric Weisstein's World of Mathematics, Prime Gaps
FORMULA
a(n) = n iff n=1 or n is prime: a(A008578(n)) = A008578(n).
a(A002808(n)) < A002808(n).
A088447(a(n)) <= n <= A088448(a(n)).
a(n) = n / A088445(n).
EXAMPLE
n=30: a(30)>3 as [25:27] = {25,26,27} contains no prime, but
a(30)=5 as 3 in [1:5], 7 in [6:10], 11 in [11:15], 17 in [16:20], 23 in
[21:25], 29 in [26:30].
PROG
(PARI)
aicalop(d, u) = { for(k=1, u, for(i=1+((k-1)*d), k*d, if(isprime(i), break); if(i==(k*d), return(0)))); (1); }; \\ All Intervals Contain At Least One Prime.
A088444(n) = if(1==n, n, fordiv(n, d, if(aicalop(d, n/d), return(d))); (0)); \\ Antti Karttunen, May 08 2022
KEYWORD
nonn,look
AUTHOR
Reinhard Zumkeller, Sep 30 2003
EXTENSIONS
Data section extended up to a(92) by Antti Karttunen, May 08 2022
STATUS
approved