cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A355849 a(n) is the least k > 1 such that k*n is the average of two consecutive primes.

This page as a plain text file.
%I A355849 #25 Aug 14 2022 10:20:23
%S A355849 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,
%T A355849 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,
%U A355849 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
%N A355849 a(n) is the least k > 1 such that k*n is the average of two consecutive primes.
%C A355849 a(n) is the least k > 1 such that k*n is in A024675.
%H A355849 Robert Israel, <a href="/A355849/b355849.txt">Table of n, a(n) for n = 1..10000</a>
%e A355849 a(4) = 3 because 3*4 = 12 is the average of consecutive primes 11 and 13.
%p A355849 M:= {seq((ithprime(i)+ithprime(i+1))/2, i=2..10^5)}:
%p A355849 f:= proc(p) local k;
%p A355849   for k from 2 do if member(k*p,M) then return k fi od
%p A355849 end proc:
%p A355849 map(f, [$1..100]);
%t A355849 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 *)
%Y A355849 Cf. A024675.
%K A355849 nonn
%O A355849 1,1
%A A355849 _J. M. Bergot_ and _Robert Israel_, Jul 28 2022