%I #25 Apr 27 2020 17:35:11
%S 97,641,2417,14657,17123,17683,43283,46309,83537,112163,126739,129221,
%T 129749,130337,145043,145603,173539,176021,176549,214483,216259,
%U 229189,242419,243109,244901,257141,279857,280547,294563,295123,297589,310819,325541,365779
%N Primes which are sums of two or more distinct 4th powers of primes.
%C 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.
%C 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
%H Robert Israel, <a href="/A193411/b193411.txt">Table of n, a(n) for n = 1..10000</a>
%e a(5) = 17123 = 3^4 + 7^4 + 11^4.
%p N:= 5*10^5: # for all terms <= N
%p S1:= {}:
%p S2:= {}:
%p p:= 1:
%p R:= {}:
%p do
%p p:= nextprime(p);
%p if p^4 > N then break fi;
%p s:= p^4;
%p nS2:= select(`<=`,map(`+`,S1 union S2, s), N);
%p S2:= S2 union nS2;
%p S1:= S1 union {s};
%p R:= R union select(isprime, nS2);
%p od:
%p sort(convert(R,list)); # _Robert Israel_, Apr 27 2020
%t 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 *)
%o (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);
%o list(4044955) \\ _Charles R Greathouse IV_, Jul 27 2011
%Y Cf. A000040, A000583, A030514, A094479, A192926.
%K nonn
%O 1,1
%A _Jonathan Vos Post_, Jul 25 2011
%E a(7)-a(33) from _Charles R Greathouse IV_, Jul 25 2011