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!)
A369180 Alternating sum of the k-adic valuations (ruler functions) of n. 2
0, 1, -1, 3, -1, 1, -1, 5, -3, 1, -1, 4, -1, 1, -3, 8, -1, 0, -1, 4, -3, 1, -1, 7, -3, 1, -5, 4, -1, 1, -1, 10, -3, 1, -3, 5, -1, 1, -3, 7, -1, 1, -1, 4, -6, 1, -1, 11, -3, 0, -3, 4, -1, -1, -3, 7, -3, 1, -1, 6, -1, 1, -6, 14, -3, 1, -1, 4, -3, 1, -1, 9, -1, 1, -6, 4, -3, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
FORMULA
a(n) = Sum_{k=2..n} (-1)^k * valuation(n,k).
a(n) = A007814(n) - A007949(n) + A235127(n) - (...).
G.f.: Sum_{k>=2, j>=1} (-1)^k x^(k^j)/(1-x^(k^j)).
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{n=1..m} a(n) = log(2).
Dirichlet g.f.: zeta(s) * Sum_{k>=1} (1 - eta(ks)).
Sum_{n>=1} a(n)/n^2 = Pi^2/24.
MAPLE
a:= n-> add((-1)^i*padic[ordp](n, i), i=2..n):
seq(a(n), n=1..78); # Alois P. Heinz, Jan 15 2024
MATHEMATICA
z = 70; Sum[(-1)^k IntegerExponent[Range[z], k], {k, 2, z}]
PROG
(PARI) a(n) = sum(k=2, n, (-1)^k * valuation(n, k)); \\ Michel Marcus, Jan 18 2024
CROSSREFS
Cf. A309891.
Sequence in context: A360908 A351347 A046643 * A351565 A254101 A349025
KEYWORD
sign
AUTHOR
Friedjof Tellkamp, Jan 15 2024
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 May 12 06:47 EDT 2024. Contains 372432 sequences. (Running on oeis4.)