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.

A193411 Primes which are sums of two or more distinct 4th powers of primes.

Original entry on oeis.org

97, 641, 2417, 14657, 17123, 17683, 43283, 46309, 83537, 112163, 126739, 129221, 129749, 130337, 145043, 145603, 173539, 176021, 176549, 214483, 216259, 229189, 242419, 243109, 244901, 257141, 279857, 280547, 294563, 295123, 297589, 310819, 325541, 365779
Offset: 1

Views

Author

Jonathan Vos Post, Jul 25 2011

Keywords

Comments

Primes in A130833. Primes which are sums of exactly two distinct 4th powers of primes must be in A094479 primes of the form p^4 + 16 where p is also a prime.
The first term that arises in more than one way is 6625607 = 2^4+5^4+7^4+11^4+17^4+23^4+41^4+43^4 = 2^4+5^4+7^4+13^4+17^4+29^4+31^4+47^4. - Robert Israel, Apr 27 2020

Examples

			a(5) = 17123 = 3^4 + 7^4 + 11^4.
		

Crossrefs

Programs

  • Maple
    N:= 5*10^5: # for all terms <= N
    S1:= {}:
    S2:= {}:
    p:= 1:
    R:= {}:
    do
      p:= nextprime(p);
      if p^4 > N then break fi;
      s:= p^4;
      nS2:= select(`<=`,map(`+`,S1 union S2, s), N);
      S2:= S2 union nS2;
      S1:= S1 union {s};
      R:= R union select(isprime, nS2);
    od:
    sort(convert(R,list)); # Robert Israel, Apr 27 2020
  • Mathematica
    nn = 9; Select[Sort[Table[Dot[IntegerDigits[i, 2, nn], Prime[Range[nn]]^4], {i, 2^nn-1}]], # < Prime[nn-1]^4 + Prime[nn]^4 && PrimeQ[#] &] (* T. D. Noe, Jul 27 2011 *)
  • PARI
    list(lim)=my(v=List(), t1, t2, t3, t4, t5, t6, t7); forprime(p=2, (lim-16)^(1/4), forprime(q=2, min(p-1, (lim-p^4)^(1/4)), t1=p^4+q^4; if(isprime(t1), listput(v, t1)); forprime(r=2, min(q-1, (lim-t1)^(1/4)), t2=t1+r^4; if(isprime(t2), listput(v, t2)); forprime(s=2, min(r-1, (lim-t2)^(1/4)), t3=t2+s^4; if(isprime(t3), listput(v, t3)); forprime(t=2, min(s-1, (lim-t3)^(1/4)), t4=t3+t^4; if(isprime(t4), listput(v, t4)); forprime(u=2, min(t-1, (lim-t4)^(1/4)), t5=t4+u^4; if(isprime(t5), listput(v, t5)); forprime(w=2, min(u-1, (lim-t5)^(1/4)), t6=t5+w^4; if(isprime(t6), listput(v, t6)); forprime(x=2, min(w-1, (lim-t6)^(1/4)), t7=t6+x^4; if(isprime(t7), listput(v, t7)); if(x>2&&t7+16<=lim&&isprime(t7+16), listput(v, t7+16)))))))))); vecsort(Vec(v), , 8);
    list(4044955) \\ Charles R Greathouse IV, Jul 27 2011

Extensions

a(7)-a(33) from Charles R Greathouse IV, Jul 25 2011