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.
%I A082370 #9 Mar 18 2018 04:30:25 %S A082370 1,1,2,1,1,1,2,1,2,2,2,2,1,2,2,4,1,1,1,2,1,2,1,3,2,3,1,2,1,3,3,1,2,4, %T A082370 3,3,5,1,1,6,2,3,1,2,1,2,3,2,3,2,1,1,2,2,2,4,2,1,2,4,3,3,3,2,2,1,2,1, %U A082370 4,3,5,2,1,2,1,3,1,3,1,3,3,2,3,2,3,1,1,2,1,5,2,1,2,3,1,2,1,3,3,2,1,1,5,2,2 %N A082370 a(n) = number of sets of consecutive primes whose arithmetic mean is A000040(n). %H A082370 Robert Israel, <a href="/A082370/b082370.txt">Table of n, a(n) for n = 1..4000</a> %F A082370 a(n) = A122821(A000040(n)). %e A082370 For n=3; A000040(3) = 5. the two sets are 5/1 = 5, (3+5+7)/3 = 5. so a(3)=2. %p A082370 N:= 300: %p A082370 P:= [0,seq(ithprime(i),i=1..N)]: %p A082370 S:= ListTools:-PartialSums(P): %p A082370 mmax:= numtheory:-pi(floor(S[N]/N)): %p A082370 V:= Vector(1..mmax,1): %p A082370 for i from 1 to N+1 do %p A082370 for j from i+2 to N+1 do %p A082370 r:= (S[j]-S[i])/(j-i); %p A082370 if r::integer and isprime(r) then %p A082370 k:= numtheory:-pi(r); %p A082370 if k <= mmax then %p A082370 V[k]:= V[k]+1 %p A082370 fi %p A082370 fi %p A082370 od od: %p A082370 convert(V,list); # _Robert Israel_, Mar 18 2018 %Y A082370 Cf. A050221, A060863, A082431, A122821. %K A082370 easy,nonn %O A082370 1,3 %A A082370 _Naohiro Nomoto_, May 11 2003 %E A082370 Extended by _Ray Chandler_, Oct 03 2006