|
|
A318935
|
|
a(n) = Sum_{2^m divides n} 2^(3*m).
|
|
4
|
|
|
1, 9, 1, 73, 1, 9, 1, 585, 1, 9, 1, 73, 1, 9, 1, 4681, 1, 9, 1, 73, 1, 9, 1, 585, 1, 9, 1, 73, 1, 9, 1, 37449, 1, 9, 1, 73, 1, 9, 1, 585, 1, 9, 1, 73, 1, 9, 1, 4681, 1, 9, 1, 73, 1, 9, 1, 585, 1, 9, 1, 73, 1, 9, 1, 299593, 1, 9, 1, 73, 1, 9, 1, 585, 1, 9, 1, 73, 1, 9, 1, 4681
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Sum of cubes of powers of 2 that divide n.
The high-water marks are (8^m - 1)/7, see A023001.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (8^(m+1)-1)/7 where m is the 2-adic valuation of n (A007814). - Chai Wah Wu, Sep 14 2018
Thus multiplicative with a(2^m) = (8^(m+1)-1)/7, and a(p^e) = 1 for odd primes p. - Antti Karttunen, Nov 07 2018
Dirichlet g.f.: zeta(s) / (1 - 1/2^(s-3)). - Amiram Eldar, Oct 23 2023
|
|
MAPLE
|
T:= n -> add(2^(3*m), m=0..A007814(n));
[seq(T(n), n=1..100)];
|
|
MATHEMATICA
|
Array[DivisorSum[#, 2^(3 Log2@ #) &, IntegerQ@ Log2@ # &] &, 80] (* or *)
Array[Total[2^(3 Select[Log2@ Divisors@ #, IntegerQ])] &, 80] (* Michael De Vlieger, Nov 07 2018 *)
a[n_] := (8^(IntegerExponent[n, 2] + 1) - 1) / 7; Array[a, 100] (* Amiram Eldar, Oct 23 2023 *)
|
|
PROG
|
(Python)
from __future__ import division
s = bin(n)
return (8**(len(s)-len(s.rstrip('0'))+1) - 1)//7 # Chai Wah Wu, Sep 14 2018
(PARI) A318935(n) = { my(s=1, w=8); while(!(n%2), s += w; n /= 2; w *= 8); (s); }; \\ Antti Karttunen, Nov 07 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,mult
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|