login
a(n) is the least positive integer k such that g(k) = n*g(k-1), where g(k) = prime(k+1) - prime(k).
0

%I #6 Jul 30 2020 11:44:58

%S 3,2,11,1022,34,46,4714,295,99,14372,297,263,40026,429,985,161441,

%T 1457,3087,413695,2344,1879,278832,14939,8423,887313,2810,4260,

%U 3589373,7810,13820,12007816,51037,45507,13186859,15783,30765,6957876,57765,24554,50613572,23283

%N a(n) is the least positive integer k such that g(k) = n*g(k-1), where g(k) = prime(k+1) - prime(k).

%C Conjecture: The equation g(k) = n*g(k-1), for a fixed positive integer n, is always solvable for k.

%e k = 2 is the least positive integer such that g(k) = 5-3 = 2*(3-2) = 2*g(k-1), so a(2) = 2.

%t pg[n_] := Module[{r = 0, i = 2, a, b, c, p = False}, While[ ! p, a = Prime[i - 1]; b = Prime[i]; c = Prime[i + 1]; If[c - b == n (b - a), r = i; p = True]; i = i + 1]; r]; Table[pg[i], {i, 1, 30}]

%o (PARI) a(n) = {my(g=1, p=3, q); for(k=2, oo, q=p; p=nextprime(p+1); if(g*n == g=p-q, return(k))); } \\ _Jinyuan Wang_, Jul 30 2020

%Y Cf. A001223.

%K nonn

%O 1,1

%A _Joseph L. Pe_, Jan 07 2003

%E More terms from _Jinyuan Wang_, Jul 30 2020