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

A263721 The prime p in the Fouvry-Iwaniec prime k^2 + p^2 (A185086), or the larger of k and p if both are prime.

Original entry on oeis.org

2, 3, 5, 5, 7, 5, 3, 5, 3, 7, 11, 7, 11, 13, 7, 2, 13, 13, 5, 17, 13, 11, 5, 17, 7, 17, 19, 3, 17, 7, 19, 5, 11, 19, 13, 23, 5, 17, 19, 13, 23, 5, 2, 19, 17, 11, 5, 23, 29, 29, 23, 19, 29, 13, 31, 31, 23, 11, 3, 5, 31, 13, 2, 29, 5, 13, 31, 2, 11, 5, 31, 37, 23, 37, 3, 7, 23, 3, 13, 31, 19, 37, 41, 11
Offset: 1

Views

Author

Keywords

Comments

The sequence is well-defined by the uniqueness part of Fermat's two-squares theorem.
The sequence is infinite, since Fouvry and Iwaniec proved that A185086 is infinite.

Examples

			A185086(2) = 13 = 2^2 + 3^2 and A185086(6) = 61 = 5^2 + 6^2, so a(2) = 3 and a(6) = 5.
		

Crossrefs

Programs

  • Mathematica
    p = 2; lst = {}; While[p < 100, k = 1; While[k < 101, If[PrimeQ[k^2 + p^2], AppendTo[lst, {k^2 + p^2, If[PrimeQ@ k, Max[k, p], p]}]]; k++]; p = NextPrime@ p]; Transpose[Union@ lst][[2]]
  • PARI
    do(lim)=my(v=List(),p2,t); forprime(p=2, sqrtint(lim\=1), p2=p^2; for(k=1, sqrtint(lim-p2), if(isprime(t=p2+k^2), listput(v, [t, if(isprime(k),max(k,p),p)])))); v=vecsort(Set(v),1); apply(u->u[2], v) \\ Charles R Greathouse IV, Aug 21 2017

Formula

a(n)^2 = A185086(n) - k^2 for some integer k > 0.

A028916 Friedlander-Iwaniec primes: Primes of form a^2 + b^4.

Original entry on oeis.org

2, 5, 17, 37, 41, 97, 101, 137, 181, 197, 241, 257, 277, 281, 337, 401, 457, 577, 617, 641, 661, 677, 757, 769, 821, 857, 881, 977, 1097, 1109, 1201, 1217, 1237, 1297, 1301, 1321, 1409, 1481, 1601, 1657, 1697, 1777, 2017, 2069, 2137, 2281, 2389, 2417, 2437
Offset: 1

Views

Author

Keywords

Comments

John Friedlander and Henryk Iwaniec proved that there are infinitely many such primes.
A256852(A049084(a(n))) > 0. - Reinhard Zumkeller, Apr 11 2015
Primes in A111925. - Robert Israel, Oct 02 2015
Its intersection with A185086 is A262340, by the uniqueness part of Fermat's two-squares theorem. - Jonathan Sondow, Oct 05 2015
Cunningham calls these semi-quartan primes. - Charles R Greathouse IV, Aug 21 2017
Primes of the form (x^2 + y^2)/2, where x > y > 0, such that (x-y)/2 or (x+y)/2 is square. - Thomas Ordowski, Dec 04 2017
Named after the Canadian mathematician John Benjamin Friedlander (b. 1941) and the Polish-American mathematician Henryk Iwaniec (b. 1947). - Amiram Eldar, Jun 19 2021

Examples

			2 = 1^2 + 1^4.
5 = 2^2 + 1^4.
17 = 4^2 + 1^4 = 1^2 + 2^4.
		

Crossrefs

Cf. A000290, A000583, A000040, A256852, A256863 (complement), A002645 (subsequence), subsequence of A247857.
Primes of form n^2 + b^4, b fixed: A002496 (b = 1), A243451 (b = 2), A256775 (b = 3), A256776 (b = 4), A256777 (b = 5), A256834 (b = 6), A256835 (b = 7), A256836 (b = 8), A256837 (b = 9), A256838 (b = 10), A256839 (b = 11), A256840 (b = 12), A256841 (b = 13).

Programs

  • Haskell
    a028916 n = a028916_list !! (n-1)
    a028916_list = map a000040 $ filter ((> 0) . a256852) [1..]
    -- Reinhard Zumkeller, Apr 11 2015
  • Maple
    N:= 10^5: # to get all terms <= N
    S:= {seq(seq(a^2+b^4, a = 1 .. floor((N-b^4)^(1/2))),b=1..floor(N^(1/4)))}:
    sort(convert(select(isprime,S),list)); # Robert Israel, Oct 02 2015
  • Mathematica
    nn = 10000; t = {}; Do[n = a^2 + b^4; If[n <= nn && PrimeQ[n], AppendTo[t, n]], {a, Sqrt[nn]}, {b, nn^(1/4)}]; Union[t] (* T. D. Noe, Aug 06 2012 *)
  • PARI
    list(lim)=my(v=List([2]),t);for(a=1,sqrt(lim\=1),forstep(b=a%2+1, sqrtint(sqrtint(lim-a^2)), 2, t=a^2+b^4;if(isprime(t),listput(v,t)))); vecsort(Vec(v),,8) \\ Charles R Greathouse IV, Jun 12 2013
    

Extensions

Title expanded by Jonathan Sondow, Oct 02 2015

A045637 Primes of the form p^2 + 4, where p is prime.

Original entry on oeis.org

13, 29, 53, 173, 293, 1373, 2213, 4493, 5333, 9413, 10613, 18773, 26573, 27893, 37253, 54293, 76733, 85853, 94253, 97973, 100493, 120413, 139133, 214373, 237173, 253013, 299213, 332933, 351653, 368453, 375773, 458333, 552053, 619373
Offset: 1

Views

Author

Keywords

Comments

These are the only primes that are the sum of two primes squared. 11 = 3^2 + 2 is the only prime of the form p^2 + 2 because all primes greater than 3 can be written as p=6n-1 or p=6n+1, which allows p^2+2 to be factored. - T. D. Noe, May 18 2007
Infinite under the Bunyakovsky conjecture. - Charles R Greathouse IV, Jul 04 2011
All terms > 29 are congruent to 53 mod 120. - Zak Seidov, Nov 06 2013

Examples

			29 belongs to the sequence because it equals 5^2 + 4.
		

Crossrefs

The corresponding primes p are in A062324.
Subsequence of A005473 (and thus A185086).

Programs

  • Mathematica
    Select[Prime[ # ]^2+4&/@Range[140], PrimeQ]
  • PARI
    forprime(p=2,1e4,if(isprime(t=p^2+4),print1(t","))) \\ Charles R Greathouse IV, Jul 04 2011

Formula

a(n) = A062324(n)^2 + 4. - Zak Seidov, Nov 06 2013

Extensions

Edited by Dean Hickerson, Dec 10 2002

A005473 Primes of form k^2 + 4.

Original entry on oeis.org

5, 13, 29, 53, 173, 229, 293, 733, 1093, 1229, 1373, 2029, 2213, 3253, 4229, 4493, 5333, 7229, 7573, 9029, 9413, 10613, 13229, 13693, 15629, 18229, 18773, 21613, 24029, 26573, 27893, 31333, 33493, 37253, 41213, 42853, 46229, 47093, 54293
Offset: 1

Views

Author

Keywords

Comments

a(n) mod 24 = 5 or 13 and if a(n) mod 24 =13 then a(n) mod 72 = 13.
From Artur Jasinski, Oct 30 2008: (Start)
Primes p such that the continued fraction of (1+sqrt(p))/2 has period 1.
Primes in A078370 = primes of the form 4*k^2 + 4*k + 5 = (2*k+1)^2 + 4.
(End)
Starting at a(3) all the primes in this sequence can be expressed as the following sum: ((2*k+1)*(2*k+3)+(2*k+3)*(2*k+5)+(2*k+5)+(2*k+7)+(2*k+7)*(2*k+9))/4 for some values (not all!) of k>=0. Thus for a(5)=173 the sum is (9*11 + 11*13 + 13*15 + 15*17)/4=173. - J. M. Bergot, Nov 03 2014

Examples

			a(2)=29 since 29=5^2+4 is prime.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subsequence of A185086.
a(n)-4 is contained in A016754. (a(n)-5)/8 is contained in A000217. Either (a(n)-5)/24 is contained in A001318 (if a(n) mod 24=5) or (a(n)-13)/72 is contained in A000217 (if a(n) mod 24=13). Floor[a(n)/24] is contained in A001840.

Programs

  • Haskell
    a005473 n = a005473_list !! (n-1)
    a005473_list = filter ((== 1) . a010051') $ map (+ 4) a000290_list
    -- Reinhard Zumkeller, Mar 12 2012
  • Magma
    [a: n in [0..300] | IsPrime(a) where a is n^2+4]; // Vincenzo Librandi, Nov 30 2011
    
  • Maple
    select(isprime,[seq(4*k^2 + 4*k + 5, k=0..1000)]); # Robert Israel, Nov 02 2014
  • Mathematica
    Intersection[Table[n^2+4,{n,0,10^2}],Prime[Range[9*10^3]]] ...or... For[i=4,i<=4,a={};Do[If[PrimeQ[n^2+i],AppendTo[a,n^2+i]],{n,0,100}];Print["n^2+",i,",",a];i++ ] (* Vladimir Joseph Stephan Orlovsky, Apr 29 2008 *)
    aa = {}; Do[If[PrimeQ[4 k^2 + 4 k + 5], AppendTo[aa, 4 k^2 + 4 k + 5]], {k, 0, 200}]; aa (* Artur Jasinski, Oct 30 2008 *)
    Select[Table[n^2+4,{n,0,7000}],PrimeQ] (* Vincenzo Librandi, Nov 30 2011 *)
  • PARI
    for(n=1,1e3,if(isprime(t=n^2+4),print1(t","))) \\ Charles R Greathouse IV, Jul 05 2011
    

Formula

a(n) = 24*A056904(n)+m, where m=13 if A056904(n) is three times a triangular number (and n>0) and m=5 if A056904(n) is not three times a triangular number (or n=0).
For n>=2, a(n) = A098062(n-1). - Zak Seidov, Apr 12 2007

Extensions

More terms and additional comments from Henry Bottomley, Jul 06 2000

A240130 Least prime of the form prime(n)^2 + k^2, or 0 if none.

Original entry on oeis.org

5, 13, 29, 53, 137, 173, 293, 397, 593, 857, 977, 1373, 1697, 1913, 2213, 2909, 3517, 3821, 4493, 5077, 5333, 6257, 7213, 7937, 9413, 10301, 10613, 11549, 11897, 13093, 16193, 17417, 18773, 19421, 22397, 22817, 24749, 26573, 27893, 30029
Offset: 1

Views

Author

Jonathan Sondow, Apr 07 2014

Keywords

Comments

The positive terms form a subsequence of A185086 = Fouvry-Iwaniec primes = primes of the form prime^2 + integer^2.
The values of k are A240131.
Is a(n) < a(n+1) for all n? (I have checked it for n <= 10^6.) Note that A240131 is far from being monotone.

Examples

			Prime(2) = 3 and 3^2 + 1^2 = 10 is not prime but 3^2 + 2^2 = 13 is prime, so a(2) = 13.
		

Crossrefs

Programs

  • Maple
    g:= proc(p) local k; for k from 2 by 2 do if isprime(p^2 + k^2) then return p^2+k^2 fi od end proc:
    g(2):= 5:
    seq(g(ithprime(i)),i=1..1000); # Robert Israel, Nov 04 2015
  • Mathematica
    Table[First[Select[Prime[n]^2 + Range[20]^2, PrimeQ]], {n, 40}]
  • PARI
    a(n) = {p = prime(n); k = 1 - p%2; inc = 2; while (!isprime(q=p^2+k^2), k += inc); q;} \\ Michel Marcus, Nov 04 2015

Formula

a(n) == 1 (mod 4) if a(n) > 0.
a(n) > 0 if Bunyakovsky's conjecture is true.
a(n) <> a(m) if n <> m and a(n) > 0, by uniqueness in Fermat's 4n+1 Theorem.
a(n) = prime(n)^2 + A240131(n)^2 if a(n) > 0.

A263722 Integers k > 0 such that k^2 + p^2 is composite for all primes p.

Original entry on oeis.org

9, 11, 19, 21, 23, 25, 29, 31, 39, 41, 43, 49, 51, 53, 55, 59, 61, 63, 69, 71, 75, 77, 79, 81, 83, 89, 91, 93, 99, 101, 105, 107, 109, 111, 113, 119, 121, 123, 127, 129, 131, 133, 139, 141, 143, 145, 149, 151, 153, 157, 159, 161, 165, 169, 171, 173, 175, 179, 181, 185, 187, 189, 191, 195, 197, 199
Offset: 1

Views

Author

Keywords

Comments

Conjecture: All terms are odd. An equivalent conjecture in A263977 is that if k > 0 is even, then k^2 + p^2 is prime for some prime p. We have checked this for all k <= 12*10^7.
An odd number k is a term if and only if k^2 + 2^2 is composite, since k^2 + p^2 is even and > 2 (hence composite) for all odd primes p. Thus if the Conjecture is true, then the sequence is simply odd k such that k^2 + 4 is composite. The sequence of odd k, such that k^2 + 4 is prime, is A007591.
The complementary sequence is A263977. Given k in it, the smallest prime p, such that k^2 + p^2 is prime, is in A263726. These numbers k^2 + p^2 form A185086, the Fouvry-Iwaniec primes.

Examples

			9^2 + 2^2 = 85 = 5*17, 11^2 + 2^2 = 125 = 5^3, and 23^2 + 2^2 = 533 = 13*41 are composite, so 9, 11, and 23 are members.
1^2 + 2^2 = 5 and 2^2 + 3^3 = 13 are prime, so 1, 2, and 3 are not members.
		

Crossrefs

A138353 Primes of the form k^2 + 9.

Original entry on oeis.org

13, 73, 109, 409, 1033, 1453, 1609, 2713, 3373, 3853, 4909, 6733, 7753, 9613, 10009, 12109, 12553, 13933, 19609, 20173, 25609, 28909, 35353, 36109, 40009, 40813, 44953, 47533, 48409, 58573, 88813, 94873, 102409, 110233, 122509, 128173, 135433
Offset: 1

Views

Author

Keywords

Comments

It is easy to show that k mod 12 must be 2,4,8,10 and that since k^2 mod 12 = 4, then p mod 12 = 1. In base 12, the sequence is 11, 61, 91, 2X1, 721, X11, E21, 16X1, 1E51, 2291, 2X11, 3X91, 45X1, 5691, 5961, 7011, 7321, 8091, E421, E811, 129X1, where X is for 10, E is for 11. - Walter Kehowski, May 31 2008

Crossrefs

Subsequence of A185086.

Programs

  • Haskell
    a138353 n = a138353_list
    a138353_list = filter ((== 1) . a010051') $ map (+ 9) a000290_list
    -- Reinhard Zumkeller, Mar 12 2012
    
  • Magma
    [ a: n in [0..900] | IsPrime(a) where a is n^2+9] // Vincenzo Librandi, Nov 24 2010
    
  • Mathematica
    Intersection[Table[n^2+9,{n,0,10^2}],Prime[Range[9*10^3]]] ...or... For[i=9,i<=9,a={};Do[If[PrimeQ[n^2+i],AppendTo[a,n^2+i]],{n,0,100}];Print["n^2+",i,",",a];i++ ]
    Select[Range[400]^2+9,PrimeQ] (* Harvey P. Dale, Jan 31 2017 *)
  • PARI
    is(n)=isprime(n) && issquare(n-9) \\ Charles R Greathouse IV, Aug 21 2017

Extensions

More terms from Vincenzo Librandi, Apr 28 2010

A262340 Primes of the form p^2 + b^4 where p is a prime.

Original entry on oeis.org

5, 41, 137, 281, 617, 857, 977, 1097, 1217, 1321, 1657, 1697, 2137, 4217, 4457, 4937, 5297, 6257, 6337, 7537, 7577, 7817, 7937, 9137, 10009, 10169, 10289, 10337, 10457, 10529, 11369, 11497, 11681, 11897, 12809, 13177, 13721, 14489, 15329, 16889, 17417
Offset: 1

Views

Author

Jonathan Sondow, Oct 03 2015

Keywords

Comments

It is not known whether there are infinitely many primes of such form.
Same as the intersection of A185086 (primes of the form p^2 + k^2 where p is a prime) with A028916 (primes of the form a^2 + b^4). (Proof: Clearly, p^2 + b^4 is in A185086 and in A028916. Conversely, if a(n) = p^2 + k^2 = a^2 + b^4, then by the uniqueness part of Fermat's two squares (or 4n+1) theorem, (p,k) = (a,b^2) or (p,k) = (b^2,a). But the latter is impossible since p is prime, so a(n) = p^2 + b^4.)

Examples

			5 = 2^2 + 1^4, so a(1) = 5.
		

Crossrefs

Programs

  • Mathematica
    nn = 14; Union[ Flatten[ Table[ Select[ Prime[n]^2 + Range[nn]^4, PrimeQ[#] && # < nn^4 &], {n,PrimePi[nn^2]}]]]
  • PARI
    list(lim)=my(v=List(),p2,t); forprime(p=2,sqrtint(lim\=1), p2=p^2; forstep(x=1+p%2,sqrtnint(lim-p2,4),2, if(isprime(t=p2+x^4), listput(v,t)))); Set(v) \\ Charles R Greathouse IV, Aug 21 2017

A361300 Numbers of the form m^2 + p^2 for p prime and m > 0.

Original entry on oeis.org

5, 8, 10, 13, 18, 20, 25, 26, 29, 34, 40, 41, 45, 50, 53, 58, 61, 65, 68, 73, 74, 85, 89, 90, 98, 104, 106, 109, 113, 122, 125, 130, 137, 146, 148, 149, 153, 157, 169, 170, 173, 178, 185, 193, 194, 200, 202, 205, 218, 221, 229, 233, 234, 242
Offset: 1

Views

Author

Keywords

Comments

Rieger proves that there are >> x/log x terms of this sequence up to x, and together with the trivial upper bound << x/log x this shows that a(n) ≍ n log n. (Rieger does not prove that a(n) ~ n log n, the constant factor may be larger.)

Crossrefs

Subsequence of A000404; A185086 is a subsequence.

Programs

  • PARI
    list(lim)=my(v=List()); forprime(p=2,sqrtint(lim\=1), my(p2=p^2); for(m=1,sqrtint(lim-p2), listput(v,p2+m^2))); Set(v)
Showing 1-9 of 9 results.