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.

Showing 1-4 of 4 results.

A101947 A101909 sorted and duplicates removed.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73
Offset: 1

Views

Author

Cino Hilliard, Jan 28 2005

Keywords

Crossrefs

Programs

  • PARI
    bet2n4n(n) = { local(c,c1,x,y); a=vector(5001); for(x=1,n, c=0; forprime(y=2*x+1,4*x-1, c++; ); a[x] = c; ); b=vecsort(a); for(x=1,5000, if(b[x]>0, if(b[x]<>b[x+1],print1(b[x]",") ) ); ) }
    
  • PARI
    s=0;v=vectorsmall(10^6,n,s+=isprime(4*n-1)+isprime(4*n-3)-isprime(2*n-1));v=vecsort(v,,8);vecextract(v,Str("1..",#v\2)) \\ Charles R Greathouse IV, Mar 12 2012

A101983 Numbers that do not occur in A101909 (= number of primes between 2n and 4n).

Original entry on oeis.org

11, 79, 134, 184, 186, 215, 245, 262, 284, 305, 387, 544, 694, 700, 706, 776, 814, 881, 939, 974, 1002, 1027, 1079, 1104, 1133, 1146, 1184, 1193, 1207, 1354, 1387, 1415, 1441, 1495, 1574, 1587, 1608, 1662, 1690, 1801, 1915, 1987, 2054, 2067, 2104, 2170
Offset: 1

Views

Author

Cino Hilliard, Jan 28 2005

Keywords

Examples

			11 is the first number that does not equal a count of primes between 2n and 4n for some n.
		

Crossrefs

Complement of A101947.
Cf. A101909.

Programs

  • Mathematica
    f[n_] := PrimePi[4n] - PrimePi[2n]; t = Union[ Table[ f[n], {n, 12000}]]; Complement[ Range[ t[[ -1]]], t] (* Robert G. Wilson v, Feb 10 2005 *)
  • PARI
    bet2n4n(n)={ my( b=vecsort(vector(n, x, my(c=0); forprime(y=2*x+1,4*x-1, c++); c))); for(x=1,n-2, while(b[x+1]-b[x]>1,print1(b[x]++,",")))} \\ It's probably faster to use A101909 instead of forprime(...). Edited and corrected by M. F. Hasler, Sep 29 2019
    
  • PARI
    primecount(a,b)=primepi(b)-primepi(a);
    v=vector(20000);
    for(k=1,oo,j=primecount(2*k,4*k);if(j>#v,break,v[j]++));
    for(k=1,2170,if(v[k]==0,print1(k,", "))) \\ Hugo Pfoertner, Sep 29 2019

Extensions

More terms from Robert G. Wilson v, Feb 10 2005
Name edited by M. F. Hasler, Sep 29 2019

A101984 Numbers that occur exactly once in A101909 (= count of primes between 2n and 4n).

Original entry on oeis.org

1, 3, 5, 8, 22, 36, 37, 46, 47, 48, 53, 63, 83, 98, 99, 101, 105, 108, 113, 114, 127, 135, 139, 148, 150, 155, 158, 171, 172, 173, 174, 175, 177, 178, 188, 205, 210, 218, 219, 220, 221, 226, 231, 240, 246, 254, 277, 282, 297, 298, 301, 303, 327, 333, 334, 339
Offset: 1

Views

Author

Cino Hilliard, Jan 28 2005

Keywords

Examples

			There are 5 primes between 16 and 32 and nowhere else between 2n and 4n.
		

Crossrefs

Programs

  • PARI
    bet2n4n(n)={ my(b=vecsort(vector(n,x, my(c=0); forprime(y=2*x+1,4*x-1, c++); c))); print1(1","); for(x=1,n-2, if(b[x+1]>b[x] && b[x+1]Don Reble. - M. F. Hasler, Sep 29 2019

Extensions

Better name from N. J. A. Sloane, Sep 29 2019
Corrected a(22) and a(45), following an observation by Don Reble. - M. F. Hasler, Sep 29 2019

A060715 Number of primes between n and 2n exclusive.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 2, 2, 3, 4, 3, 4, 3, 3, 4, 5, 4, 4, 4, 4, 5, 6, 5, 6, 6, 6, 7, 7, 6, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 10, 9, 10, 9, 9, 10, 10, 9, 9, 10, 10, 11, 12, 11, 12, 13, 13, 14, 14, 13, 13, 12, 12, 12, 13, 13, 14, 13, 13, 14, 15, 14, 14, 13, 13, 14, 15, 15
Offset: 1

Views

Author

Lekraj Beedassy, Apr 25 2001

Keywords

Comments

See the additional references and links mentioned in A143227. - Jonathan Sondow, Aug 03 2008
a(A060756(n)) = n and a(m) <> n for m < A060756(n). - Reinhard Zumkeller, Jan 08 2012
For prime n conjecturally a(n) = A226859(n). - Vladimir Shevelev, Jun 27 2013
The number of partitions of 2n+2 into exactly two parts where the first part is a prime strictly less than 2n+1. - Wesley Ivan Hurt, Aug 21 2013

Examples

			a(35)=8 since eight consecutive primes (37,41,43,47,53,59,61,67) are located between 35 and 70.
		

References

  • M. Aigner and C. M. Ziegler, Proofs from The Book, Chapter 2, Springer NY 2001.

Crossrefs

Related sequences:
Primes (p) and composites (c): A000040, A002808, A000720, A065855.
Primes between p(n) and 2*p(n): A063124, A070046; between c(n) and 2*c(n): A376761; between n and 2*n: A035250, A060715, A077463, A108954.
Composites between p(n) and 2*p(n): A246514; between c(n) and 2*c(n): A376760; between n and 2*n: A075084, A307912, A307989, A376759.

Programs

  • Haskell
    a060715 n = sum $ map a010051 [n+1..2*n-1]  -- Reinhard Zumkeller, Jan 08 2012
    
  • Magma
    [0] cat [#PrimesInInterval(n+1, 2*n-1): n in [2..80]]; // Bruno Berselli, Sep 05 2012
    
  • Maple
    a := proc(n) local counter, i; counter := 0; from i from n+1 to 2*n-1 do if isprime(i) then counter := counter +1; fi; od; return counter; end:
    with(numtheory); seq(pi(2*k-1)-pi(k),k=1..100); # Wesley Ivan Hurt, Aug 21 2013
  • Mathematica
    a[n_]:=PrimePi[2n-1]-PrimePi[n]; Table[a[n],{n,1,84}] (* Jean-François Alcover, Mar 20 2011 *)
  • PARI
    { for (n=1, 1000, write("b060715.txt", n, " ", primepi(2*n - 1) - primepi(n)); ) } \\ Harry J. Smith, Jul 10 2009
    
  • Python
    from sympy import primerange as pr
    def A060715(n): return len(list(pr(n+1, 2*n))) # Karl-Heinz Hofmann, May 05 2022

Formula

a(n) = Sum_{k=1..n-1} A010051(n+k). - Reinhard Zumkeller, Dec 03 2009
a(n) = pi(2n-1) - pi(n). - Wesley Ivan Hurt, Aug 21 2013
a(n) = Sum_{k=(n^2-n+2)/2..(n^2+n-2)/2} A010051(A128076(k)). - Wesley Ivan Hurt, Jan 08 2022

Extensions

Corrected by Dug Eichelberger (dug(AT)mit.edu), Jun 04 2001
More terms from Larry Reeves (larryr(AT)acm.org), Jun 05 2001
Showing 1-4 of 4 results.