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-10 of 13 results. Next

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

Original entry on oeis.org

1237, 1621, 1721, 1933, 1949, 1993, 2221, 2237, 2309, 2341, 2473, 2621, 2657, 2789, 2797, 2857, 2953, 3221, 3361, 3533, 3677, 3881, 3889, 3917, 4133, 4457, 4481, 4549, 4813, 4889, 4973, 5153, 5189, 5261, 5441, 5653, 5717, 5813, 6101, 6217, 6301, 6329
Offset: 1

Views

Author

Vladimir Shevelev, Sep 30 2008, Oct 05 2008

Keywords

Comments

Conjecture: The least positive integer s can take values only from A008784 (see for s=1,2,5,10 sequences A145016, A145022, A145023 and this sequence).

Examples

			a(1)=1237 since p=1237 is the least prime of the form 4k+1 for which sp-(floor(sqrt(sp)))^2 is not a square for s=1..9, but 10p-(floor(sqrt(10p)))^2 is a square (for p=1237 it is 49).
		

Crossrefs

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

Original entry on oeis.org

2749, 2897, 3049, 3529, 3557, 3929, 4073, 4253, 4657, 4817, 5081, 5281, 5417, 5449, 5657, 5693, 5869, 6053, 6121, 6529, 6793, 6833, 7109, 7393, 7541, 7829, 7877, 7993, 8209, 8329, 8377, 8429, 8501, 8741, 8761, 8893, 9001, 9109, 9157, 9209, 9257, 9293
Offset: 1

Views

Author

Vladimir Shevelev, Sep 30 2008

Keywords

Examples

			a(1)=2749 since p=2749 is the least prime of the form 4k+1 for which sp-(floor(sqrt(sp)))^2 is not a square for s=1..12, but 13p-(floor(sqrt(13p)))^2 is a square (for p=2749 it is 16).
		

Crossrefs

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

Original entry on oeis.org

3037, 3169, 3257, 3769, 4013, 4421, 4793, 4957, 5237, 5297, 5701, 5821, 5881, 6373, 6689, 6761, 6949, 7013, 7213, 7417, 7481, 7549, 7621, 7757, 8389, 8461, 8537, 8681, 8753, 9049, 9133, 9277, 9349, 9733, 10133, 10529, 10601, 11093, 11177, 11257, 11677, 11701
Offset: 1

Views

Author

Vladimir Shevelev, Sep 30 2008

Keywords

Examples

			a(1)=3037 since p=3037 is the least prime of the form 4k+1 for which sp-(floor(sqrt(sp)))^2 is not a square for s=1..16, but 17p-(floor(sqrt(17p)))^2 is a square (for p=3037 it is 100).
		

Crossrefs

Programs

  • Maple
    filter:= proc(p) local s;
      if not isprime(p) then return false fi;
      for s from 1 to 17 do
        if issqr(s*p - floor(sqrt(s*p))^2) then return evalb(s=17) fi
      od;
      false
    end proc:
    select(filter, [seq(i,i=1..10000,4)]); # Robert Israel, Jan 22 2024

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

A145215 a(n) is the minimal prime of the form 4k+1 for which s=A008784(n) is the minimal positive integer such that s*a(n)-floor(sqrt(s*a(n)))^2 is a square.

Original entry on oeis.org

5, 41, 353, 1237, 2749, 3037, 10369, 6569, 27253, 38561, 14897, 33289, 27917, 171629, 143513, 76081, 37649, 373273, 399181, 63029, 133157, 637601, 425197, 94261, 499321, 910853, 229849, 149837
Offset: 1

Views

Author

Vladimir Shevelev, Oct 05 2008

Keywords

Comments

See the conjecture in the comment at A145047. In addition, I conjecture that for every such s there exist infinitely many primes of the form 4k+1.

Crossrefs

Programs

  • PARI
    f(s)=forprime(p=2,,if(p%4>1 || !issquare(s*p-sqrtint(s*p)^2),next);for(i=1,s-1,if(issquare(i*p-sqrtint(i*p)^2), next(2)));return(p))
    S=select(n->if(n%2==0, if(n%4, n/=2, return(0))); n==1||vecmax(factor(n)[, 1]%4)==1, vector(150,i,i));
    apply(f, S) \\ Charles R Greathouse IV, Feb 07 2013

Extensions

a(22) corrected by Charles R Greathouse IV, Feb 07 2013

A245474 a(n) = smallest positive integer s such that s*n - floor(sqrt(s*n))^2 is a square.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 6, 7, 1, 1, 1, 11, 3, 1, 14, 3, 1, 1, 2, 19, 1, 21, 22, 23, 6, 1, 1, 3, 7, 1, 3, 31, 2, 33, 1, 35, 1, 1, 38, 6, 1, 2, 42, 43, 11, 1, 46, 47, 3, 1, 1, 3, 2, 1, 6, 55, 14, 57, 1, 59, 6, 2, 62, 7, 1, 1, 66, 67, 1, 69, 35, 71, 2, 1, 2, 3, 19
Offset: 0

Views

Author

Thomas Ordowski, Jul 23 2014

Keywords

Comments

a(n) <= n for n > 0. If prime p == 3 (mod 4) then a(p) = p.
Conjecture: a(p) < p for prime p == 1 (mod 4).
Outline of proof of conjecture: write p = x^2 + y^2. Since gcd(x,y) = 1, there are u,v with x*u + y*v = 1, u^2 + v^2 < y^2 + x^2 = p. Taking s = u^2 + v^2, s*p = (u*y+v*x)^2 + 1^2, and |u*y+v*x| = floor(sqrt(s*p)). - Robert Israel, Aug 04 2014
For the first 100000 primes p == 1 (mod 4), a(p) < sqrt(p)/2. - Robert Israel, Aug 03 2014

Crossrefs

Programs

  • Maple
    A:= proc(n) local s,a;
         for s from 1 do
           a:= floor(sqrt(s*n));
           if issqr(s*n-a^2) then return s fi
         od
    end proc:
    seq(A(n),n=0..1000); # Robert Israel, Jul 23 2014
  • Mathematica
    a245474[n_Integer] := Catch[
      Do[
       If[IntegerQ[Sqrt[(s*n - Floor[Sqrt[s*n]]^2)]] == True, Throw[s]],
       {s, n}]
      ]; Map[a245474, Range[100]] (* Michael De Vlieger, Aug 03 2014 *)
  • PARI
    a(n) = s=1; while(!issquare(s*n-sqrtint(s*n)^2), s++); s \\ Colin Barker, Jul 23 2014

Extensions

More terms from Colin Barker, Jul 23 2014

A145043 Primes p for which s=2 is the least positive integer such that sp-t(sp) is a triangular number, where t(n) is the maximal triangular number not exceeding n.

Original entry on oeis.org

5, 17, 23, 47, 53, 71, 73, 127, 173, 233, 251, 269, 281, 347, 353, 359, 431, 487, 491, 509, 541, 563, 569, 593, 613, 677, 743, 773, 827, 857, 863, 883, 929, 953, 977, 1013, 1153, 1187, 1283, 1319, 1361, 1373, 1439, 1481, 1583, 1613, 1619, 1709, 1871, 1997
Offset: 1

Views

Author

Vladimir Shevelev, Sep 30 2008

Keywords

Crossrefs

Programs

  • PARI
    maxt(n) = {k = 1; while ((t=k*(k+1)/2) < n, k++); if (t == n, t, k--; k*(k+1)/2);}
    lista(nn) = {forprime(p = 2, nn, if (! ispolygonal(p - maxt(p), 3) && ispolygonal(2*p - maxt(2*p), 3), print1(p, ", ");););} \\ Michel Marcus, Jul 25 2014

Extensions

More terms from Michel Marcus, Jul 25 2014

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
Showing 1-10 of 13 results. Next