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!)
A081223 Smallest k such that floor(k*gamma) begins with n (gamma=0.5772156649...). 1

%I #5 Apr 06 2022 00:15:17

%S 2,4,6,7,9,11,13,14,16,18,20,21,23,25,26,28,30,32,33,35,37,39,40,42,

%T 44,46,47,49,51,52,54,56,58,59,61,63,65,66,68,70,72,73,75,77,78,80,82,

%U 84,85,87,89,91,92,94,96,98,99,101,103,104,106,108,110,111,113,115,117,118

%N Smallest k such that floor(k*gamma) begins with n (gamma=0.5772156649...).

%C Based on the sequences A078219 and A078220 of _Amarnath Murthy_.

%p C := gamma; a := proc(M0,M,C) local i,d,f,g,k; description "returns the sequence 'a(n)' between 'M0' and 'M' where 'a(n)=min{k | floor(C*k) begins with n}."; d := N->`if`(N=0,[0],ListTools[Reverse](convert(N,base,10))); f := (K,N)->`if`(d(floor(K*C))[1..min(nops(d(floor(K*C))),nops(d(N)))]=d(N),K,0); for i from M0 to M do k := 0; while f(k,i)=0 do k := k+1; od; g(i) := f(k,i) od; return seq(g(j),j=M0..M); end proc;

%Y Cf. A078219, A078220, A081224, A081225, A081226.

%K nonn,base

%O 1,1

%A Francois Jooste (pin(AT)myway.com), Mar 10 2003

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 April 24 04:14 EDT 2024. Contains 371918 sequences. (Running on oeis4.)