A129502 For n=2^k, a(n) = binomial(k + 2, 2), else 0.
1, 3, 0, 6, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1
Examples
a(4) = 6 = sum of A129501 terms: (3 + 2 + 0 + 1).
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..1024
Programs
-
Mathematica
Table[If[IntegerQ[Log2[n]],Binomial[Log2[n]+2,2],0],{n,100}] (* Harvey P. Dale, May 10 2022 *)
-
PARI
a(n)={my(e=valuation(n, 2)); if(n==1<
Andrew Howroyd, Aug 03 2018
Formula
From Andrew Howroyd, Aug 04 2018: (Start)
Multiplicative with a(2^e) = binomial(e + 2, 2), a(p^e) = 0 for odd prime p.
Dirichlet g.f.: 1/(1 - 1/2^s)^3. - Amiram Eldar, Oct 28 2023
Extensions
Name changed and terms a(40) and beyond from Andrew Howroyd, Aug 03 2018
Comments