VOOZH
about
URL: https://oeis.org/A135366
⇱ A135366 - OEIS
login
A135366
a(n) is the smallest nonnegative k such that n divides 2^k + k.
2
0, 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
(
list
;
graph
;
refs
;
listen
;
history
;
text
;
internal format
)
OFFSET
1,2
COMMENTS
a(2^m) = 2^m for m > 0. If p is an odd prime then by Fermat, a(p) <= p-1. 25 is the smallest n with a(n) > n.
LINKS
Harvey P. Dale,
Table of n, a(n) for n = 1..1000
International Mathematical Olympiad,
Problem N7
, IMO-2006, p. 63.
EXAMPLE
a(9)=7 since 2^7 + 7 = 9*15 and 2^k + k is not divisible by 9 for 0 <= k < 7.
MATHEMATICA
sk[n_]:=Module[{k=0}, While[!Divisible[2^k+k, n], k++]; k]; Array[sk, 60] (*
Harvey P. Dale
, Jun 01 2013 *)
PROG
(PARI) a(n) = for(m=0, oo, if(Mod(2, n)^m==-m, return(m))); \\
Jinyuan Wang
, Mar 15 2020
CROSSREFS
Cf.
A135359
,
A247248
.
Sequence in context:
A261070
A249140
A113421
*
A247248
A192017
A180566
Adjacent sequences:
A135363
A135364
A135365
*
A135367
A135368
A135369
KEYWORD
nonn
AUTHOR
John L. Drost
, Feb 16 2008
EXTENSIONS
Corrected by
Harvey P. Dale
, Jun 01 2013
STATUS
approved