The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
If n is prime then a(n) = n. - Robert Israel, Dec 19 2017
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:
map(f, [$1..100]); # Robert Israel, Dec 19 2017
MATHEMATICA
a[n_] := Module[{cnt = 0, k}, For[k = 1, True, k++, If[CoprimeQ[2^n-1, k], cnt++; If[cnt == n, Return[k]]]]];
Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Feb 07 2023 *)
CROSSREFS
Sequence in context: A223702 A120726 A060203 * A045790 A159842 A085102
KEYWORD
nonn
AUTHOR
Leroy Quet, Jul 23 2007
EXTENSIONS
More terms from R. J. Mathar, Aug 01 2007
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 6 00:30 EDT 2024. Contains 373110 sequences. (Running on oeis4.)