%I #29 Oct 23 2023 02:01:06
%S 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,
%T 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,
%U 1,9,1,73,1,9,1,299593,1,9,1,73,1,9,1,585,1,9,1,73,1,9,1,4681
%N a(n) = Sum_{2^m divides n} 2^(3*m).
%C Sum of cubes of powers of 2 that divide n.
%C The high-water marks are (8^m - 1)/7, see A023001.
%H Antti Karttunen, <a href="/A318935/b318935.txt">Table of n, a(n) for n = 1..16383</a>
%H P. J. C. Lamont, <a href="https://doi.org/10.1017/S001309150000420X">The number of Cayley integers of given norm</a>, Proceedings of the Edinburgh Mathematical Society, 25.1 (1982): 101-103. See T, p. 102.
%F a(n) = (8^(m+1)-1)/7 where m is the 2-adic valuation of n (A007814). - _Chai Wah Wu_, Sep 14 2018
%F 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
%F Dirichlet g.f.: zeta(s) / (1 - 1/2^(s-3)). - _Amiram Eldar_, Oct 23 2023
%p A007814 := n -> padic[ordp](n, 2):
%p T:= n -> add(2^(3*m),m=0..A007814(n));
%p [seq(T(n),n=1..100)];
%t Array[DivisorSum[#, 2^(3 Log2@ #) &, IntegerQ@ Log2@ # &] &, 80] (* or *)
%t Array[Total[2^(3 Select[Log2@ Divisors@ #, IntegerQ])] &, 80] (* _Michael De Vlieger_, Nov 07 2018 *)
%t a[n_] := (8^(IntegerExponent[n, 2] + 1) - 1) / 7; Array[a, 100] (* _Amiram Eldar_, Oct 23 2023 *)
%o (Python)
%o from __future__ import division
%o def A318935(n):
%o s = bin(n)
%o return (8**(len(s)-len(s.rstrip('0'))+1) - 1)//7 # _Chai Wah Wu_, Sep 14 2018
%o (PARI) A318935(n) = { my(s=1,w=8); while(!(n%2), s += w; n /= 2; w *= 8); (s); }; \\ _Antti Karttunen_, Nov 07 2018
%Y Cf. A007814, A023001.
%K nonn,easy,mult
%O 1,2
%A _N. J. A. Sloane_, Sep 14 2018
%E Keyword:mult added by _Antti Karttunen_, Nov 07 2018