The OEIS is supported by the many generous donors to the OEIS Foundation.

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A087810 First differences of A029931. 1
 1, 1, 1, 0, 1, 1, 1, -2, 1, 1, 1, 0, 1, 1, 1, -5, 1, 1, 1, 0, 1, 1, 1, -2, 1, 1, 1, 0, 1, 1, 1, -9, 1, 1, 1, 0, 1, 1, 1, -2, 1, 1, 1, 0, 1, 1, 1, -5, 1, 1, 1, 0, 1, 1, 1, -2, 1, 1, 1, 0, 1, 1, 1, -14, 1, 1, 1, 0, 1, 1, 1, -2, 1, 1, 1, 0, 1, 1, 1, -5, 1, 1, 1, 0, 1, 1, 1, -2, 1, 1, 1, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,8 COMMENTS Multiplicative with a(2^e) = 1 - A000217(e-1), a(p^e) = 1 otherwise. - Mitch Harris, May 17 2005 LINKS Antti Karttunen, Table of n, a(n) for n = 1..16385 FORMULA a(4n) = 1 - T(v_2(n)), else a(n) = 1, where T = A000217 (triangular numbers) and v_2 = A007814 (exponent of 2 in factorization of n). G.f.: Sum_{k>=0} (k+1)t/(1+t), where t=x^2^k. MATHEMATICA Differences[ Table[ (bits = IntegerDigits[n, 2]) . Reverse[ Range[ Length[bits]]], {n, 0, 92}]] (* Jean-François Alcover, Sep 03 2012 *) PROG (PARI) a(n)=if(n<1, 0, if(n%2==0, if(n%4, 1, 1-valuation(n, 2)*(valuation(n, 2)-1)/2), 1)) (PARI) a(n)=polcoeff(sum(k=0, floor(log(n)/log(2)), (k+1)*x^2^k/(1+x^2^k)) + O(x^(n+1)), n) (Scheme) (define (A087810 n) (- (A029931 n) (A029931 (- n 1)))) (define (A029931 n) (let loop ((n n) (i 1) (s 0)) (cond ((zero? n) s) ((odd? n) (loop (/ (- n 1) 2) (+ 1 i) (+ s i))) (else (loop (/ n 2) (+ 1 i) s))))) ;; Antti Karttunen, Nov 18 2017 CROSSREFS Cf. A029931. Sequence in context: A350074 A333179 A240021 * A345416 A321755 A052314 Adjacent sequences: A087807 A087808 A087809 * A087811 A087812 A087813 KEYWORD sign,easy,mult AUTHOR Ralf Stephan, Oct 16 2003 STATUS approved

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.

Last modified December 5 15:27 EST 2022. Contains 358588 sequences. (Running on oeis4.)