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-3 of 3 results.

A247867 a(n) is the smallest prime in the interval [k*sqrt(k), k*sqrt(k+2)], where k = A001359(n), or a(n)=0 if there is no prime in this interval.

Original entry on oeis.org

0, 13, 37, 71, 157, 263, 457, 599, 1019, 1109, 1607, 1823, 2399, 2647, 2767, 3433, 3697, 4421, 4721, 5501, 6469, 8581, 8951, 9901, 11897, 13577, 14669, 15329, 16229, 16921, 23011, 23531, 23789, 25097, 26153, 32531, 33107, 33997, 34583, 36037, 39079, 43093
Offset: 1

Views

Author

Vladimir Shevelev, Sep 25 2014

Keywords

Comments

The sequence is partly connected with conjecture in A247834. In turn, we conjecture that all terms a(n)>0 for n>1.

Examples

			For n=1, k=A001359(1)=3, we have the interval [3*sqrt(3), 3*sqrt(5)] = [5.1...,6.7...] which does not contain a prime. So, a(1)=0.
For n=2, k=5, we have the interval [5*sqrt(5), 5*sqrt(7)] = [11.1..., 13.2...] which contains only one prime: 13. So, a(2)=13.
		

Crossrefs

Programs

  • Maple
    p:= 1: q:= 2: count:= 0:
    while count < 100 do
      if q = p+2 then
        count:= count+1;
        r:= nextprime(floor(p*sqrt(p)));
        if r^2 < p^2*q then A[count]:= r
        else A[count]:= 0 fi;
      fi;
      p:= q; q:= nextprime(p);
    od:
    seq(A[i],i=1..100); # Robert Israel, Apr 08 2018
  • PARI
    lista(nn) = {forprime(p=2, nn, if (isprime(q=p+2), pmin = nextprime(ceil(p*sqrt(p))); if (pmin <= floor(p*sqrt(q)), val = pmin, val = 0); print1(val, ", ");););} \\ Michel Marcus, Sep 25 2014

Extensions

More terms from Michel Marcus, Sep 25 2014

A247834 Maximal non-semiprime number which is a "preprime" of the n-th kind (defined in comment in A247395).

Original entry on oeis.org

8, 45, 125, 343, 325, 833, 1331, 1573, 2197, 2057, 3211, 3289, 4913, 4901, 6859, 6647, 8303, 10051, 10469, 11191, 12167, 15341, 16399, 17081, 18259, 22103, 24389, 26071, 29791, 27347, 31117, 35557, 36163, 36859, 39401, 42439, 50653, 50933, 52111, 56129, 56699
Offset: 1

Views

Author

Vladimir Shevelev, Sep 24 2014

Keywords

Comments

Conjecture: the sequence contains all cubes of primes, except for 3^3 (cf. A030078).
Prime(n)^3 is in the sequence iff the interval [prime(n)^(3/2), prime(n)*sqrt(prime(n+1))] contains a prime.
A simple algorithm for finding the position k=k(n) for which a(k) = prime(n)^3 is given in A247835 (see formula and example there).
Conjecture: every term has the form a(n)= p*q*r, where p<=q<=r are primes.

Crossrefs

Extensions

More terms from Peter J. C. Moses, Sep 24 2014

A247977 If n = 1 or prime, then a(n) = 0; otherwise, if n is a preprime of k-th kind, then a(n) = k.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Sep 28 2014

Keywords

Comments

Preprimes of k-th kind are defined in comment in A247395.

Examples

			If n = 15, then, by the formula, we have a(15) = 2 - 2 + 1 = 1.
		

Crossrefs

Programs

  • Mathematica
    Table[If[n==1 || PrimeQ[n], 0, PrimePi[Sqrt[n]] - PrimePi[FactorInteger[n][[1, 1]]] + 1], {n, 1, 125}] (* Indranil Ghosh, Mar 08 2017 *)
  • PARI
    for(n=1, 125, print1(if(n==1 || isprime(n), 0, primepi(sqrt(n)) - primepi(vecmin(factor(n)[, 1])) + 1),", ")) \\ Indranil Ghosh, Mar 08 2017

Formula

If n is a composite number, then a(n) = pi(sqrt(n)) - pi(lpf(n)) + 1, where pi(x) is prime counting function (cf. A000720), lpf = least prime factor (A020639).
Showing 1-3 of 3 results.