The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A275115 Least prime of the form x^2 + n*y^2 with x>0 and y>0. 1
 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 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 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, ..., . LINKS Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 FORMULA a(n-1) = n iff n is prime. EXAMPLE 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. 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] PROG (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) && t

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified February 18 04:48 EST 2020. Contains 332011 sequences. (Running on oeis4.)