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

A145236 a(n) is the least positive integer 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, 1, 1, 3, 5, 5, 9, 9, 13, 17, 19, 23, 25, 27, 31, 35, 41, 41, 47, 51, 51, 57, 61, 65, 73, 75, 77, 81, 83, 85, 99, 101, 107, 109, 117, 119, 125, 129, 133, 139, 145, 145, 155, 157, 161, 163, 173, 183, 187, 189, 193, 199, 201, 209, 215, 221, 225, 227, 233, 237, 239, 247
Offset: 1

Views

Author

Vladimir Shevelev, Oct 05 2008, Oct 07 2008

Keywords

Comments

Conjectures: 1) for n >= 2, the sequence does not decrease; 2) for n > 1, a(n) is odd; 3) a(n) can be equal to a(n+1) only for twins: p_(n+1) - p_n = 2 (although there also exist twins for which a(n) < a(n+1)).
All these conjectures are proved using the formula a(n) = p_n - 2*floor(sqrt(2p_n)) + 2, n > 1. See also A145701 and A145714. - Vladimir Shevelev, Oct 18 2008

Crossrefs

Programs

  • Maple
    A145236 := proc(n) local p,k,a ; p := ithprime(n) ; for k from 1 do ceil(sqrt(ceil(k*p))) ; a := %^2-k*p ; if issqr(a) then return k ; end if; end do: end proc:
    for n from 1 do printf("%d,\n",A145236(n)) ; end do: # R. J. Mathar, Aug 02 2010

Extensions

a(12)=23 (not 21). - Vladimir Shevelev, Oct 16 2008
Extended by R. J. Mathar, Aug 02 2010

A145050 Primes p of the form 4*k+1 for which s=26 is the least positive integer such that s*p-(floor(sqrt(s*p)))^2 is a square.

Original entry on oeis.org

6569, 8117, 8689, 9221, 9281, 9829, 10289, 10457, 11597, 11953, 12577, 12721, 13093, 14561, 15737, 15817, 16529, 17041, 17341, 17737, 18089, 18397, 19121, 19997, 20129, 20693, 20789, 21601, 21701, 22093, 22433, 22777, 22877, 23029, 23633, 23833, 24809, 25589
Offset: 1

Views

Author

Vladimir Shevelev, Sep 30 2008, Oct 03 2008

Keywords

Comments

For all primes of the form 4*k+1 not exceeding 10000 the least integer s takes only values: 1, 2, 5, 10, 13, 17, 26. These values are the first numbers in A145017 (see our conjecture at A145047).

Examples

			a(1)=6569 since p=6569 is the least prime of the form 4*k+1 for which s*p-(floor(sqrt(s*p)))^2 is not a square for s=1..25, but 26*p-(floor(sqrt(26*p)))^2 is a square (for p=6569 it is 225).
		

Crossrefs

Extensions

More terms from Jinyuan Wang, Jul 16 2025

A145017 Squarefree positive integers k for which k-(floor(sqrt(k)))^2 is a perfect square.

Original entry on oeis.org

1, 2, 5, 10, 13, 17, 26, 29, 34, 37, 53, 58, 65, 73, 82, 85, 97, 101, 109, 122, 130, 137, 145, 170, 173, 178, 185, 194, 197, 205, 221, 226, 229, 241, 257, 265, 281, 290, 293, 298, 305, 314, 349, 362, 365, 370, 377, 386, 397, 401, 409, 442, 445, 457, 466, 485, 493
Offset: 1

Views

Author

Vladimir Shevelev, Sep 29 2008

Keywords

Comments

If an odd prime p divides a(n) then it has the form 4k+1.
Conjecture. For every n>=1 there exist infinitely many primes p of the form 4k+1 for which for a(n) > 1 we have s*p-(floor(sqrt(s*p)))^2 is not a perfect square for s=1,...,a(n)-1 while a(n)*p-(floor(sqrt(a(n)*p)))^2 is a perfect square. (See A145016(s=1) and A145022, A145023, A145047, A145048, A145049, A145050 correspondingly for s=2, s=5, s=10, s=13, s=17, s=26.) - Vladimir Shevelev, Sep 30 2008

Crossrefs

Programs

  • Mathematica
    Select[Range@ 500, And[SquareFreeQ@ #, IntegerQ@ Sqrt[# - Floor[Sqrt@ #]^2]] &] (* Michael De Vlieger, Jan 12 2020 *)
  • PARI
    is(n)={issquarefree(n) && issquare(n-sqrtint(n)^2)} \\ Andrew Howroyd, Jan 12 2020

Extensions

Missing a(40) inserted and terms a(42) and beyond from Andrew Howroyd, Jan 12 2020

A145281 a(n) is the least prime such that (ceiling(sqrt(a(n)*p_n)))^2 - a(n)*p_n is a perfect square, where p_n is the n-th prime.

Original entry on oeis.org

2, 3, 3, 3, 5, 5, 11, 11, 13, 17, 19, 23, 29, 29, 31, 37, 41, 41, 47, 53, 53, 59, 61, 67, 73, 79, 79, 83, 83, 89, 101, 101, 107, 109, 127, 127, 127, 131, 137, 139, 149, 149, 157, 157, 163, 163, 173, 191, 191, 191, 193, 199, 211, 211, 223, 223, 227, 227, 233, 239
Offset: 1

Views

Author

Vladimir Shevelev, Oct 06 2008, Oct 07 2008

Keywords

Comments

Theorem. p_n - 2*sqrt(2p_n) + 2= A145236(n).
Or a(n) is the least prime q_n <= p_n such that sqrt(p_n) - sqrt(q_n) < sqrt(2) [or (p_n + q_n)/2 < sqrt(p_n*q_n) + 1]. See also our comment to A145300. - Vladimir Shevelev, Oct 09 2008
The above conjecture is true. This means that a(n) is the nearest prime p > p_n - 2*floor(sqrt(2*p_n)) + 2. A considerably more important and deep question is whether p < p_n. The answer does not follow even from the Riemann conjecture about zeros of the zeta function. - Vladimir Shevelev, Oct 17 2008

Crossrefs

Programs

  • PARI
    a(n) = {my(p = prime(n)); my(q = 2); while (! issquare(ceil(sqrt(q*p))^2 - q*p), q = nextprime(q+1)); q;} \\ Michel Marcus, Jul 06 2015

Extensions

More terms from Michel Marcus, Jul 06 2015

A249298 Smallest positive integer k, such that s-k*n is a square where s is the smallest square >= k*n.

Original entry on oeis.org

1, 2, 1, 1, 1, 2, 3, 1, 1, 4, 5, 1, 5, 6, 1, 1, 9, 2, 9, 2, 1, 12, 13, 1, 1, 14, 1, 3, 17, 2, 19, 1, 3, 20, 1, 1, 23, 24, 3, 1, 25, 2, 27, 6, 1, 30, 31, 1, 1, 2, 3, 7, 35, 4, 1, 2, 3, 40, 41, 1, 41, 42, 1, 1, 1, 4, 47, 10, 5, 2, 51, 1, 51, 52, 3, 12, 1, 6, 57, 1, 1, 60, 61, 1, 3, 62, 7, 3, 65, 2
Offset: 1

Views

Author

Valtteri Raiko, Oct 24 2014

Keywords

Comments

For any n>=3, there exists at least one positive integer k, 1 <= k <= n-1 such that the difference between the smallest square >= k*n and k*n is a square. To prove this, consider the multiplier k = n-2. Then (n-2)*n = (n-1)^2-1, thus the difference from the next square is 1, which is a square. If n = 1, k = 1 and if n = 2, k = 2.
Smallest positive integer k such that ceiling(sqrt(k*n))^2-k*n is a square.

Examples

			a(10) = 4, for ceiling(sqrt(10))^2-10 = 6, ceiling(sqrt(2*10))^2-2*10 = 5, ceiling(sqrt(3*10))^2-3*10 = 6 and ceiling(sqrt(4*10))^2-4*10 = 9 = 3^2.
		

Crossrefs

Cf. A000290, A145236 (equals a(A000040)), A068527 (difference for k=1).

Programs

  • Mathematica
    dif[n_] := Ceiling[Sqrt[n]]^2 - n;a[k_] := Module[{n = 1}, While[dif[dif[n*k]] != 0, n++]; Return[n]];Table[a[k], {k, 1, 90}]
  • PARI
    a(n) = {k=1; while(!issquare(ceil(sqrt(k*n))^2-k*n), k++); k;} \\ Michel Marcus, Oct 24 2014

A145230 Numbers of different values of the minimal factors s for primes of the form 4k+1 not exceeding 10^n (see A145215).

Original entry on oeis.org

1, 2, 3, 7, 17, 38
Offset: 1

Views

Author

Vladimir Shevelev, Oct 05 2008

Keywords

Crossrefs

Showing 1-6 of 6 results.