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

A126769 Primes p of the form k^4 + s where k > 1, s >= 1 and k^2 + s is also prime.

Original entry on oeis.org

17, 19, 23, 29, 31, 41, 43, 53, 59, 71, 73, 79, 83, 89, 101, 103, 109, 113, 131, 139, 149, 151, 163, 173, 179, 181, 191, 193, 199, 211, 223, 229, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 337, 347, 349, 353, 359, 367, 379, 383, 389
Offset: 1

Views

Author

Tomas Xordan, Feb 16 2007

Keywords

Comments

For primes not in this sequence see A128292.
Conjecture: Every prime q > 3 can be written in a nontrivial way as the sum of two or more squares, q = Sum_{i} (k_i)^2, such that the sum of the fourth powers of the squared numbers is again prime, p = Sum_{i} (k_i)^4. (Tomas Xordan)
This sequence illustrates an easy case of the conjecture: For primes q arising in the sequence there exists an integer k > 1, a positive integer s and a prime p such that k^2 < q, s = q - k^2, p = k^4 + s and p > q.
This corresponds to the case where only one of the squares is larger than 1 and all other s terms are equal to 1. - M. F. Hasler, May 23 2018

Examples

			19 = 2^4+3 is prime and 2^2+3 = 7 is a smaller prime, hence 19 is a term.
23 = 2^4+7 is prime and 2^2+7 = 11 is a smaller prime, hence 23 is a term.
1307 = 6^4+11 is prime and 6^2+11 = 47 is a smaller prime, hence 1307 is a term.
37 is prime, 2^4+21 is the only way to write 37 as k^4+s, but neither 2^2+21 = 25 nor 3^2+21 = 30 are prime, hence 37 is not in the sequence.
		

Crossrefs

Cf. A128292.

Programs

  • PARI
    {m=5;v=[];for(n=2,m,for(k=1,(m+1)^4,if(isprime(p=n^4+k)&&pKlaus Brockhaus, Feb 24 2007

Extensions

Edited, corrected and extended by Klaus Brockhaus, Feb 24 2007
Name edited following a suggestion from R. Sigrist, and the conjecture rephrased by M. F. Hasler, May 23 2018

A124598 Primes p of the form k^2+s where k > 1 and 1 <= s < (k+1)^2, such that q = k^4+s is prime and larger than p.

Original entry on oeis.org

5, 7, 11, 17, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 79, 83, 89, 97, 101, 107, 109, 127, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 307, 311, 331, 337, 347
Offset: 1

Views

Author

Tomas Xordan, Mar 02 2007

Keywords

Comments

The terms of this sequence illustrate a special case of the conjecture from A126769.

Examples

			5 = 2^2+1 is prime, 17 = 2^4+1 is a larger prime and 1 < 3^2, hence 5 is a term.
29 = 4^2+13 is prime, 269 = 4^4+13 is a larger prime and 13 < 5^2, hence 29 is a term.
805499 = 897^2+890 is prime, 647395643771 = 897^4+890 is a larger prime and 890 < 898^2, hence 805499 is a term.
Prime number 19 has the form k^2+s with s < (k+1)^2 in two ways, as 3^2+10 and 4^2+3. Neither 3^4+10 = 91 nor 4^4+3 = 259 is prime, hence 19 is not in the sequence.
		

Crossrefs

Programs

  • PARI
    m=19;v=[];for(k=2,m,for(s=1,(k+1)^2-1,if((p=k^2+s)p&&isprime(q),v=concat(v,p))));print(Set(v)) \\
    
  • PARI
    upto(n)=my(res = List()); forprime(p = 5, n, for(k = ceil(sqrt(p / 2 + 1/4) - 0.5), sqrtint(p-1), if(isprime(k^4 + p - k^2), listput(res, p); next(2)))); res \\ David A. Corneth, Apr 08 2018

Extensions

Edited, corrected and extended by Klaus Brockhaus, Mar 05 2007

A125283 Primes p for which there exists no integer n with 1 < n^2 < p such that n^4 - n^2 + p is prime (i.e., primes that don't arise as q's in A126769).

Original entry on oeis.org

2, 3, 13, 103, 131
Offset: 1

Views

Author

Tomas Xordan, Feb 25 2007

Keywords

Comments

Sequence suggested by W. Edwin Clark.
Is this sequence finite?
Primes not in A126769 are listed in A128292.
Next term >= 5*10^7. - Klaus Brockhaus, Mar 15 2007
Next term > 2*10^9. - Jon E. Schoenfield, Apr 06 2018

Crossrefs

Cf. A126769.

Programs

  • Mathematica
    fQ[p_] := Block[{r = Rest@Range@Floor@Sqrt@p}, Union@ PrimeQ[r^4 - r^2 + p] == {False}]; lst = {2, 3}; Do[ If[ fQ@ Prime@n, AppendTo[lst, Prime@n]], {n, 3, 10^5}]; lst (* Robert G. Wilson v, Mar 01 2007 *)

A305024 Minimal number of squares, not all equal to 1, having as sum prime(n), such that their squares also sum to a prime; 0 if no such decomposition exists.

Original entry on oeis.org

0, 0, 2, 4, 3, 2, 2, 3, 4, 2, 4, 2, 2, 3, 7, 2, 5, 4, 4, 4, 2, 4, 3, 2, 3, 3, 5, 3, 4, 5, 4, 3, 2, 3, 2, 4, 2, 4, 4, 3, 3, 2, 4, 4, 4, 4, 3, 4, 3, 4, 3, 4, 3, 3, 2, 4, 2, 4, 3, 2, 3, 2, 4, 4, 2, 4, 4, 4, 3, 2, 3, 4, 4, 2, 3, 4, 3, 2, 2, 2, 3, 2, 4, 3, 4, 3, 3, 4, 2, 4, 3, 4, 4, 3, 3
Offset: 1

Views

Author

M. F. Hasler, May 23 2018

Keywords

Comments

It has been conjectured (cf. A126769) that any prime p >= 5 can be written in a nontrivial way as p = Sum (b_i)^2 such that Sum (b_i)^4 is also prime. This sequence lists the number of required terms b_i for each prime.
The two initial zeros say that this decomposition is not possible for prime(1) = 2 and prime(2) = 3, and are thus conjectured to be the only zeros of the sequence. Since we are interested in the minimal number of terms, we can consider only nonzero b_i >= 1 and min{b_i} >= 2 to avoid the trivial solution b_i = 1 for all i <= k = prime(n).

Examples

			The first two primes, 2 and 3, cannot be written as a sum of squares not all equal to 1, because the smallest such sum is 1^2 + 2^2 = 5. (The empty sum and a one-term sum of a square cannot be prime, either.) Therefore a(1) = a(2) = 0.
The third prime, 5, can be written in exactly one way as a nontrivial sum of two squares, 5 = 1^2 + 2^2, and the sum of the fourth powers is 1^4 + 2^4 = 17, which is again prime. Therefore, a(3) = 2.
The fourth prime, 7, cannot be written as sum of 2 or 3 squares, but only 4 squares, as 7 = 1^2 + 1^2 + 1^2 + 2^2, and it turns out that sum of the fourth powers also yields a prime,  1^4 + 1^4 + 1^4 + 2^4 = 19. Therefore, a(4) = 4.
prime(15) = 47 = 1^2 + 2^2 + 2^2 + 2^2 + 3^2 + 3^2 + 4^2, and the sum of the fourth powers gives the prime 467. Since no smaller number of terms has this property, a(15) = 7.
prime(18) = 61 = 2^2 + 4^2 + 4^2 +5^2, and 2^4 + 4^4 + 4^4 +5^4 = 1153, a prime, and no smaller number of terms has this property, so a(18) = 4.
prime(27) = 103 = 1^2 + 4^2 + 5^2 + 5^2 + 6^2 and 1^4 + 4^4 + 5^4 + 5^4 + 6^4 = 2803, a prime, and no smaller number of terms has this property, so a(27) = 5.
The values 2, 3, 4, 5 appear for the first time at index n = 3, 5, 4, 17, and a(15) = 7. We don't know when the first 6 occurs, nor whether this happens at all.
Conjecture: The sequence is bounded.
Is it possible to show that no term of the sequence is larger than 7?
		

Crossrefs

Programs

  • Maple
    repss:= proc(n,k,i) option remember;
    # lists of k squares >= i^2 summing to n
      if k = 1 then
       if issqr(n) and n >= i^2 then {[sqrt(n)]}
       else {}
       fi
      elif n < k then {}
      else
       `union`(seq(map(t -> [j,op(t)], procname(n-j^2,k-1,j)),j=i..floor(sqrt(n))))
      fi
    end proc:
    f:= proc(n) local p,k,i,S; global Rep;
      p:= ithprime(n);
      for k from 2 do
        S:= select(t -> isprime(convert(map(`^`,t,4),`+`)), repss(p,k,1));
        if nops(S) > 0 then Rep[n]:= S[1]; return k fi
      od
    end proc:
    0,0,seq(f(n),n=3..100); # Robert Israel, Dec 12 2019
  • Mathematica
    a[n_] := Block[{p = Prime@n, c, k=2}, c = Range[Sqrt[p]]^2; While[ kGiovanni Resta, Dec 12 2019 *)
  • PARI
    apply( A305024(n)={n=prime(n); for(k=2, n-3, my(s=sqrtint((n-k)\3+1), t);
        forvec(b=vector(k-2, i, [1,s]), t=vecsum([t^4|t<-b]);
          for(i=1,#s=sum2sqr(n-norml2(b))/* see A133388 for sum2sqr() */,
            s[i][1]>0 && isprime(s[i][1]^4+s[i][2]^4+t) && return(k))/*end for i*/
        , 1/*forvec:increasing*/))}, [1..95]) \\ Bug fixed: M. F. Hasler, Dec 12 2019

Formula

If

Extensions

Corrected by Robert Israel, Dec 12 2019
Showing 1-4 of 4 results.