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

A145300 a(n) is the maximal prime such that if p_n is the n-th prime then ceiling(sqrt(a(n)*p_n))^2 - a(n)*p_n is a perfect square.

Original entry on oeis.org

2, 7, 13, 13, 19, 23, 29, 31, 37, 43, 47, 53, 61, 61, 67, 73, 79, 83, 89, 89, 97, 103, 109, 113, 113, 131, 131, 137, 139, 139, 157, 163, 167, 173, 181, 181, 193, 199, 199, 211, 211, 211, 229, 233, 233, 239, 251, 263, 271, 271, 277, 283, 283, 293, 293, 307, 317, 317, 317, 317
Offset: 1

Views

Author

Vladimir Shevelev, Oct 06 2008

Keywords

Comments

Theorem. a(n) <= p_n + 2*sqrt(2*p_n) + 2. For example, for n=25, p_n=97. Using the theorem, we find: a(25) <= 126. Now, by the definition of the sequence, we verify that a(25)=113.
Or a(n) is the maximal prime q_n > p_n such that sqrt(q_n)-sqrt(p_n) < sqrt(2) [or (p_n+q_n)/2 < sqrt(p_n*q_n)+1]. I conjecture that lim_{n->infinity} (sqrt(q_n) - sqrt(p_n)) = sqrt(2). Note that in the considered case this conjecture is equivalent to the following: lim_{n->infinity} fract(sqrt(p_n*q_n)) = 0, where fract(x) denotes the fractional part of x. - Vladimir Shevelev, Oct 09 2008

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{pmax = 0, pn = Prime[n]}, p=2; While[p <= pn + 2*Floor[Sqrt[2*pn]] + 2, If[IntegerQ[Sqrt[Ceiling[Sqrt[p*pn]]^2-p*pn]], pmax = p]; p=NextPrime[p]]; pmax]; Array[a, 60] (* Amiram Eldar, Dec 16 2018 from the PARI code *)
  • PARI
    a(n) = {my (pmax = 0, pn = prime(n)); forprime(p=2, pn+2*sqrtint(2*pn)+2, if (issquare((ceil(sqrt(p*pn)))^2-p*pn), pmax = p);); pmax;} \\ Michel Marcus, Dec 16 2018

Extensions

More terms from Michel Marcus, Dec 16 2018

A145376 If T(n)>=n is the nearest triangular number to n and p_n is the n-th prime, then a(n) is the least prime such that T(a(n)*p_n)-a(n)p_n is a triangular number.

Original entry on oeis.org

3, 2, 2, 2, 2, 3, 5, 5, 7, 11, 11, 11, 13, 17, 17, 19, 23, 23, 23, 29, 29, 29, 31, 37, 37, 41, 41, 41, 41, 43, 53, 53, 53, 59, 59, 61, 67, 67, 67, 71, 73, 73, 79, 79, 83, 83, 89, 97, 97, 97, 97, 101, 101, 107, 107, 113, 113, 127, 127, 127, 127, 127, 131, 137
Offset: 1

Views

Author

Vladimir Shevelev, Oct 09 2008

Keywords

Comments

Conjecture. For n>=2 the sequence is nondecreasing.
The conjecture holds for the first 10000 terms. [Charles R Greathouse IV, Feb 21 2011]

Crossrefs

Extensions

a(27)-a(64) from Charles R Greathouse IV, Feb 21 2011
Showing 1-2 of 2 results.