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.

A247835 Indices of prime(n)^3 in A247834, or a(n)=0 if prime(n)^3 is not in A247834.

Original entry on oeis.org

1, 0, 3, 4, 7, 9, 13, 15, 21, 27, 29, 37, 43, 47, 52, 61, 71, 74, 83, 89, 94, 105, 111, 123, 138, 145, 149, 158, 161, 168, 196, 208, 220, 226, 246, 248, 261, 276, 287, 299, 316, 319, 340, 345, 358, 364, 392, 422, 432, 436, 447, 464, 470, 496, 512, 530, 544, 549
Offset: 1

Views

Author

Vladimir Shevelev, Sep 24 2014

Keywords

Comments

Conjecture: all a(n)>0, except for n=2.

Examples

			Using the formula, let us find the position in A247834, in which should be 17^3, if 17^3 belongs to A247834. Since 17 = prime(7), then we have a(7) = pi(17^(3/2)) - 6 = pi(70) - 6 = 13. Indeed, A247834(13) = 4913 = 17^3.
		

Crossrefs

Programs

  • PARI
    a(n) = my(p=prime(n)); if(nextprime(ceil(p*sqrt(p))) > p*sqrt(prime(n+1)), 0, primepi(prime(n)^(3/2)) - n + 1); \\ Jinyuan Wang, Feb 17 2021

Formula

If prime(n)^3 is in A247834, then a(n) = pi(prime(n)^(3/2)) - n + 1, where pi(x) is the prime counting function (A000720).

Extensions

More terms from Jinyuan Wang, Feb 17 2021

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

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.