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!)
A135359 a(n) is the smallest nonnegative number k such that n divides 2^k-k. 3
0, 2, 4, 4, 3, 4, 11, 8, 5, 14, 7, 4, 10, 16, 16, 16, 30, 16, 30, 16, 11, 58, 75, 16, 34, 10, 5, 16, 6, 16, 8, 32, 58, 30, 16, 16, 58, 30, 10, 16, 33, 16, 54, 92, 16, 118, 224, 16, 36, 34, 59, 16, 36, 34, 63, 16, 130, 6, 64, 16, 43, 8, 16, 64, 16, 58, 210, 84, 118, 16, 43, 16, 32 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
a(7)=11, since 2^11-11= 3*7*97 and 2^k-k is not divisible by 7 for 0<=k<11.
MATHEMATICA
b[n_] := Module[{k = 0}, While[! Divisible[2^k - k, n], k++]; k]; Array[b, 25] (* G. C. Greubel, Oct 11 2016 *)
PROG
(PARI) a(n) = {my(k = 0); while ((2^k-k) % n, k++); k; } \\ Michel Marcus, Aug 18 2013
(Magma)
S:=[0];
k:=1;
for n in [2..80] do
while not IsZero((2^k-k) mod n) do
k:=k+1;
end while;
Append(~S, k);
k:=1;
end for;
S; // Bruno Berselli, Aug 18 2013
CROSSREFS
See A072872 for another version.
Sequence in context: A214028 A079533 A072872 * A098217 A151846 A131118
KEYWORD
nonn
AUTHOR
John L. Drost, Feb 16 2008
EXTENSIONS
Edited by N. J. A. Sloane, May 27 2010
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 March 1 11:39 EST 2024. Contains 370432 sequences. (Running on oeis4.)