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!)
A192895 A000120-deficiency of n. 18
-1, 0, -1, 1, -1, 2, -2, 2, 1, 2, -2, 5, -2, 2, 1, 3, -1, 6, -2, 5, 3, 2, -3, 8, 0, 2, 1, 6, -3, 10, -4, 4, 4, 2, 3, 11, -2, 2, 2, 8, -2, 12, -3, 6, 7, 2, -4, 11, 1, 6, 1, 6, -3, 10, 1, 10, 2, 2, -4, 19, -4, 2, 5, 5, 4, 12, -2, 5, 4, 12, -3, 16, -2, 2, 8, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
LINKS
FORMULA
a(n) = Sum(A000120(d): 1 <= d < n and n mod d = 0) - A000120(n); see A175522 for motivation and more information;
a(A175524(n)) < 0; a(A175522(n)) = 0; a(A175526(n)) > 0.
a(n) = A292257(n) - A000120(n). - Antti Karttunen, Nov 10 2017
MATHEMATICA
a[n_] := DivisorSum[n, Total[IntegerDigits[#, 2]]*(-1)^Boole[# == n]&]; Array[a, 80] (* Jean-François Alcover, Dec 05 2015, adapted from PARI *)
PROG
(Haskell)
a192895 n =
sum (map a000120 $ filter ((== 0) . (mod n)) [1..n-1]) - a000120 n
a192895_list = map a192895 [1..]
(PARI) a(n)=sumdiv(n, d, hammingweight(d)*(-1)^(d==n)) \\ Charles R Greathouse IV, Feb 07 2013
(Python)
from sympy import divisors
def A192895(n): return sum((d.bit_count() if d<n else -d.bit_count()) for d in divisors(n, generator=True)) # Chai Wah Wu, Jul 25 2023
CROSSREFS
Cf. A257691 (positions where a(n) <= 0), A294905 (and its char.fun).
Sequence in context: A366693 A147680 A373688 * A210685 A264051 A120965
KEYWORD
sign
AUTHOR
Reinhard Zumkeller, Jul 12 2011
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 July 16 23:11 EDT 2024. Contains 374360 sequences. (Running on oeis4.)