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.

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

This page as a plain text file.
%I A275115 #32 May 03 2017 17:29:10
%S A275115 2,3,7,5,29,7,11,17,13,11,47,13,17,23,19,17,53,19,23,29,37,23,59,73,
%T A275115 29,107,31,29,173,31,47,41,37,43,71,37,41,47,43,41,173,43,47,53,61,47,
%U A275115 83,73,53,59,67,53,89,79,59,137,61,59,317,61,97,71,67,73,101,67,71,149,73,71
%N A275115 Least prime of the form x^2 + n*y^2 with x>0 and y>0.
%C A275115 Neither x nor y can be zero because the remaining part of the form would then be composite.
%C A275115 a(n) > n.
%C A275115 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, ..., .
%C A275115 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.
%C A275115 d=1 for A006093;
%C A275115 d=4 for A172367;
%C A275115 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, ..., ;
%C A275115 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, ..., ;
%C A275115 d=25 for n: 48, 54, 76, 84, 114, 124, 132, 168, 174, 186, 204, 208, 216, 244, 246, 252, 258, 286, 288, 324, ..., ;
%C A275115 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, ..., ;
%C A275115 d=49 for n: 24, 90, 144, 234, 264, 300, 318, 360, 390, 450, 472, 492, 528, 550, 558, 564, 624, 670, 678, 712, ..., ;
%C A275115 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.
%C A275115 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, ..., .
%H A275115 Charles R Greathouse IV, <a href="/A275115/b275115.txt">Table of n, a(n) for n = 1..10000</a>
%H A275115 Zak Seidov, <a href="http://zak08.livejournal.com/28934.html">First ten primes of the form x^2+n*y^2 with x>=0, y>=0, n=1..1000.</a>
%F A275115 a(n-1) = n iff n is prime.
%e A275115 a(1) = 2 since it equals 1^2+1*1^2;
%e A275115 a(2) = 3 since it equals 1^2+2*1^2;
%e A275115 a(3) = 7 since it equals 2^2+3*1^2;
%e A275115 a(4) = 5 since it equals 1^2+4*1^2;
%e A275115 a(5) = 29 since it equals 3^2+5*2^2; etc.
%t A275115 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]
%o A275115 (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<best, best=t))); best \\ _Charles R Greathouse IV_, Jul 17 2016
%Y A275115 Cf. A002350, A232174, A212602, A212603, A212604, A212605, A244030, A244031, A006093, A172367.
%K A275115 nonn
%O A275115 1,1
%A A275115 _Zak Seidov_ and _Robert G. Wilson v_, Jul 17 2016