OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
MAPLE
for j from 1 to 300 do
y:=(2*j)^2:evdiv:=0:oddiv:=0:
for k in divisors(y) do
if(k mod 2=0)then evdiv:=evdiv+1:else oddiv:=oddiv+1:fi:
od:
if(type(y/evdiv, integer) and type(y/oddiv, integer))then
print(j);
fi;
od:
MATHEMATICA
q[k_] := Module[{kk = 4*k^2, v = IntegerExponent[k, 2], m, e, no, ne}, m = k/2^v; e = If[m == 1, 0, FactorInteger[m][[;; , 2]]]; no = Times @@ (2*e + 1); ne = (2*v + 2)*no; OddQ[no] && Divisible[kk , no] && EvenQ[ne] && Divisible[kk , ne]]; Select[Range[300], q] (* Amiram Eldar, Mar 06 2026 *)
PROG
(PARI) isok(k) = {my(kk = 4*k^2, v = valuation(k, 2), m = k >> v, e = factor(m)[, 2], no, ne); no = vecprod(apply(x -> 2*x+1, e)); ne = (2*v+2)*no; (no % 2) && !(kk % no) && !(ne % 2) && !(kk % ne); } \\ Amiram Eldar, Mar 06 2026
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Nathaniel Johnston, Nov 17 2010
STATUS
approved
