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-10 of 22 results. Next

A331521 a(n) is the least positive k such that A002645(n) - k^4 is a fourth power.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 4, 1, 2, 4, 6, 3, 5, 2, 8, 7, 2, 4, 6, 9, 4, 10, 5, 12, 8, 1, 3, 5, 13, 11, 2, 4, 14, 5, 7, 11, 14, 2, 6, 8, 10, 16, 12, 1, 3, 9, 14, 10, 17, 16, 2, 4, 8, 15, 10, 17, 1, 7, 11, 13, 18, 6, 8, 12, 3, 7, 19, 9, 11, 2, 19, 16, 1, 9, 13, 12, 23
Offset: 1

Views

Author

Rémy Sigrist, Jan 19 2020

Keywords

Examples

			The first terms, alongside A002645(n), are:
  n   a(n)  A002645(n)
  --  ----  ----------------
   1     1     2 = 1^4 + 1^4
   2     1    17 = 1^4 + 2^4
   3     2    97 = 2^4 + 3^4
   4     1   257 = 1^4 + 4^4
   5     3   337 = 3^4 + 4^4
   6     2   641 = 2^4 + 5^4
   7     4   881 = 4^4 + 5^4
   8     1  1297 = 1^4 + 6^4
   9     2  2417 = 2^4 + 7^4
  10     4  2657 = 4^4 + 7^4
		

Crossrefs

See A331435 for similar sequences.

Programs

  • PARI
    See Links section.

A283004 Number of primes of the form n^4 + k^4 (A002645) with 1 <= k <= n.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 3, 2, 2, 2, 3, 0, 3, 2, 2, 4, 4, 3, 6, 4, 2, 2, 5, 5, 3, 7, 3, 5, 5, 5, 2, 6, 3, 10, 3, 5, 8, 5, 6, 4, 9, 6, 9, 3, 6, 9, 8, 4, 6, 8, 7, 6, 13, 8, 6, 7, 5, 7, 9, 4, 8, 14, 3, 7, 7, 6, 7, 10, 9, 4, 14, 5, 10, 13, 5, 10, 9, 6, 14, 6, 8, 12, 11, 7, 13, 10, 14, 9, 15, 7
Offset: 1

Views

Author

Robert G. Wilson v and Altug Alkan, Feb 26 2017

Keywords

Examples

			a(4) = 2 because 4^4 + 1^4 = 257 and 4^4 + 3^4 = 337 are prime numbers.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{b = Mod[n, 2] + 1, c = 0}, While[b < n, If[ Mod[n^4 + b^4, 16] == 1 && PrimeQ[n^4 + b^4], c++]; b++]; c]; f[1] = 1; Array[f, 90]
  • PARI
    a(n) = if(n==1, 1, sum(k=1, n-1, isprime(n^4+k^4)));
    
  • PARI
    first(n)=my(v=vector(n),n4); for(N=1,n, n4=N^4; forstep(k=N%2+1,N,2, if(isprime(n4+k^4), v[N]++))); v[1]++; v \\ Charles R Greathouse IV, Feb 27 2017

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

A100266 Primes of the form x^16 + y^16.

Original entry on oeis.org

2, 65537, 4338014017, 2973697798081, 36054040477057, 314707907280257, 184884411482927041, 665698084159890497, 675416609183179841, 2177953490397261761, 8746361693522261761, 18492693803573123777
Offset: 1

Views

Author

T. D. Noe, Nov 11 2004

Keywords

Comments

The Mathematica program generates numbers of the form x^16 + y^16 in order of increasing magnitude; it accepts a number when it is prime.

Crossrefs

Cf. A100267 (primes of the form x^32 + y^32), A006686 (primes of the form x^8 + y^8), A002645 (primes of the form x^4 + y^4), A002313 (primes of the form x^2 + y^2).

Programs

  • Mathematica
    n=4; pwr=2^n; xmax=2; r=Range[xmax]; num=r^pwr+r^pwr; Table[While[p=Min[num]; x=Position[num, p][[1, 1]]; y=r[[x]]; r[[x]]++; num[[x]]=x^pwr+r[[x]]^pwr; If[x==xmax, xmax++; AppendTo[r, xmax+1]; AppendTo[num, xmax^pwr+(xmax+1)^pwr]]; !PrimeQ[p]]; p, {15}]
    q=16;lst={};Do[Do[p=n^q+m^q;If[PrimeQ[p],AppendTo[lst,p]],{n,0,5!}],{m,0,5!}];lst;Length[lst];Take[Union[lst],55] (* Vladimir Joseph Stephan Orlovsky, Feb 21 2009 *)
    Union[Select[Total[#^16]&/@Tuples[Range[20],2],PrimeQ]] (* Harvey P. Dale, Nov 03 2013 *)

A100267 Primes of the form x^32 + y^32.

Original entry on oeis.org

2, 3512911982806776822251393039617, 2211377674535255285545615254209921, 476961452964007550415682034114910337, 14748002492224459115975467901357427939457
Offset: 1

Views

Author

T. D. Noe, Nov 11 2004

Keywords

Comments

The Mathematica program generates numbers of the form x^32 + y^32 in order of increasing magnitude; it accepts a number when it is prime.

Crossrefs

Cf. A100266 (primes of the form x^16 + y^16), A006686 (primes of the form x^8 + y^8), A002645 (primes of the form x^4 + y^4), A002313 (primes of the form x^2 + y^2).

Programs

  • Mathematica
    n=5; pwr=2^n; xmax=2; r=Range[xmax]; num=r^pwr+r^pwr; Table[While[p=Min[num]; x=Position[num, p][[1, 1]]; y=r[[x]]; r[[x]]++; num[[x]]=x^pwr+r[[x]]^pwr; If[x==xmax, xmax++; AppendTo[r, xmax+1]; AppendTo[num, xmax^pwr+(xmax+1)^pwr]]; !PrimeQ[p]]; p, {10}]

A004831 Numbers that are the sum of at most 2 nonzero 4th powers.

Original entry on oeis.org

0, 1, 2, 16, 17, 32, 81, 82, 97, 162, 256, 257, 272, 337, 512, 625, 626, 641, 706, 881, 1250, 1296, 1297, 1312, 1377, 1552, 1921, 2401, 2402, 2417, 2482, 2592, 2657, 3026, 3697, 4096, 4097, 4112, 4177, 4352, 4721, 4802, 5392, 6497, 6561, 6562, 6577, 6642
Offset: 1

Views

Author

Keywords

Comments

Apart from 0, 1, 2, there are no three consecutive terms up to 10^16. The first two consecutive terms not of the form n^4, n^4+1 are 3502321 = 25^4 + 42^4, 3502322 = 17^4 + 43^4. - Charles R Greathouse IV, Oct 17 2017

Crossrefs

Subsequences include A003336, A000583 and A002645.

Programs

  • Haskell
    a004831 n = a004831_list !! (n-1)
    a004831_list = [x ^ 4 + y ^ 4 | x <- [0..], y <- [0..x]]
    -- Reinhard Zumkeller, Jul 15 2013
    
  • Mathematica
    Reap[For[n = 0, n < 10000, n++, If[MatchQ[ PowersRepresentations[n, 2, 4], {{, },_}], Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Oct 30 2017 *)
  • PARI
    is(n)=#thue(thueinit(z^4+1),n) \\ Ralf Stephan, Oct 18 2013
    
  • PARI
    list(lim)=my(v=List(),t); for(m=0,sqrtnint(lim\=1,4), for(n=0, min(sqrtnint(lim-m^4,4),m), listput(v,n^4+m^4))); Set(v) \\ Charles R Greathouse IV, Sep 28 2015

Formula

Call f(x) the number of terms if this sequence up to x. Then x^(7/16) << f(x) << x^(1/2); in other words, n^2 << a(n) << n^(16/7). The upper bound becomes O(n^2) if A230562 is finite. - Charles R Greathouse IV, Jul 12 2024

A218656 Number of ways to write 2n+1 as x+y with 0 < x < y and x^4 + y^4 prime.

Original entry on oeis.org

1, 2, 3, 2, 3, 3, 1, 5, 4, 4, 4, 5, 4, 7, 6, 5, 3, 10, 4, 9, 8, 4, 9, 6, 7, 11, 7, 5, 11, 9, 9, 9, 11, 4, 14, 14, 9, 8, 9, 7, 11, 8, 12, 12, 10, 9, 11, 17, 10, 12, 16, 7, 13, 14, 8, 15, 9, 11, 23, 16, 9, 17, 23, 8, 15, 15, 11, 21, 18, 12, 19, 14, 15, 19, 21, 17, 16, 23, 13, 21, 20, 17, 29
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 04 2012

Keywords

Comments

Conjecture: a(n) > 0 for all n >= 1.
Thomas Ordowski conjectured on Nov 03 2012 that if x^4 + y^4 in the definition of a(n) is replaced by x^2 + y^2, then a(n) will always be positive.
We also have similar conjectures with x^4 + y^4 replaced by x^8 + y^8 or x^16 + y^16.
All conjectures verified for 2n+1 up to 10^6: no exceptions for x^2 + y^2 and x^4 + y^4; exceptions 2n+1 = 7, 9, 55, 73, 75 and 105 for x^8 + y^8; exceptions 2n+1 = 5 and 9 for x^16 + y^16. - Mauro Fiorentini, Sep 22 2023
Alternate definition: Number of primes of the form k^4 + (2n+1-k)^4, 0 < k <= n. - M. F. Hasler, Nov 05 2012

Examples

			For n=7 we have a(7)=1, since x^4 + (15-x)^4 with 0 < x < 8 is prime only when x=4.
		

References

  • Thomas Ordowski, Personal e-mail message, Nov 03 2012.

Crossrefs

Programs

  • Maple
    A218656 := n-> add(`if`(isprime(i^4+(2*n+1-i)^4), 1, 0), i=1..n): # Alois P. Heinz, Jul 09 2016
  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[x^4+(2n+1-x)^4]==True,1,0],{x,1,n}]
    Do[Print[n," ",a[n]],{n,1,20000}]
  • PARI
    A218586(n)=sum(x=1,n+0*n=2*n+1, isprime(x^4+(n-x)^4))  \\ M. F. Hasler, Nov 05 2012

A111635 Smallest prime of the form x^(2^n) + y^(2^n) where x,y are distinct integers.

Original entry on oeis.org

2, 5, 17, 257, 65537, 3512911982806776822251393039617, 4457915690803004131256192897205630962697827851093882159977969339137, 1638935311392320153195136107636665419978585455388636669548298482694235538906271958706896595665141002450684974003603106305516970574177405212679151205373697500164072550932748470956551681
Offset: 0

Views

Author

Max Alekseyev, Aug 09 2005

Keywords

Comments

Is this sequence defined for all n?
From Jeppe Stig Nielsen, Sep 16 2015: (Start)
Numbers of this form are sometimes called extended generalized Fermat numbers.
If we restrict ourselves to the case y=1, we get instead the sequence A123599, therefore a(n) <= A123599(n) for all n. Can this be an equality for some n > 4?
The formula x^(2^m) + y^(2^m) also gives the decreasing chain {A000040, A002313, A002645, A006686, A100266, A100267, ...} of subsets of the prime numbers if we drop the requirement that x != y and take all primes (not just the smallest one) with m greater than some lower bound.
(End)
For more terms (the values of max(x,y)), see A291944. - Jeppe Stig Nielsen, Dec 28 2019

Crossrefs

A002646 Half-quartan primes: primes of the form p = (x^4 + y^4)/2.

Original entry on oeis.org

41, 313, 353, 1201, 3593, 4481, 7321, 8521, 10601, 14281, 14321, 14593, 21601, 26513, 32633, 41761, 41801, 42073, 42961, 49081, 56041, 66361, 67073, 72481, 90473, 97241, 97553, 104561, 106921, 111521, 139921, 141121, 165233, 195353, 198593
Offset: 1

Views

Author

Keywords

Comments

The 1001-digit number ((10^250 + 5659)^4 + (10^250 + 5661)^4)/2 is currently the largest known half-quartan prime. - Paul Muljadi, Mar 03 2011
The largest known is now ((2*3960926^2048 + 1)^4 + 1^4)/2 with 54051 digits. - Jens Kruse Andersen, Mar 20 2011
Primes of the form p = a^2 + b^2 with a > b > 0 such that a + b and a - b are squares. - Thomas Ordowski, Jul 07 2016
Primes p = a^2 + b^2 with a > b > 0 such that a^2 - b^2 is a square. - Thomas Ordowski, Feb 14 2017
Primes p > 5 such that the Diophantine equation X^4 + Y^2 = p^2 has a solution X,Y with nonzero X. Then X must be odd. - Thomas Ordowski and Robert G. Wilson v, Nov 29 2017

Examples

			41 is in the sequence since it is prime and 41 = (3^4 + 1^4)/2. - _Michael B. Porter_, Jul 07 2016
		

References

  • A. J. C. Cunningham, Binomial Factorisations, Vols. 1-9, Hodgson, London, 1923-1929; see Vol. 1, pp. 245-259.
  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 41, p. 16, Ellipses, Paris 2008.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a002646 n = a002646_list !! (n-1)
    a002646_list = [hqp | x <- [1, 3 ..], y <- [1, 3 .. x - 1],
                          let hqp = div (x ^ 4 + y ^ 4) 2, a010051' hqp == 1]
    -- Reinhard Zumkeller, Jul 15 2013
  • Maple
    N:= 10^6: # to get all terms <= N
    sort(select(isprime, convert({seq(seq((x^4+y^4)/2, y=x..floor((2*N-x^4)^(1/4)),2),x=1..floor((2*N-1)^(1/4)),2)},list))); # Robert Israel, Jul 11 2016
  • Mathematica
    nmax = 200000; jmax = Floor[(nmax/8)^(1/4)]; s = {}; Do[n = ((2 j + 1)^4 + (2 k + 1)^4)/2; If[n <= nmax && PrimeQ[n], AppendTo[s, n]], {j, 0, jmax}, {k, j,  jmax}]; Union[s] (* Jean-François Alcover, Mar 23 2011 *)
    Sort[Select[Total/@(Union[Sort/@Tuples[Range[0,50],2]]^4)/2,PrimeQ]] (* Harvey P. Dale, Feb 12 2012 *)

Extensions

More terms from Len Smiley

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'
Showing 1-10 of 22 results. Next