|
|
A320840
|
|
Smallest N such that A092391(k) >= n for all k >= N.
|
|
2
|
|
|
0, 1, 1, 2, 3, 3, 5, 5, 6, 7, 9, 9, 10, 11, 11, 13, 13, 14, 17, 17, 18, 19, 19, 21, 21, 22, 23, 25, 25, 26, 27, 27, 29, 29, 33, 33, 34, 35, 35, 37, 37, 38, 39, 41, 41, 42, 43, 43, 45, 45, 46, 49, 49, 50, 51, 51, 53, 53, 54, 55, 57, 57, 58, 59, 59, 61, 65, 65
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
For n >= 2, a(n) <= n - 1, and is exactly n - 1 for all n = 2^t + 2.
Consider the diverging sum Sum_{k>=0} 4^k/k!. For k >= a(n), v(4^k/k!, 2) = A092391(k) >= n. As a result, the sum contains only finitely many nonzero terms (and thus converges) modulo 2^n for all n, that is, it converges in the 2-adic field. Here v(k, 2) is the 2-adic valuation of k.
|
|
LINKS
|
|
|
EXAMPLE
|
|
|
MATHEMATICA
|
a[n_] := Module[{i = n-1-Boole[n >= 2]}, While[i+Total[IntegerDigits[i, 2]] >= n, i--]; i+1]; a[0]=0; Table[a[n], {n, 0, 67}] (* Jean-François Alcover, Nov 23 2018, from PARI *)
|
|
PROG
|
(PARI) a(n) = if(n, my(i=n-1-(n>=2)); while(i+hammingweight(i)>=n, i--); i+1, 0)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|