The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A037038 Number of primes between n and 4n+1. 1

%I #11 Feb 15 2014 08:54:14

%S 3,4,5,5,6,6,7,7,8,9,10,10,11,10,12,12,13,14,14,14,15,16,16,16,17,18,

%T 20,21,21,20,20,20,21,22,23,23,24,24,25,25,26,26,27,26,28,28,28,29,30,

%U 31,31,31,32,31,31,32,34,35,35,36,36,35,36,37,37,38,39,39,40,41,42,41

%N Number of primes between n and 4n+1.

%F a(n) = A000720(4*n+1) - A000720(n-1). - _Michel Marcus_, Sep 28 2013

%e a(5)=6 because between 5 and 21 there are 6 primes: 5, 7, 11, 13, 17 and 19.

%p with(numtheory); A037038:=n->pi(4*n + 1) - pi(n - 1); seq(A037038(n), 1..100); # _Wesley Ivan Hurt_, Feb 14 2014

%t Table[PrimePi[4 n + 1] - PrimePi[n - 1], {n, 1, 100}] (* _Wesley Ivan Hurt_, Feb 14 2014 *)

%o (PARI) a(n) = primepi(4*n+1) - primepi(n-1); \\ _Michel Marcus_, Sep 28 2013

%Y Cf. A014085.

%K nonn

%O 1,1

%A _Felice Russo_

%E More terms from _Erich Friedman_

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 June 8 09:36 EDT 2024. Contains 373217 sequences. (Running on oeis4.)