OFFSET
0,2
LINKS
Tom Müller, On the Exponents of Non-Trivial Divisors of Odd Numbers and a Generalization of Proth's Primality Theorem, Journal of Integer Sequences, Vol. 20 (2017), Article 17.2.7.
MAPLE
H:=2n+1:
smax:=floor(evalf(log[2](H))):
R:=A272894(n)
for m from 0 to smax do;
for s from m+1 to smax+1 do;
hmax:=floor(evalf(H/2^m)):
for h from 1 to hmax by 2 do;
k:=(2^(s-m)*H-h)/(2^s*h+1);
if k<h then break fi;
if type(k, integer)=true and R<2*s-m then R:=2*s-m fi;
od;
od;
od;
a(n):=R;
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Tom Mueller, May 09 2016
STATUS
approved