login
a(n) is the least k such that there are exactly n integers between (1/6)*prime(k) and (1/6)*prime(k+1).
2

%I #14 Dec 01 2025 19:34:37

%S 3,24,30,154,217,738,1879,1831,3427,4522,3644,3385,17006,38590,14357,

%T 30802,49414,31545,40933,141718,126172,104071,271743,149689,325852,

%U 566214,2386432,1287544,1736516,1094421,2219883,4140009,2775456

%N a(n) is the least k such that there are exactly n integers between (1/6)*prime(k) and (1/6)*prime(k+1).

%C The sequence of primes indexed by this sequence is (5, 89, 113, 887, 1327, 5591, 16141, 15683, 31907, 43331, 34061, 31397, 188029, 461717, 155921, ...). See A390785 for a guide to related sequences.

%F floor(prime(a(n)+1)/6) - floor(prime(a(n))/6) = n.

%p N:= 40: # for a(1) .. a(N)

%p V:= Vector(N): p:= 2: m:= 0: count:= 0:

%p for k from 1 while count < N do

%p p:= nextprime(p); mp:= floor(p/6);

%p v:= mp - m; m:= mp;

%p if v > 0 and v <= N and V[v] = 0 then

%p V[v]:= k; count:= count+1;

%p fi;

%p od:

%p convert(V,list); # _Robert Israel_, Nov 25 2025

%t p[n_] := p[n] = Prime[n]; m = 6; z = 50000;

%t t = Table[Floor[p[n + 1]/m] - Floor[p[n]/m], {n, 1, z}];

%t Flatten[Table[First[Position[t, k]], {k, 1, 40}]]

%Y Cf. A390785, A390786, A390788.

%K nonn

%O 1,1

%A _Clark Kimberling_, Nov 24 2025