login
A204988
The index j < k such that n divides 2^k - 2^j, where k is the least index (A204987) for which such j exists.
3
1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 5, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 6, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 5, 1, 1, 1, 2, 1, 1, 1, 3, 1
OFFSET
1,4
COMMENTS
For a guide to related sequences, see A204892.
LINKS
FORMULA
a(n) = A007814(n) + (1-(-1)^n)/2 (conjecture). - Velin Yanev, Nov 14 2016.
From Andrew Howroyd, Aug 08 2018: (Start)
The above conjecture is true because the definition of this sequence and A204987 requires j to be at least 1 and 2^k - 2^j can be written 2^j*(2^(k-j) - 1).
a(n) = max(1, A007814(n)). (End)
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3/2. - Amiram Eldar, Oct 22 2022
EXAMPLE
(See example at A204987.)
MATHEMATICA
(See the program at A204987.)
a[n_] := Max[1, IntegerExponent[n, 2]]; Array[a, 100] (* Amiram Eldar, Oct 22 2022 *)
PROG
(PARI) \\ Use the program at A204987. - Antti Karttunen, Nov 19 2017
(PARI) a(n)=max(1, valuation(n, 2)); \\ Andrew Howroyd, Aug 08 2018
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Clark Kimberling, Jan 21 2012
EXTENSIONS
More terms from Antti Karttunen, Nov 19 2017
Keyword:mult added by Andrew Howroyd, Aug 08 2018
STATUS
approved