login
Number of ways n can be represented as the arithmetic mean of consecutive primes.
6

%I #5 Oct 11 2019 13:54:03

%S 0,1,1,1,2,1,1,0,2,0,1,3,1,0,3,0,2,2,1,0,1,2,2,0,0,2,0,0,2,5,2,0,0,3,

%T 0,0,2,4,2,0,1,3,2,0,1,1,2,0,2,1,5,1,4,0,2,2,0,0,1,3,1,0,0,2,0,0,1,1,

%U 4,1,2,1,1,0,0,1,1,3,2,0,2,2,1,0,0,1,5,0,3,0,1,1,1,0,2,2,2,0,1,1,3,3,1,0,4

%N Number of ways n can be represented as the arithmetic mean of consecutive primes.

%t f[n_]:=Block[{i=1,j,c=0,m},While[Prime[i]<=n, j=1; While[m=Sum[Prime[k],{k,i,i+j-1}]/j; If[m==n,c++ ]; m<n, j++ ]; i++ ]; c]; Table[f[n],{n,120}]

%Y Cf. A050221, A050237, A060863, A060864, A082370.

%K nonn

%O 1,5

%A _Ray Chandler_, Sep 28 2006