OFFSET
1,1
COMMENTS
Motivated by the search for solutions to a^n + b^(2n+2)/4 = (perfect square), which arises when searching for solutions to x^n + y^(n+1) = z^(n+2) of the form x = a*z, y = b*z. It turns out that many solutions are of the form a^n = d*(b^(n+1) + d), where d is a perfect power.
EXAMPLE
5^6 = 35^2 + 120^2, 10^6 = 280^2 + 960^2, ...
MAPLE
LIM:=200^6: P:={seq(seq(x^k, k=3..floor(log[x](LIM))), x=2..floor(LIM^(1/3)))}:
is_A304436:= proc(n) local N, S; N:= n^6; if remove(t -> subs(t, x)<=1 or subs(t, y)<=1 or subs(t, x-y)=0, [isolve(x^2+y^2=N)]) <> [] then return true fi; S:= map(t ->N-t, P minus {N, N/2}); (S intersect P <> {}) or (select(issqr, S) <> {})
end proc: # adapted from code by Robert Israel for A304434
MATHEMATICA
LIM = 200^6;
P = Union@ Flatten@ Table[Table[x^k, {k, 3, Floor[Log[x, LIM]]}], {x, 2, Floor[LIM^(1/3)]}];
filterQ[n_] := Module[{M = n^6, S}, If[Solve[x > 1 && y > 1 && x^2 + y^2 == M, {x, y}, Integers] != {}, Return [True]]; S = M - (P ~Complement~ {M, M/2}); S ~Intersection~ P != {} || Select[S, IntegerQ[Sqrt[#]]&] != {}];
Reap[For[n = 1, n <= 150, n++, If[filterQ[n], Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Aug 12 2020, after Maple *)
PROG
(PARI) L=200^6; P=List(); for(x=2, sqrtnint(L, 3), for(k=3, logint(L, x), listput(P, x^k))); #P=Set(P) \\ This P = A076467 \ {1} = A111231 \ {0} up to limit L.
is(n, e=6)={for(i=1, #s=sum2sqr(n=n^e), vecmin(s[i])>1 && s[i][1]!=s[i][2] && return(1)); for(i=1, #P, n>P[i]||return; ispower(n-P[i])&& P[i]*2 != n && return(1))} \\ Needs the above P computed up to L >= n^6. For sum2sqr() see A133388.
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, May 25 2018
STATUS
approved