login
A214071
Least m>0 such that 2^n-m and n-m are relatively prime.
2
1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, 5, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 3, 3, 5, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 2
OFFSET
1,4
LINKS
EXAMPLE
gcd(15,3) = 3, gcd(14,2) = 2, gcd(13,1) = 1, so that a(4) = 3.
MATHEMATICA
b[n_] := 2^n; c[n_] := n;
Table[m = 1; While[GCD[b[n] - m, c[n] - m] != 1, m++]; m, {n, 1, 140}]
rp[n_]:=Module[{m=1, n2=2^n}, While[!CoprimeQ[n2-m, n-m], m++]; m]; Array[ rp, 100] (* Harvey P. Dale, Feb 13 2021 *)
CROSSREFS
Cf. A214056.
Sequence in context: A166123 A272334 A014491 * A226915 A180173 A318668
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jul 26 2012
STATUS
approved