A355849 a(n) is the least k > 1 such that k*n is the average of two consecutive primes.
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
Keywords
Examples
a(4) = 3 because 3*4 = 12 is the average of consecutive primes 11 and 13.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A024675.
Programs
-
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 *)
Comments