A232879 The y-axis intercept of the line y = n*x + b tangent to the curve y = prime(k), k = 1, 2, 3, ....
1, -1, -5, -13, -37, -83, -194, -469, -1111, -2743, -6698, -16379, -40543, -101251, -254053, -640483, -1622840, -4133371, -10578367, -27130829, -69814219
Offset: 1
Examples
The 2nd tangent line, a(2)+2*k tangent line intercepts p(k) at 3,5,7. a(n)+n*k = ... a(2)+2*2 = -1+2*2 = 3 = p(2). a(2)+2*3 = -1+2*3 = 5 = p(3). a(2)+2*4 = -1+2*4 = 7 = p(4). But other primes fall above the 2nd tangent line. a(2)+2*1 = -1+2*1 = 1 < 2=p(1). a(2)+2*5 = -1+2*5 = 9 < 11=p(5). a(2)+2*6 = -1+2*6 = 11 < 13=p(6). For the 11th tangent line... a(11)+11*6041 = -6698+6041*11 = 59753 = p(6041). a(11)+11*6045 = -6698+6045*11 = 59797 = p(6045). But other primes fall above the 11th tangent line... a(11)+11*6040 = -6698+6040*11 = 59742 < 59747 = p(6040) a(11)+11*6042 = -6698+6042*11 = 59764 < 59771 = p(6042) a(11)+11*6043 = -6698+6043*11 = 59765 < 59779 = p(6043) a(11)+11*6044 = -6698+6044*11 = 59776 < 59791 = p(6044) a(11)+11*6046 = -6698+6046*11 = 59798 < 59809 = p(6046)
Links
- John R Phelan, First 5 integer tangents to prime(n)
Programs
-
Java
public class Itp {private static long LIMIT = 10000000; private static long[] a = new long[100]; private static long[] p = new long[100]; public static void main(String[] args) {for (int n = 1; n < a.length; n++) {a[n] = Integer.MAX_VALUE;} long k = 1; for (int i = 2; i < LIMIT; i++) {if (isPrime(i)) {for (int n = 1; n < a.length; n++) {long l = i - n * k; if (l < a[n]) {a[n] = l; p[n] = i;}} k++;}} for (int n = 1; p[n] < LIMIT / 2; n++) {System.out.print(a[n] + ",");} System.out.println("");} private static boolean isPrime(int i) {if (i < 2) {return false;} int m = (int) Math.sqrt(i); for (int j = 2; j <= m; j++) {if (i % j == 0) {return false;}} return true;}}
-
Mathematica
nn = 10^6; pt = Table[Prime[k], {k, nn}]; Table[r = n*Range[nn] - pt; mx = Max[r]; Print[{-mx, Flatten[Prime[Position[r, mx]]]}]; -mx, {n, 16}] (* T. D. Noe, Dec 04 2013 *)
Formula
n*k + a(n) <= prime(k), where n is the slope, and a(n) is the y intercept.
Extensions
a(16)-a(21) from T. D. Noe, Dec 04 2013
Comments