login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A248595
Smallest prime number Q such that there is a prime number R such that floor(Q/R)=prime(n).
3
5, 7, 11, 23, 23, 41, 53, 59, 47, 59, 157, 113, 83, 131, 239, 107, 179, 307, 337, 359, 367, 239, 167, 179, 293, 509, 311, 751, 547, 227, 383, 263, 1511, 419, 449, 757, 787, 491, 503, 347, 359, 907, 383, 967, 593, 599, 1481, 1117, 683, 1607, 467, 479, 1693
OFFSET
1,1
EXAMPLE
floor(3/2)=1 not prime, floor(5/2)=2=prime(1) so a(1)=5.
floor(7/2)=3=prime(2), so a(2)=7.
floor(11/2)=5=prime(3), so a(3)=11.
floor(13/2)=6 and floor(17/2)=8 not prime, floor(23/3)=7=prime(4), so a(4)=23.
floor(23/2)=11=prime(5) so a(5)=23.
MATHEMATICA
a[n_] := For[p = Prime[n]; r = 2, True, r = NextPrime[r], For[q = NextPrime[r*p, -1], q <= (p + 1) r, q = NextPrime[q], If[Floor[q/r] == p, Return[q]]]]; Array[a, 100] (* Jean-François Alcover, Oct 25 2014 *)
PROG
( Excel & Visual Basic, the file pre.txt with the first 1000000 prime numbers )
Dim p(10000), q(1000000)
Open "pre.txt" For Input As #1
For i = 1 To 10000: Input #1, x: p(i) = x: q(i) = x: Next i
For i = 10001 To 1000000: Input #1, x: q(i) = x: Next i
o = 3
For l = 1 To 10000
x = p(l)
For i = 1 To 10000
a = p(i)
For j = o To 1000000
b = q(j)
c = Int(b / a)
If c < x Then GoTo 5
If c = x Then Cells(l, 1) = x: Cells(l, 2) = b: Cells(l, 3)= a: Cells(l, 4).Select: GoTo 20
GoTo 10
5 Next j
10 Next i
20 If i = 1 Then o = j
Next l
End Sub
CROSSREFS
Cf. A248596.
Sequence in context: A057733 A318078 A174332 * A266233 A124111 A151715
KEYWORD
nonn
AUTHOR
Pierre CAMI, Oct 09 2014
STATUS
approved