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.

A244031 Integers n>1 such that the quadratic form x^2+n*y^2 does not represent a prime strictly between n and 2n.

Original entry on oeis.org

3, 5, 8, 11, 17, 23, 24, 26, 29, 35, 41, 56, 59, 68, 83, 89, 107, 119, 120, 125, 134, 179, 185, 194, 206, 251, 263, 269, 290, 293, 314, 326, 341, 356, 371, 389, 401, 404, 461, 464, 479, 489, 491, 524, 545, 569, 593, 626
Offset: 1

Views

Author

N. J. A. Sloane, Jun 22 2014

Keywords

Comments

Or: Positive numbers n such that n + k^2 is composite for all 1 <= k^2 <= n.
The next term a(105), if it exists, is > 156*10^6. - M. F. Hasler, May 07 2018

Crossrefs

Union of A244029 (subsequence of primes) and A244030 (composite terms).

Programs

  • PARI
    is(n)=!for(k=1,sqrtint(n),isprime(n+k^2)&&return) \\ M. F. Hasler, May 07 2018

Extensions

Added "n>1" as suggested by David J. Seal. - N. J. A. Sloane, May 19 2018

A244029 Primes p such that the quadratic form x^2+p*y^2 does not represent a prime strictly between p and 2p.

Original entry on oeis.org

3, 5, 11, 17, 23, 29, 41, 59, 83, 89, 107, 179, 251, 263, 269, 293, 389, 401, 461, 479, 491, 569, 593, 881, 929, 1319, 1619, 1931, 2531, 2789, 3461, 3701, 4919, 5309, 7589, 9749, 26171
Offset: 1

Views

Author

N. J. A. Sloane, Jun 22 2014

Keywords

Crossrefs

A275115 Least prime of the form x^2 + n*y^2 with x>0 and y>0.

Original entry on oeis.org

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

Views

Author

Zak Seidov and Robert G. Wilson v, Jul 17 2016

Keywords

Comments

Neither x nor y can be zero because the remaining part of the form would then be composite.
a(n) > n.
The differences, d, between a(n) and n are 1, 4, 9, 16, 24, 25, 36, 49, 64, 81, 100, 121, 132, 144, 169, 196, 225, 256, 258, 289, 324, 361, 400, 441, ..., .
Not all 'd's are squares, such as 24, 132, 258, 1032, 1167, 1518, 2103, 2472, 2652, 2706, 5793. It is conjectured that this list is complete.
d=1 for A006093;
d=4 for A172367;
d=9 for n: 8, 14, 20, 32, 34, 38, 44, 50, 62, 64, 74, 80, 92, 94, 98, 104, 118, 122, 128, 140, 142, 154, 158, ..., ;
d=16 for n: 21, 31, 45, 51, 73, 81, 87, 91, 111, 115, 121, 141, 151, 157, 165, 181, 183, 211, 213, 217, 241, ..., ;
d=25 for n: 48, 54, 76, 84, 114, 124, 132, 168, 174, 186, 204, 208, 216, 244, 246, 252, 258, 286, 288, 324, ..., ;
d=36 for n: 11, 17, 23, 35, 47, 53, 61, 65, 71, 77, 95, 101, 113, 131, 137, 143, 155, 161, 191, 197, 203, 205, ..., ;
d=49 for n: 24, 90, 144, 234, 264, 300, 318, 360, 390, 450, 472, 492, 528, 550, 558, 564, 624, 670, 678, 712, ..., ;
and for the nonsquare differences of 24, 132, 258, 1032, 1167, 1518, 2103, 2472, 2652, 2706 and 5793l, their n's are 5, 41, 59, 341, 314, 479, 626, 749, 881, 755 and 1784, respectively.
Least n that has as its difference k^2: 1, 3, 8, 21, 48, 11, 24, 117, 26, 139, 120, 29, 294, 201, 134, 621, 468, 179, 792, 1269, 356, 1249, 754, 251, 696, ..., .

Examples

			a(1) = 2 since it equals 1^2+1*1^2;
a(2) = 3 since it equals 1^2+2*1^2;
a(3) = 7 since it equals 2^2+3*1^2;
a(4) = 5 since it equals 1^2+4*1^2;
a(5) = 29 since it equals 3^2+5*2^2; etc.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p = NextPrime@ n, y}, While[y = 1; While[p > n*y^2 && !IntegerQ[ Sqrt[p - n*y^2]], y++]; !IntegerQ[ Sqrt[p - n*y^2]], p = NextPrime@ p]; p]; Array[f, 70]
  • PARI
    a(n)=if(n==1, return(2)); my(best,x=1+n%2,t); while(!isprime(best=x^2+n), x += 2); for(y=2,sqrtint((best-2)\n), t=best-n*y^2; if(t<1, return(best)); for(x=1,sqrtint(t), if(isprime(t=x^2+n*y^2) && tCharles R Greathouse IV, Jul 17 2016

Formula

a(n-1) = n iff n is prime.
Showing 1-3 of 3 results.