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!)
A181563 Almost-Liouville function. 1

%I #19 Oct 05 2018 11:19:22

%S 1,-1,0,0,0,0,0,-2,1,0,0,0,0,0,0,-1,0,-1,0,0,0,0,0,0,1,0,0,0,0,0,0,-3,

%T 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,

%U 0,0,0,0,0,0,-2,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,-4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0

%N Almost-Liouville function.

%C The partial sum a(1)+a(2)+...+a(n) is asymptotic to -sqrt(2n).

%C The Liouville lambda function satisfies: Sum_{k=1..n} lambda(k)*floor(n/k) = floor(n^(1/2)), that's why this sequence is "almost" a Liouville function.

%D B. Cloitre, Almost Liouville functions, in preparation, 2011.

%H Antti Karttunen, <a href="/A181563/b181563.txt">Table of n, a(n) for n = 1..65537</a>

%F Sum_{k=1..n} a(k)*g(n/k) = floor(n^(1/2)) where g(x) = 2^floor(log(x)/log(2)) for n>1 with a(1)=1.

%F a(1) = 1; for n > 1, a(n) = A000196(n) - Sum{k=1 .. n-1} a(k)*A053644(floor(n/k)). - _Antti Karttunen_, Sep 28 2018

%o (PARI) {a(n)=if(n==1,1,floor(n^(1/2))-sum(k=1,n-1,a(k)*2^floor(log(n/k)/log(2))))}

%o (PARI)

%o up_to = 2048;

%o A000196(n) = sqrtint(n);

%o A053644(n) = { my(k=1); while(k<=n, k<<=1); (k>>1); }; \\ From A053644. Note that we are calling this here also with rational arguments, but it works all fine.

%o A181563list(up_to) = { my(v=vector(up_to)); v[1] = 1; for(n=2, up_to, v[n] = A000196(n) - sum(k=1, n-1, v[k]*A053644(n/k))); (v); };

%o v181563 = A181563list(up_to);

%o A181563(n) = v181563[n]; \\ _Antti Karttunen_, Sep 28 2018

%Y Cf. A000196, A008836, A053644.

%K sign

%O 1,8

%A _Benoit Cloitre_, Jan 29 2011

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 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)