A318935 a(n) = Sum_{2^m divides n} 2^(3*m).
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
Offset: 1
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.
Programs
-
Maple
A007814 := n -> padic[ordp](n, 2): 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 *)
-
PARI
A318935(n) = { my(s=1,w=8); while(!(n%2), s += w; n /= 2; w *= 8); (s); }; \\ Antti Karttunen, Nov 07 2018
-
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
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
Extensions
Keyword:mult added by Antti Karttunen, Nov 07 2018
Comments