The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A232879 The y-axis intercept of the line y = n*x + b tangent to the curve y = prime(k), k = 1, 2, 3, .... 1

%I

%S 1,-1,-5,-13,-37,-83,-194,-469,-1111,-2743,-6698,-16379,-40543,

%T -101251,-254053,-640483,-1622840,-4133371,-10578367,-27130829,

%U -69814219

%N The y-axis intercept of the line y = n*x + b tangent to the curve y = prime(k), k = 1, 2, 3, ....

%C This sequence contains the y intercepts for lines with integer slopes, such that all primes fall at or above the line. Verified for primes less than 2*10^9.

%C The first 15 tangent lines intercept prime(k) at the following primes: 2, 3, 5, 7, 13, 19, 23, 31, 43, 47, 113, 283, 1129, 2803, 7043, 24137, 59753, 59797, 155893, 445033, 1195247, 3278837.

%H John R Phelan, <a href="/A232879/a232879.pdf">First 5 integer tangents to prime(n)</a>

%F n*k + a(n) <= prime(k), where n is the slope, and a(n) is the y intercept.

%e The 2nd tangent line, a(2)+2*k tangent line intercepts p(k) at 3,5,7.

%e a(n)+n*k = ...

%e a(2)+2*2 = -1+2*2 = 3 = p(2).

%e a(2)+2*3 = -1+2*3 = 5 = p(3).

%e a(2)+2*4 = -1+2*4 = 7 = p(4).

%e But other primes fall above the 2nd tangent line.

%e a(2)+2*1 = -1+2*1 = 1 < 2=p(1).

%e a(2)+2*5 = -1+2*5 = 9 < 11=p(5).

%e a(2)+2*6 = -1+2*6 = 11 < 13=p(6).

%e For the 11th tangent line...

%e a(11)+11*6041 = -6698+6041*11 = 59753 = p(6041).

%e a(11)+11*6045 = -6698+6045*11 = 59797 = p(6045).

%e But other primes fall above the 11th tangent line...

%e a(11)+11*6040 = -6698+6040*11 = 59742 < 59747 = p(6040)

%e a(11)+11*6042 = -6698+6042*11 = 59764 < 59771 = p(6042)

%e a(11)+11*6043 = -6698+6043*11 = 59765 < 59779 = p(6043)

%e a(11)+11*6044 = -6698+6044*11 = 59776 < 59791 = p(6044)

%e a(11)+11*6046 = -6698+6046*11 = 59798 < 59809 = p(6046)

%t nn = 10^6; pt = Table[Prime[k], {k, nn}]; Table[r = n*Range[nn] - pt;

%t mx = Max[r]; Print[{-mx, Flatten[Prime[Position[r, mx]]]}]; -mx, {n, 16}] (* _T. D. Noe_, Dec 04 2013 *)

%o (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;}}

%K sign,hard

%O 1,3

%A _John R Phelan_, Dec 01 2013

%E a(16)-a(21) from _T. D. Noe_, Dec 04 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified February 24 22:57 EST 2020. Contains 332216 sequences. (Running on oeis4.)