login
A355849
a(n) is the least k > 1 such that k*n is the average of two consecutive primes.
1
4, 2, 2, 3, 3, 2, 3, 7, 2, 3, 9, 5, 2, 3, 2, 4, 2, 4, 4, 3, 2, 7, 3, 3, 2, 10, 3, 2, 12, 2, 3, 2, 3, 3, 3, 2, 3, 2, 5, 3, 5, 10, 2, 4, 4, 3, 6, 3, 9, 3, 2, 5, 12, 2, 3, 10, 4, 6, 4, 2, 10, 3, 5, 3, 3, 3, 2, 8, 2, 6, 6, 2, 10, 5, 2, 3, 2, 4, 14, 2, 4, 3, 9, 5, 2, 12, 4, 2, 4, 2, 12, 6, 2, 3, 6, 2
OFFSET
1,1
COMMENTS
a(n) is the least k > 1 such that k*n is in A024675.
LINKS
EXAMPLE
a(4) = 3 because 3*4 = 12 is the average of consecutive primes 11 and 13.
MAPLE
M:= {seq((ithprime(i)+ithprime(i+1))/2, i=2..10^5)}:
f:= proc(p) local k;
for k from 2 do if member(k*p, M) then return k fi od
end proc:
map(f, [$1..100]);
MATHEMATICA
a[n_] := Module[{m = 2*n}, While[Plus @@ NextPrime[m, {-1, 1}] != 2*m, m += n]; m/n]; Array[a, 100] (* Amiram Eldar, Aug 05 2022 *)
CROSSREFS
Cf. A024675.
Sequence in context: A112349 A231821 A062072 * A140395 A061505 A255708
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jul 28 2022
STATUS
approved