OFFSET
1,1
COMMENTS
If k is a term of this sequence then k*2^m is a term of A363122 for any m >= 0.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
MAPLE
filter:= proc(n) local F2, Fp, v2, vp, t;
F2, Fp:= selectremove(t -> t[1]=2, ifactors(n)[2]);
if Fp = [] then return (n=2) fi;
v2:= 2^F2[1, 2];
vp:= max(map(t -> t[1]^t[2], Fp));
v2 > vp and v2/2 <= vp;
end proc:
select(filter, [seq(i, i=2.10000, 2)]); # Robert Israel, May 18 2023
MATHEMATICA
q[n_] := Module[{e = IntegerExponent[n, 2]}, 2^e > Max[Power @@@ FactorInteger[n/2^e]]]; Select[Range[2, 10000, 2], q[#] && ! q[#/2] &]
PROG
(PARI) is1(n) = {my(e = valuation(n, 2), m = n>>e); if(m == 1, n>1, f = factor(m); 2^e > vecmax(vector(#f~, i, f[i, 1]^f[i, 2]))); } \\ A363122
is(n) = !(n%2) && is1(n) && !is1(n/2)
(Python)
from itertools import count, islice
from sympy import factorint
def A363123_gen(startvalue=2): # generator of terms
return filter(lambda n:(m:=n&-n)>max((p**e for p, e in factorint(n>>(~n&n-1).bit_length()).items()), default=1)>=m>>1, count(max(startvalue, 2)))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, May 16 2023
STATUS
approved