This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A247248 a(n) = least k such that n divides 2^k + k. 1
 1, 2, 1, 4, 4, 2, 6, 8, 7, 4, 3, 8, 12, 6, 7, 16, 16, 14, 18, 4, 19, 8, 22, 8, 33, 12, 7, 40, 11, 26, 23, 32, 8, 16, 6, 32, 5, 18, 37, 24, 40, 38, 42, 8, 7, 22, 10, 32, 61, 84, 38, 12, 35, 32, 46, 40, 32, 28, 24, 44, 17, 30, 61, 64, 66, 8, 66, 16, 67, 6, 11, 32 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS For every positive integer n, there exists an integer k such that 2^k + k is divisible by n. The proof is given in the link, p. 64. LINKS Chai Wah Wu, Table of n, a(n) for n = 1..10000 International Mathematical Olympiad, IMO-2006, p.64. EXAMPLE a(7)= 6 because 2^6+6 = 70 is divisible by 7. MAPLE f:= proc(n) local k; for k from 1 do   if 2^k + k mod n = 0 then return k fi od end proc: seq(f(n), n=1..100); # Robert Israel, Dec 01 2014 MATHEMATICA Table[s=0; k=0; While[k++; s=Mod[2^k+k, n]; s>0]; k, {n, 50}] PROG (Python) def A247248(n): ....if n == 1: ........return 1 ....else: ........x, k, kr = 1, 0, 0 ........while (x+kr) % n: ............x, kr = (2*x) % n, (kr+1) % n ............k += 1 ........return k # Chai Wah Wu, Dec 03 2014 CROSSREFS Cf. A135366, A006127 (2^n+n). Sequence in context: A249140 A113421 A135366 * A192017 A180566 A051289 Adjacent sequences:  A247245 A247246 A247247 * A247249 A247250 A247251 KEYWORD nonn AUTHOR Michel Lagneau, Dec 01 2014 STATUS approved

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

Last modified May 23 05:03 EDT 2019. Contains 323508 sequences. (Running on oeis4.)