Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A082370 a(n) = number of sets of consecutive primes whose arithmetic mean is A000040(n). 3

%I #9 Mar 18 2018 04:30:25

%S 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 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 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 a(n) = number of sets of consecutive primes whose arithmetic mean is A000040(n).

%H Robert Israel, <a href="/A082370/b082370.txt">Table of n, a(n) for n = 1..4000</a>

%F a(n) = A122821(A000040(n)).

%e For n=3; A000040(3) = 5. the two sets are 5/1 = 5, (3+5+7)/3 = 5. so a(3)=2.

%p N:= 300:

%p P:= [0,seq(ithprime(i),i=1..N)]:

%p S:= ListTools:-PartialSums(P):

%p mmax:= numtheory:-pi(floor(S[N]/N)):

%p V:= Vector(1..mmax,1):

%p for i from 1 to N+1 do

%p for j from i+2 to N+1 do

%p r:= (S[j]-S[i])/(j-i);

%p if r::integer and isprime(r) then

%p k:= numtheory:-pi(r);

%p if k <= mmax then

%p V[k]:= V[k]+1

%p fi

%p fi

%p od od:

%p convert(V,list); # _Robert Israel_, Mar 18 2018

%Y Cf. A050221, A060863, A082431, A122821.

%K easy,nonn

%O 1,3

%A _Naohiro Nomoto_, May 11 2003

%E Extended by _Ray Chandler_, Oct 03 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 6 03:16 EDT 2024. Contains 374957 sequences. (Running on oeis4.)