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!)
A075113 a(n) = A000217(n) - A048702(n). 6
0, 0, 0, 1, -1, 0, 4, 7, -7, -6, 0, 3, 13, 18, 28, 35, -35, -34, -24, -21, -5, 0, 14, 21, 43, 52, 70, 81, 105, 118, 140, 155, -155, -154, -136, -133, -105, -100, -78, -71, -35, -26, 0, 11, 47, 60, 90, 105, 151, 168, 202, 221, 265, 286, 324, 347, 399, 424, 466, 493, 545, 574, 620, 651, -651, -650, -616, -613, -561 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,7
COMMENTS
The positions of the zeros seem to be given by A000975.
LINKS
FORMULA
a(A000225(n)) = ((2^n)-1)*(2^(n-1)) - (2^(2n) - 1)/3 = A006095(n).
MATHEMATICA
A048702 := Join[{0}, Reap[For[k = 1, k < 1500, k += 2, bb = IntegerDigits[k, 2]; If[bb == Reverse[bb], If[EvenQ[Length[bb]], Sow[k/3]]]]][[2, 1]]]; Table[n*(n + 1)/2 - A048702[[n + 1]], {n, 0, 50}] (* G. C. Greubel, Sep 26 2017 *)
PROG
(PARI) a01(n) = my(f); f = length(binary(n)) - 1; 2^(f+1)*n + sum(i=0, f, bittest(n, i) * 2^(f-i)); \\ A048701
a(n) = n*(n+1)/2 - a01(n)/3; \\ A006095
(Python)
def A075113(n: int) -> int:
s = bin(n)[2:]
return n * (n + 1) // 2 - int(s + s[::-1], 2) // 3
print([A075113(n) for n in range(69)]) # Peter Luschny, Dec 14 2022
CROSSREFS
Sequence in context: A093582 A275639 A201940 * A197739 A277577 A011222
KEYWORD
sign
AUTHOR
Antti Karttunen, Sep 02 2002
EXTENSIONS
Definition corrected by Georg Fischer, Dec 13 2022
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 05:59 EDT 2024. Contains 371906 sequences. (Running on oeis4.)