OFFSET
1,3
COMMENTS
This sequence is well-defined.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Romanian Master in Mathematics Contest, Problem 3, Bucharest, 2007.
MAPLE
f:= proc(n) local m;
for m from 1 do if floor(2^m/m) mod n = 0 then return m fi od
end proc:
map(f, [$1..100]); # Robert Israel, Jun 07 2018
MATHEMATICA
a[n_] := For[m = 1, True, m++, If[Divisible[Floor[2^m/m], n], Return[m]]];
Array[a, 100] (* Jean-François Alcover, Mar 22 2019 *)
PROG
(Python)
from itertools import count
def A138255(n): return next(m for m in count(1) if not (1<<m)//m%n) # Chai Wah Wu, Aug 24 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Max Alekseyev, Mar 09 2008
STATUS
approved