A336536 Numbers n that can be written as both the sum of two nonzero fourth powers and the sum of three nonzero fourth powers.
4802, 57122, 76832, 260642, 388962, 617057, 913952, 1229312, 1847042, 1957682, 3001250, 3502322, 3748322, 3959297, 4170272, 4626882, 6223392, 6837602, 6959682, 9872912, 11529602, 14623232, 19668992, 21112002, 27691682, 29552672, 31322912, 31505922, 35701250, 40127377, 40302242, 46712801, 48020000, 48355137
Offset: 1
Keywords
Examples
a(3) = 76832 is in the sequence because 76832 = 14^4 + 14^4 = 6^4 + 10^4 + 16^4. a(6) = 617057 is in the sequence because 617057 = 7^4 + 28^4 = 3^4 + 20^4 + 26^4.
Links
- Robert Israel, Table of n, a(n) for n = 1..1072
Programs
-
Maple
N:= 10^8: # for terms <= N F1:= {seq(i^4,i=1..floor(N^(1/4)))}: n1:= nops(F1): F2:= select(`<=`,{seq(seq(F1[i]+F1[j],i=1..j),j=1..nops(F1))},N): F3:= select(`<=`,{seq(seq(s+t,s=F1),t=F2)},N): sort(convert(F3 intersect F2,list));
-
Python
def aupto(lim): p1 = set(i**4 for i in range(1, int(lim**.25)+2) if i**4 <= lim) p2 = set(a+b for a in p1 for b in p1 if a+b <= lim) p3 = set(apb+c for apb in p2 for c in p1 if apb+c <= lim) return sorted(p3 & p2) print(aupto(5*10**7)) # Michael S. Branicky, Mar 18 2021
Comments