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

A128292 Primes not in A126769.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 37, 47, 61, 67, 97, 107, 127, 137, 157, 167, 197, 227, 233, 317, 331, 373, 449, 457, 487, 541, 601, 617, 677, 971, 977, 1153, 1381, 1447, 1549, 1637, 1777, 1871, 1931, 1997, 2287, 2399, 2417, 2437, 2647, 2767, 2777, 2963, 3089, 3169, 3187
Offset: 1

Views

Author

Klaus Brockhaus, Feb 24 2007

Keywords

Comments

Primes p that are not of the form k^4+s where k > 1 and s >= 1, such that k^2+s is prime and smaller than p.

Examples

			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 is prime, hence 37 is a term.
		

Crossrefs

Cf. A126769.

Programs

  • PARI
    {m=8;v=[];for(n=2,m,for(k=1,(m+1)^4,if(isprime(p=n^4+k)&&pKlaus Brockhaus, Feb 24 2007
    
  • PARI
    findTerms(UpTo)={my(belongs,q,k,L:list=List());forprime(p=2,UpTo,belongs=0;for(s=1,p,if(ispower(p-s,4,&k),if(k>1,if(ispseudoprime(q=k^2+s),belongs=1;break))));if(!belongs,listput(L,p)));return(Vec(L))} \\ R. J. Cano, Apr 04 2018

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 *)

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

A126112 Prime numbers p such that p^4 + (p-1)^4 + (p+1)^4 is a prime number.

Original entry on oeis.org

3, 7, 11, 29, 31, 53, 59, 83, 109, 127, 283, 349, 461, 521, 599, 643, 683, 787, 809, 829, 907, 911, 937, 983, 1093, 1117, 1201, 1289, 1301, 1487, 1523, 1613, 1721, 1877, 2017, 2153, 2267, 2281, 2423, 2521, 2579, 2657, 2677, 2699, 2731, 2741, 2797, 2887, 2969
Offset: 1

Views

Author

Tomas Xordan, Mar 05 2007

Keywords

Examples

			(3-1)^4 + 3^4 + (3+1)^4 = 2^4 + 3^4 + 4^4 = 16 + 81 + 256 = 353 is prime, hence 3 is a term.
(11-1)^4 + 11^4 + (11+1)^4 = 10^4 + 11^4 + 12^4 = 10000 + 14641 + 20736 = 45377 is prime, hence 11 is a term.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=PrimeQ[(n-1)^4+n^4+(n+1)^4];lst={};Do[p=Prime[n];If[f[p],AppendTo[lst,p]],{n,7!}];lst (* Vladimir Joseph Stephan Orlovsky, Oct 27 2009 *)
    Select[Prime[Range[500]],PrimeQ[Total[(#+{-1,0,1})^4]]&] (* Harvey P. Dale, Dec 07 2012 *)
  • PARI
    forprime(p=2, 3000, if(isprime(q=(p-1)^4+p^4+(p+1)^4), print1(p, ","))) /* Klaus Brockhaus, Mar 09 2007 */

Extensions

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

A126193 Lesser of twin primes (A001359) of the form p = k^2+s such that q = k^4+s is also a lesser of twin primes, q > p and s >= 0.

Original entry on oeis.org

5, 17, 29, 41, 59, 71, 107, 137, 179, 191, 197, 227, 239, 269, 281, 311, 347, 419, 431, 461, 569, 599, 617, 641, 659, 809, 821, 827, 857, 881, 1019, 1049, 1061, 1091, 1151, 1229, 1277, 1289, 1301, 1319, 1427, 1451, 1481, 1487, 1607, 1619, 1667, 1697, 1721
Offset: 1

Views

Author

Tomas Xordan, Mar 07 2007

Keywords

Comments

p = q-k^4+k^2 where p and q are lesser of twin primes and p < q.
May be connected with the twin prime conjecture (see link).

Examples

			5 = 2^2+1 and 17 = 2^4+1; 5 and 17 are lesser of twin primes;
41 = 4^2+25 and 281 = 4^4+25; 41 and 281 are lesser of twin primes.
		

Crossrefs

Programs

  • Maple
    filter:= proc(p) local s,k;
      if not(isprime(p) and isprime(p+2)) then return false fi;
      for k from 2 do
        s:= p - k^2;
        if s < 0 then return false fi;
        if isprime(s+k^4) and isprime(s+k^4+2) then return true fi;
      od
    end proc:
    select(filter, [seq(i,i=5..2000, 6)]); # Robert Israel, Sep 15 2024
  • PARI
    {m=42; v=[]; for(k=2, m, for(s=1, (m+1)^2-1, if((p=k^2+s)p&&isprime(q)&&isprime(q+2), v=concat(v,p)))); v=listsort(List(v), 1); for(j=1, #v, print1(v[j], ","))} /* Klaus Brockhaus, Mar 09 2007 */

Extensions

Edited and checked by Klaus Brockhaus, Mar 09 2007
Definition corrected by Robert Israel, Sep 15 2024

A126113 Primes p^4 + (p-1)^4 + (p + 1)^4 arising from A126112.

Original entry on oeis.org

353, 7793, 45377, 2131937, 2782097, 23705153, 36393857, 142457633, 423617057, 780627473, 19243704833, 44507912417, 135498076577, 221043906737, 386218778417, 512825188193, 652841559233, 1150861306913, 1285043991857
Offset: 1

Views

Author

Tomas Xordan, Mar 05 2007

Keywords

Examples

			A126112(1) = 3 and (3-1)^4+3^4+(3+1)^4 = 2^4+3^4+4^4 = 16+81+256 = 353 is prime, hence a(1) = 353.
A126112(3) = 11 and (11-1)^4+11^4+(11+1)^4 = 10^4+11^4+12^4 = 10000 + 14641 + 20736 = 45377 is prime, hence a(3) = 45377.
		

Crossrefs

Programs

  • PARI
    {forprime(p=2,810,if(isprime(q=(p-1)^4+p^4+(p+1)^4),print1(q,",")))} /* Klaus Brockhaus, Mar 27 2007 */

Extensions

Edited and corrected by Klaus Brockhaus, Mar 27 2007

A126194 Greater of twin primes (A006512) of the form p = k^2+s such that q = k^4+s is also a greater of twin primes, q > p.

Original entry on oeis.org

7, 19, 31, 43, 61, 73, 109, 139, 181, 193, 199, 229, 241, 271, 283, 313, 349, 421, 433, 463, 571, 601, 619, 643, 661, 811, 823, 829, 859, 883, 1021, 1051, 1063, 1093, 1153, 1231, 1279, 1291, 1303, 1321, 1429, 1453, 1483, 1489, 1609, 1621, 1669, 1699, 1723
Offset: 1

Views

Author

Tomas Xordan, Mar 07 2007

Keywords

Comments

p = q-k^4+k^2 where p and q are greater of twin primes and p < q.

Examples

			7 = 2^2+3 and 19 = 2^4+3; 7 and 19 are greater of twin primes;
31 = 4^2+15 and 271 = 4^4+15; 31 and 271 are greater of twin primes.
		

Crossrefs

Programs

  • PARI
    {m=42; v=[]; for(k=2, m, for(s=1, (m+1)^2-1, if((p=k^2+s)p&&isprime(q)&&isprime(q-2), v=concat(v,p)))); v=listsort(List(v), 1); for(j=1, #v, print1(v[j], ","))} /* Klaus Brockhaus, Mar 09 2007 */

Extensions

Edited and corrected by Klaus Brockhaus, Mar 09 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-8 of 8 results.