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
Antti Karttunen, Table of n, a(n) for n = 1..16383
P. J. C. Lamont, The number of Cayley integers of given norm, Proceedings of the Edinburgh Mathematical Society, 25.1 (1982): 101-103. See T, p. 102.
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
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
def A318935(n):
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
N. J. A. Sloane, Sep 14 2018
EXTENSIONS
Keyword:mult added by Antti Karttunen, Nov 07 2018
STATUS
approved