|
|
A131880
|
|
a(n) = the n-th positive integer which is coprime to (2^n -1). a(n) = the n-th term of row n in triangle A131879.
|
|
3
|
|
|
1, 2, 3, 7, 5, 10, 7, 14, 10, 16, 11, 31, 13, 20, 17, 31, 17, 32, 19, 46, 24, 34, 23, 62, 25, 38, 31, 56, 29, 61, 31, 62, 39, 50, 36, 97, 37, 56, 45, 97, 41, 74, 43, 86, 53, 70, 47, 122, 49, 85, 59, 98, 53, 103, 58, 122, 66, 88, 59, 173, 61, 92, 74, 127, 67, 125, 67, 127, 81
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
2^6 -1 = 63. a(6) is the 6th positive integer which is coprime to 63. So a(6) = 10.
|
|
MAPLE
|
f:= proc(n) local t, k, count;
if isprime(n) then return n fi;
t:= 2^n-1; count:= 0;
for k from 1 do
if igcd(k, t) = 1 then
count:= count+1;
if count = n then return k fi
fi
od
end proc:
|
|
MATHEMATICA
|
a[n_] := Module[{cnt = 0, k}, For[k = 1, True, k++, If[CoprimeQ[2^n-1, k], cnt++; If[cnt == n, Return[k]]]]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|