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.

Previous Showing 61-70 of 114 results. Next

A348193 (Number of primes == 3 mod 4 less than n^2) - (number of primes == 1 mod 4 less than n^2).

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Oct 06 2021

Keywords

Comments

a(790) = -1.

Crossrefs

Programs

  • PARI
    a(n) = sum(k=2, n^2-1, (isprime(k)&&k%4==3)-(isprime(k)&&k%4==1));

Formula

a(n) = A348195(n) - A348196(n).

A349996 Number of primes in an interval [k^2,(k+1)^2] setting a new record.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 9, 10, 12, 13, 15, 16, 17, 21, 22, 23, 24, 27, 29, 30, 31, 33, 34, 35, 36, 38, 39, 40, 41, 42, 44, 46, 48, 49, 50, 53, 56, 59, 60, 64, 66, 67, 74, 75, 77, 78, 80, 82, 84, 91, 96, 97, 98, 103, 105, 109, 110, 111, 112, 119, 125, 129, 133, 135, 139, 146
Offset: 1

Views

Author

Hugo Pfoertner, Dec 11 2021

Keywords

Crossrefs

Programs

  • PARI
    a349996(limit) = {my(nmax=0);for(k=1,limit,my(np=primepi((k+1)^2)-primepi(k^2));if(np>nmax,print1(np,", ");nmax=np))};
    a349996(900)

Formula

a(n) = A014085(A333846(n)).

A089166 Number of primes between squares of successive odd numbers.

Original entry on oeis.org

4, 5, 6, 7, 8, 9, 9, 13, 11, 13, 14, 15, 15, 17, 16, 19, 19, 19, 21, 23, 20, 23, 23, 28, 21, 31, 25, 23, 30, 32, 30, 29, 31, 32, 34, 30, 34, 40, 32, 36, 39, 37, 37, 40, 38, 39, 44, 42, 45, 44, 42, 42, 45, 42, 48, 52, 49, 45, 50, 48, 51, 55, 56, 47, 52, 56, 56, 53, 49, 58, 62, 56
Offset: 1

Views

Author

Robert G. Wilson v, Dec 06 2003

Keywords

Comments

As the squares of the successive odd numbers are those numbers appearing on the SE spoke of the Ulam spiral, a(n) also gives the number of primes appearing in the n-th square ring around 1 of the Ulam spiral. - Scott R. Shannon, Jan 14 2020

Crossrefs

Cf. A014085, A016754 (odd squares).

Programs

  • Magma
    [#[p:p in PrimesInInterval(k^2,(k+2)^2)]:k in [1..150 by 2]]; // Marius A. Burtea, Jan 14 2020
  • Mathematica
    Table[PrimePi[(2n + 1)^2] - PrimePi[(2n - 1)^2], {n, 1, 72}]
  • PARI
    forstep (k=1,130,2,print1(primepi((k+2)^2)-primepi(k^2),", ")) \\ Hugo Pfoertner, Nov 15 2019
    

A134034 Number of primes between n^K and (n+1)^K, where K is 1.647862393566467... and n is an integer greater than 0.

Original entry on oeis.org

2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 2, 2, 2, 2, 1, 3, 3, 1, 3, 1, 2, 3, 2, 4, 1, 2, 4, 1, 4, 3, 1, 4, 1, 3, 2, 4, 3, 1, 4, 3, 4, 3, 3, 2, 2, 3, 3, 4, 3, 4, 3, 4, 2, 3, 4, 3, 2, 5, 2, 4, 4, 3, 3, 4, 3, 5, 3, 5, 4, 4, 1, 4, 4, 4, 3, 4, 6, 3, 2, 2, 3, 7, 3, 6, 2, 5, 4, 7, 2, 3, 5, 5, 3, 4, 3, 5, 4, 3, 3, 6, 5, 3, 5, 6, 3
Offset: 1

Views

Author

Dmitry Kamenetsky, Jan 11 2008

Keywords

Comments

K is the smallest number such that there is always at least one prime between n^K and (n+1)^K for any integer n>0.
This is not the smallest K. See A143898. [T. D. Noe, Sep 04 2008]

Crossrefs

Programs

  • Mathematica
    k=1.647862393566467; Table[Length[Select[Range[Ceiling[n^k],Floor[(n+1)^k]], PrimeQ]], {n,150}] (* T. D. Noe, Sep 04 2008 *)

Extensions

Corrected by T. D. Noe, Sep 04 2008

A140114 Number of semiprimes strictly between n^2 and (n+1)^2.

Original entry on oeis.org

0, 0, 1, 3, 2, 4, 3, 5, 4, 8, 5, 8, 7, 6, 13, 7, 7, 13, 10, 12, 9, 14, 14, 15, 11, 12, 18, 16, 16, 17, 18, 15, 16, 20, 20, 21, 22, 21, 18, 19, 21, 24, 24, 23, 25, 23, 29, 21, 23, 31, 29, 23, 21, 30, 33, 35, 34, 27, 30, 28, 29, 32, 30, 31, 36, 36, 36, 36, 36, 43, 24, 40, 38, 40, 39
Offset: 0

Views

Author

Philippe Lallouet (philip.lallouet(AT)orange.fr), May 08 2008

Keywords

Comments

Can it be proved that a(n)>0 for n>1?
Chen proves that there is a semiprime between n^2 and (n+1)^2 for sufficiently large n. - T. D. Noe, Oct 17 2008

Examples

			The first semiprimes are 6,10,14,15,21,22,26. None are <4, hence a(0)=a(1)=0.
One only is < 9, hence a(2) = 1.
Three more, 10, 14, 15 are < 16, hence a(3)=3.
		

References

  • Jing Run Chen, On the distribution of almost primes in an interval, Sci. Sinica 18 (1975), 611-627.

Crossrefs

Cf. A014085.

Programs

  • Mathematica
    SemiPrimeQ[n_] := TrueQ[Plus@@Last/@FactorInteger[n]==2]; Table[Length[Select[Range[n^2+1, n^2+2n], SemiPrimeQ]], {n,0,100}] (* T. D. Noe, Sep 25 2008 *)
    Module[{nn=80,sps},sps=Table[If[PrimeOmega[n]==2,1,0],{n,(nn+1)^2}];Table[ Total[ Take[sps,{k^2+1,(k+1)^2-1}]],{k,0,nn}]] (* Harvey P. Dale, Oct 03 2022 *)
  • PARI
    a(n)=sum(k=n^2+1,n^2+2*n, bigomega(k)==2) \\ Charles R Greathouse IV, Jan 31 2017

Extensions

Corrected, edited and extended by T. D. Noe, Sep 25 2008

A166332 Number of primes in (n^(3/2)*(log(n))^(1/2)..(n+1)^(3/2)*(log(n+1))^(1/2)] semi-open intervals, n >= 1.

Original entry on oeis.org

1, 2, 1, 2, 2, 1, 2, 1, 3, 1, 2, 3, 2, 1, 3, 3, 1, 3, 2, 3, 3, 2, 2, 2, 4, 2, 3, 4, 1, 4, 1, 4, 2, 4, 2, 3, 4, 4, 2, 4, 3, 1, 3, 4, 4, 4, 4, 3, 3, 3, 4, 3, 3, 3, 5, 4, 4, 2, 3, 3, 5, 3, 5, 5, 4, 4, 2, 3, 4, 5, 3, 5, 5, 2, 3, 2, 5, 5, 6, 3, 4, 5, 6, 3, 4, 4, 4, 4, 5, 2, 5, 5, 3, 3, 6, 5, 3, 6, 6, 3, 3, 4, 5, 5, 5
Offset: 1

Views

Author

Daniel Forgues, Oct 12 2009

Keywords

Comments

Number of primes in (n*(n*log(n))^(1/2)..(n+1)*((n+1)*log(n+1))^(1/2)] semi-open intervals, n >= 1.
The semi-open intervals form a partition of the real line for x > 0, thus each prime appears in a unique interval.
a(n) = pi((n+1)^(3/2)*(log(n+1))^(1/2)) - pi(n^(3/2)*(log(n))^(1/2)) since the intervals are semi-open properly.
The n-th interval length is: ~ (1/2)*(n+1/2)^(1/2)*(3*(log(n+1/2))^(1/2)+(log(n+1/2))^(-1/2)) ~ (3/2)*n^(1/2)*(log(n))^(1/2) as n goes to infinity.
The n-th interval prime density is: ~ 2/(3*log(n+1/2)+log(log(n+1/2))) ~ 2/(3*log(n)) as n goes to infinity.
The expected number of primes for n-th interval is: ~ (n+1/2)^(1/2)*(3*(log(n+1/2))^(1/2)+(log(n+1/2))^(-1/2))/ (3*log(n+1/2)+log(log(n+1/2))) ~ n^(1/2)/(log(n))^(1/2) as n goes to infinity.
Using Excel 2003, for n in [1..1123], I obtain a(n) >= 1 (at least one prime per interval).
CAUTION: I will submit the b-file, but since Excel 2003 is limited to 15-digit precision, the rounding might assign to the wrong interval a prime which is extremely close to the limit of 2 successive intervals. The b-file NEEDS TO BE VERIFIED using interval arithmetic! (SEE NEXT)
CAUTION (ADDENDA): for n in [1..1123], the minimum ratio of... ABS(n^(3/2)*(log(n))^(1/2)-ROUND(n^(3/2)*(log(n))^(1/2)))/(n^(3/2)*(log(n))^(1/2)) that I got is 5.04999E-09 which is well above 1E-15 (15-digit limit of Excel 2003), so no interval ended too close to an integral value and every prime has then been assigned to its proper interval. My b-file should then be reliable.
If it can be proved that each interval always contains at least one prime, this would constitute shorter intervals than A143898(n) as n gets large.
The sequence A166363 gives even shorter intervals that seem to always contain at least one prime (for n > 1)!

Crossrefs

Cf. A143898, A134034, A143935 (for primes between successive n^K, for different K).
Cf. A144140 (showing that for n^K, K=3/2, some intervals fails to contain primes).
Cf. A166363 (for primes in even shorter intervals).
Cf. A014085 (for primes between successive squares).
Cf. A000720.

Extensions

Corrected and edited by Daniel Forgues, Oct 14 2009
Edited by Daniel Forgues, Oct 20 2009

A191226 First occurrence of number n of Ramanujan primes in A191225.

Original entry on oeis.org

1, 2, 12, 22, 29, 36, 65, 69, 117, 118, 73, 100, 108, 154, 161, 200, 254, 172, 274, 239, 340, 321, 334, 330, 345, 471, 378, 481, 357, 526, 522, 515, 610, 635, 612, 655, 648, 792, 809, 731, 797, 594, 806, 851, 988, 886, 963, 933, 1005, 1111, 927, 1124, 970
Offset: 0

Views

Author

John W. Nicholson, May 28 2011

Keywords

Crossrefs

A191227 Last known occurrence of number n of Ramanujan primes in A191225.

Original entry on oeis.org

79, 194, 153, 284, 420, 333, 454, 592, 504, 412, 652, 512, 486, 617, 613, 660, 1130, 753, 1002, 849, 1060, 957, 1034, 1037, 1198, 961, 969, 1056, 1368, 1400, 1264, 1314, 1301, 1683, 1510, 1571, 1532, 1625, 1771, 1810, 1745, 1907, 1961, 1877, 1851, 2104, 2097
Offset: 0

Views

Author

John W. Nicholson, May 28 2011

Keywords

Crossrefs

A278495 a(n) = number of primes in range [n^2, (n+1)^2] that are leaves in "the least squares beanstalk" tree.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 25 2016

Keywords

Comments

Number of terms of A278494 in range [n^2, (n+1)^2], where A278494 are primes p for which there does not exist any such integer k that k - A002828(k) = p.
In other words, number of primes p in range [n^2, (n+1)^2] for which (A002828(1+p) <> 1) and (A002828(2+p) <> 2) and (A002828(3+p) <> 3) and (A002828(4+p) <> 4).
Conjecture: a(n) > 0 for all n >= 1.
Similar guesses are easy to make but hard to prove. I also conjecture that A277487(n) > 0 for all n > 80, and that both A277486(n) > 0 and A277488(n) > 0 for all n > 7. If any of these claims were proved true, it would imply the proof of Legendre's conjecture as well. See also comments in A014085 and sequences A277888 & A278487.

Crossrefs

Cf. A000290, A002828, A010051, A010052, A014085 (an upper bound), A278216, A278494 (primes that are counted), A278496.
Cf. also A277486, A277487, A277488.

Programs

  • PARI
    istwo(n:int)=my(f); if(n<3, return(n>=0); ); f=factor(n>>valuation(n, 2)); for(i=1, #f[, 1], if(bitand(f[i, 2], 1)==1&&bitand(f[i, 1], 3)==3, return(0))); 1
    isthree(n:int)=my(tmp=valuation(n, 2)); bitand(tmp, 1)||bitand(n>>tmp, 7)!=7
    A002828(n)=if(issquare(n), !!n, if(istwo(n), 2, 4-isthree(n))) \\ From Charles R Greathouse IV, Jul 19 2011
    A278495(n) = { my(s = 0); for(k=(n^2),(n+1)^2, if((isprime(k) && (A002828(1+k) <> 1) && (A002828(2+k) <> 2) && (A002828(3+k) <> 3) && (A002828(4+k) <> 4)),s = s+1) ); s; };
    for(n=1, 10000, write("b278495.txt", n, " ", A278495(n)));
    
  • Scheme
    (define (A278495 n) (let loop ((k (+ -1 (A000290 (+ 1 n)))) (s 0)) (if (= 1 (A010052 k)) s (loop (- k 1) (+ s (* (A010051 k) (if (zero? (A278216 k)) 1 0)))))))

Formula

For all n >= 1, a(n) <= A014085(n).

A069941 Number of primes p such that n! <= p <= n! + n^2.

Original entry on oeis.org

1, 3, 3, 3, 4, 5, 5, 4, 7, 7, 9, 6, 5, 8, 4, 9, 10, 14, 8, 16, 14, 14, 7, 6, 16, 12, 12, 15, 13, 12, 9, 12, 12, 17, 13, 6, 12, 18, 15, 13, 15, 17, 15, 23, 19, 12, 13, 19, 18, 22, 20, 19, 16, 17, 19, 19, 23, 20, 18, 19, 23, 24, 19, 15, 19, 20, 26, 18, 24, 22, 24, 25, 24, 16, 23
Offset: 1

Views

Author

Benoit Cloitre, May 04 2002

Keywords

Comments

Conjecture: if n>=2 there are at least 3 primes p such that n!<=p<=n!+n^2 (or stronger: for n>1, a(n) > log(n)). This is stronger than the conjecture described in A037151(n). Because if n!+k is prime, k composite, k=A*B, where A and B must have, each one, at least one prime factor>n (if not: A=q*A' q<=n then n!+k is divisible by q), hence k>n^2. Also stronger (but more restrictive) than the Schinzel conjecture: "for m large enough there's at least one prime p such that m <= p <= m + log(m)^2" since n^2 < log(n!)^2 for n>5.
For the n-th term we have a(n) = pi(n!+n^2) - pi(n!), where pi(x) is the prime counting function. However, pi(n!) is difficult to compute for n>25. The Prime Number Theorem states that pi(x) and Li(x), the logarithmic integral, are asymptotically equal. Hence we can approximate a(n) by Li(n!+n^2) - Li(n!). These approximate values of a(n) are plotted as the red curve in the "Theoretical versus Actual" plot. By the way, using x/log(x) as approximation for Li(x) would change the curve by at most 1 unit. - T. D. Noe, Mar 06 2010

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[n!,n!+n^2], PrimeQ]], {n,100}] (* T. D. Noe, Mar 06 2010 *)
  • PARI
    for(n=1,75,print1(sum(k=n!,n!+n^2,isprime(k)),","))
Previous Showing 61-70 of 114 results. Next