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!)
A320840 Smallest N such that A092391(k) >= n for all k >= N. 2

%I #15 Nov 23 2018 05:32:41

%S 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,

%T 25,25,26,27,27,29,29,33,33,34,35,35,37,37,38,39,41,41,42,43,43,45,45,

%U 46,49,49,50,51,51,53,53,54,55,57,57,58,59,59,61,65,65

%N Smallest N such that A092391(k) >= n for all k >= N.

%C For n >= 2, a(n) <= n - 1, and is exactly n - 1 for all n = 2^t + 2.

%C 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.

%e a(33) = 29 because A092391(28) = 31 < 33, A092391(29) = 33, A092391(30) = 34, A092391(31) = 36 and A092391(32) = 33. The smallest N such that A092391(k) >= 33 for all k >= N is N = 29.

%t 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 *)

%o (PARI) a(n) = if(n, my(i=n-1-(n>=2)); while(i+hammingweight(i)>=n, i--); i+1, 0)

%Y Cf. A000120, A092391.

%K nonn,base

%O 0,4

%A _Jianing Song_, Oct 22 2018

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 August 8 14:00 EDT 2024. Contains 375021 sequences. (Running on oeis4.)