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.

Previous Showing 21-30 of 37 results. Next

A185086 Fouvry-Iwaniec primes: Primes of the form k^2 + p^2 where p is a prime.

Original entry on oeis.org

5, 13, 29, 41, 53, 61, 73, 89, 109, 113, 137, 149, 157, 173, 193, 229, 233, 269, 281, 293, 313, 317, 349, 353, 373, 389, 397, 409, 433, 449, 461, 509, 521, 557, 569, 593, 601, 613, 617, 653, 673, 701, 733, 761, 773, 797, 809, 853, 857, 877, 929, 937, 941, 953
Offset: 1

Views

Author

Keywords

Comments

Sequence is infinite, see Fouvry & Iwaniec.
Its intersection with A028916 is A262340, by the uniqueness part of Fermat's two-squares theorem. - Jonathan Sondow, Oct 05 2015
Named after the French mathematician Étienne Fouvry (b. 1953) and the Polish-American mathematician Henryk Iwaniec (b. 1947). - Amiram Eldar, Jun 20 2021

Crossrefs

Subsequence of A002144 and hence of A002313.
The positive terms of A240130 form a subsequence.

Programs

  • Haskell
    a185086 n = a185086_list !! (n-1)
    a185086_list = filter (\p -> any ((== 1) . a010052) $
                   map (p -) $ takeWhile (<= p) a001248_list) a000040_list
    -- Reinhard Zumkeller, Mar 17 2013
  • Mathematica
    nn = 1000; Union[Reap[Do[n = k^2 + p^2; If[n <= nn && PrimeQ[n], Sow[n]], {k, Sqrt[nn]}, {p, Prime[Range[PrimePi[Sqrt[nn]]]]}]][[2, 1]]]
  • PARI
    is(n)=forprime(p=2,sqrtint(n),if(issquare(n-p^2),return(isprime(n))));0
    
  • PARI
    list(lim)=my(v=List(),N,t);forprime(p=2,sqrt(lim), N=p^2; for(n=1,sqrt(lim-N), if(ispseudoprime(t=N+n^2), listput(v,t)))); v=vecsort(Vec(v),,8); v
    

A256852 Number of ways to write prime(n) = a^2 + b^4.

Original entry on oeis.org

1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 11 2015

Keywords

Comments

a(A049084(A028916(n))) > 0; a(A049084(A256863(n))) = 0;
Conjecture: a(n) <= 2, empirically checked for the first 10^6 primes.
The conjecture is true, because by the uniqueness part of Fermat's two-squares theorem, at most one duplicate of a^2 + b^4 can exist. Namely, if a is a square, say a = B^2, then a^2 + b^4 = A^2 + B^4 where A = b^2. - Jonathan Sondow, Oct 03 2015
Friedlander and Iwaniec proved that a(n) > 0 infinitely often. - Jonathan Sondow, Oct 05 2015

Examples

			First numbers n, such that a(n) > 0:
.   k |  n |   prime(n)                    | a(n)
. ----+----+-------------------------------+-----
.   1 |  1 |    2 = 1^2 + 1^4              |   1
.   2 |  3 |    5 = 2^2 + 1^4              |   1
.   3 |  7 |   17 = 1^2 + 2^4 = 4^2 + 1^4  |   2
.   4 | 12 |   37 = 6^2 + 1^4              |   1
.   5 | 13 |   41 = 5^2 + 2^4              |   1
.   6 | 25 |   97 = 4^2 + 3^4 = 9^2 + 2^4  |   2
.   7 | 33 |  101 = 10^2 + 1^4             |   1
.   8 | 42 |  181 = 10^2 + 3^4             |   1
.   9 | 45 |  197 = 14^2 + 1^4             |   1
.  10 | 53 |  241 = 15^2 + 2^4             |   1
.  11 | 55 |  257 = 1^2 + 4^4 = 16^2 + 1^4 |   2
.  12 | 59 |  277 = 14^2 + 3^4             |   1
.  13 | 60 |  281 = 5^2 + 4^4              |   1
.  14 | 68 |  337 = 9^2 + 4^4 = 16^2 + 3^4 |   2
.  15 | 79 |  401 = 20^2 + 1^4             |   1
.  16 | 88 |  457 = 21^2 + 2^4             |   1 .
		

Crossrefs

Programs

  • Haskell
    a256852 n = a256852_list !! (n-1)
    a256852_list = f a000040_list [] $ tail a000583_list where
       f ps'@(p:ps) us vs'@(v:vs)
         | p > v     = f ps' (v:us) vs
         | otherwise = (sum $ map (a010052 . (p -)) us) : f ps us vs'

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

A078523 Primes of the form a^2 + b^6.

Original entry on oeis.org

2, 5, 17, 37, 73, 89, 101, 113, 197, 233, 257, 353, 401, 577, 593, 677, 733, 829, 1129, 1153, 1213, 1289, 1297, 1433, 1601, 1753, 1913, 2089, 2273, 2917, 3089, 3137, 3229, 3313, 3433, 4093, 4177, 4217, 4289, 4357, 4457, 4721, 4937, 5393, 5477, 5689, 6121
Offset: 1

Views

Author

T. D. Noe, Nov 26 2002

Keywords

Comments

Friedlander and Iwaniec prove that there are an infinite number of primes of the form a^2+b^4 (A028916). They speculate that the a^2+b^6 case can be proved by similar methods.

Examples

			73 = 3^2 + 2^6
		

Crossrefs

Cf. A028916.

Programs

  • Mathematica
    maxN=10000; lst={}; Do[p=i^2+j^6; If[p
    				
  • PARI
    list(lim)=my(v=List([2]),b6,t); lim\=1; for(b=1,sqrtnint(lim-1,6), b6=b^6; forstep(a=1+b%2,sqrtint(lim-b6),2, if(isprime(t=a^2+b6), listput(v,t)))); Set(v) \\ Charles R Greathouse IV, Aug 18 2017

A100271 Primes of the form a^4 + b^3 with b>0.

Original entry on oeis.org

2, 17, 43, 89, 257, 283, 359, 593, 599, 1297, 2213, 2617, 3391, 3631, 4129, 4177, 4721, 6569, 7561, 8081, 8233, 9277, 10343, 10657, 10729, 11273, 12197, 13049, 13463, 14449, 14561, 15641, 15881, 16369, 16921, 17209, 17657, 19699, 22067, 24137
Offset: 1

Views

Author

T. D. Noe, Nov 18 2004

Keywords

Crossrefs

Cf. A002645 (primes of the form a^4 + b^4), A028916 (primes of the form a^4 + b^2), A100291 (numbers of the form a^4 + b^3).

Programs

  • Mathematica
    lst={}; Do[p=a^4+b^3; If[p<50000&&PrimeQ[p], AppendTo[lst, p]], {a, 64}, {b, 256}]; Union[lst]
  • PARI
    list(lim)=my(v=List([2]),a4,t); lim\=1; for(a=1,sqrtnint(lim-1,4), a4=a^4; forstep(b=1+a%2,sqrtnint(lim-a4,3),2, if(isprime(t=a4+b^3), listput(v,t)))); Set(v) \\ Charles R Greathouse IV, Aug 18 2017

A247857 Primes of the form a^2 + b^4, with repetition.

Original entry on oeis.org

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

Views

Author

Jean-François Alcover, Sep 25 2014

Keywords

Comments

Duplicates, which begin 17, 97, 257, 337, etc, are quartan primes A002645, except 2 (noticed by Michel Marcus).
Is there any triple?
No, by the uniqueness part of Fermat's two-squares theorem, at most one duplicate of a^2 + b^4 can exist. Namely, when a is a square, say a = B^2, then a^2 + b^4 = A^2 + B^4 where A = b^2. (This also proves Marcus's comment, since a^2 + b^4 = b^4 + B^4.) - Jonathan Sondow, Oct 03 2015

Examples

			Since 97 = 4^2 + 3^4 = 9^2 + 2^4, it appears twice in the sequence.
		

Crossrefs

Cf. A002645, A028916 (same sequence without repetition).

Programs

  • Haskell
    a247857 n = a247857_list !! (n-1)
    a247857_list = concat $ zipWith replicate a256852_list a000040_list
    -- Reinhard Zumkeller, Apr 11 2015
  • Mathematica
    max = 10^4; r = Reap[Do[n = a^2 + b^4; If[n <= max && PrimeQ[n], Sow[n]], {a, Sqrt[max]}, {b, max^(1/4)}]][[2, 1]]; Union[r, SameTest -> (False&)]

A247858 Decimal expansion of the value of the continued fraction [0; 2, 5, 17, 17, 37, 41, 97, 97, ...], generated with primes of the form a^2 + b^4.

Original entry on oeis.org

4, 5, 5, 0, 2, 4, 8, 1, 6, 4, 9, 0, 1, 7, 0, 0, 2, 2, 3, 6, 9, 0, 5, 2, 8, 0, 8, 2, 7, 9, 7, 4, 4, 8, 2, 4, 1, 0, 5, 7, 5, 5, 5, 4, 8, 9, 0, 5, 0, 7, 6, 4, 4, 0, 5, 6, 8, 5, 4, 1, 8, 5, 9, 1, 5, 0, 8, 4, 6, 0, 8, 5, 0, 1, 0, 7, 1, 8, 6, 3, 1, 4, 3, 6, 3, 1, 0, 6, 6, 7, 6, 9, 7, 5, 4, 6, 0, 4, 5, 1, 9, 9, 2
Offset: 0

Views

Author

Jean-François Alcover, Sep 25 2014

Keywords

Examples

			1/(2 + 1/(5 + 1/(17 + 1/(17 + 1/(37 + 1/(41 + 1/(97 + 1/(97 + ...))))))))
0.45502481649017002236905280827974482410575554890507644...
		

Crossrefs

Programs

  • Mathematica
    max = 1000; r = Reap[Do[n = a^2 + b^4; If[n <= max && PrimeQ[n], Sow[n]], {a, Sqrt[max]}, {b, max^(1/4)}]][[2, 1]]; u = Union[r, SameTest -> (False&)] ; RealDigits[FromContinuedFraction[Join[{0}, u]], 10, 103] // First

A256863 Primes that can't be written in form a^2 + b^4.

Original entry on oeis.org

3, 7, 11, 13, 19, 23, 29, 31, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 103, 107, 109, 113, 127, 131, 139, 149, 151, 157, 163, 167, 173, 179, 191, 193, 199, 211, 223, 227, 229, 233, 239, 251, 263, 269, 271, 283, 293, 307, 311, 313, 317, 331, 347, 349, 353
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 11 2015

Keywords

Comments

Complement of A028916;
A256852(A049084(a(n))) = 0.

Crossrefs

Programs

  • Haskell
    a256863 n = a256863_list !! (n-1)
    a256863_list = map a000040 $ filter ((== 0) . a256852) [1..]
  • Mathematica
    Reap[Do[If[Reduce[p == a^2 + b^4, {a, b}, Integers] === False, Sow[p]], {p, Prime[Range[80]]}]][[2, 1]] (* Jean-François Alcover, Jan 31 2018 *)

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.

A276533 Least prime p with A271518(p) = n.

Original entry on oeis.org

5, 2, 19, 127, 17, 67, 163, 41, 89, 101, 131, 313, 257, 211, 227, 461, 241, 401, 613, 337, 433, 353, 577, 467, 863, 887, 617, 787, 601, 569, 761, 641, 823, 673, 857, 1217, 881, 1091, 1289, 977, 1427, 1097, 1801, 929, 1153, 953, 1321, 1049, 1747, 1409
Offset: 1

Views

Author

Zhi-Wei Sun, Dec 12 2016

Keywords

Comments

Conjecture: a(n) exists for any positive integer n.
In contrast, it is known that for each prime p the number of ordered integral solutions to the equation x^2 + y^2 + z^2 + w^2 = p is 8*(p+1).
In 1998 J. Friedlander and H. Iwaniec proved that there are infinitely many primes p of the form w^2 + x^4 = w^2 + (x^2)^2 + 0^2 + 0^2 with w and x nonnegative integers. Since x^2 + 3*0 + 5*0 is a square, we see that A271518(p) > 0 for infinitely many primes p.

Examples

			a(1) = 5 since 5 is the first prime which can be written in a unique way as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integer and x + 3*y + 5*z a square; in fact, 5 = 1^2 + 0^2 + 0^2 + 2^2 with 1 + 3*0 + 5*0 = 1^2.
a(2) = 2 since 2 = 1^2 + 0^2 + 0^2 + 1^2 with 1 + 3*0 + 5*0 = 1^2, and 2 = 1^2 + 1^2 + 0^2 + 0^2 with 1 + 3*1 + 5*0 = 2^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Do[m=0;Label[aa];m=m+1;r=0;Do[If[SQ[Prime[m]-x^2-y^2-z^2]&&SQ[x+3y+5z],r=r+1;If[r>n,Goto[aa]]],{x,0,Sqrt[Prime[m]]},{y,0,Sqrt[Prime[m]-x^2]},{z,0,Sqrt[Prime[m]-x^2-y^2]}];If[r
    				
Previous Showing 21-30 of 37 results. Next