login
a(n) = A163659(n^2), where A163659 is the logarithmic derivative of Stern's diatomic series (A002487).
3

%I #23 Oct 24 2023 04:37:35

%S 1,7,-2,31,1,-14,1,127,-2,7,1,-62,1,7,-2,511,1,-14,1,31,-2,7,1,-254,1,

%T 7,-2,31,1,-14,1,2047,-2,7,1,-62,1,7,-2,127,1,-14,1,31,-2,7,1,-1022,1,

%U 7,-2,31,1,-14,1,127,-2,7,1,-62,1,7,-2,8191,1,-14,1,31,-2,7,1,-254,1,7,-2,31,1,-14,1,511,-2,7,1,-62,1,7,-2,127,1,-14,1,31,-2,7,1,-4094

%N a(n) = A163659(n^2), where A163659 is the logarithmic derivative of Stern's diatomic series (A002487).

%C Multiplicative because A163659 is. - _Andrew Howroyd_, Jul 26 2018

%H Paul D. Hanna, <a href="/A195587/b195587.txt">Table of n, a(n) for n = 1..1000</a>

%F L.g.f.: log(1+x+x^2) + Sum_{n>=0} 3*2^n * log(1 + x^(2*2^n) + x^(4*2^n)) = Sum_{n>=1} a(n)*x^n/n. - _Paul D. Hanna_, May 04 2014

%F G.f.: x*(1+2*x)/(1+x+x^2) + Sum_{n>=0} 6*4^n * x^(2*2^n) * (1 + 2*x^(2*2^n)) / (1 + x^(2*2^n) + x^(4*2^n)). - _Paul D. Hanna_, May 04 2014

%F Dirichlet g.f.: zeta(s) * (1 - 3^(1-s)) * (2^s + 2) / (2^s - 4). - _Amiram Eldar_, Oct 24 2023

%e L.g.f.: L(x) = x + 7*x^2/2 - 2*x^3/3 + 31*x^4/4 + x^5/5 - 14*x^6/6 + x^7/7 + 127*x^8/8 +...

%e where

%e exp(L(x)) = 1 + x + 4*x^2 + 3*x^3 + 15*x^4 + 12*x^5 + 37*x^6 + 25*x^7 +...

%t a[n_] := Times @@ (Function[{p, e}, Which[p == 2, 2^(e+1) - 1, p == 3, -2, True, 1]] @@@ FactorInteger[n^2]);

%t a /@ Range[1, 100] (* _Jean-François Alcover_, Sep 20 2019 *)

%o (PARI) {A163659(n)=if(n<1,0,if(n%3,1,-2)*sigma(2^valuation(n,2)))}

%o {a(n)=A163659(n^2)}

%o for(n=1, 64, print1(a(n), ", "))

%o (PARI) {a(n)=local(X=x+x*O(x^n), A); A=log(1+X+X^2) + sum(k=0, #binary(n), 3*2^k*log(1 + X^(2*2^k) + X^(4*2^k))); n*polcoeff(A, n)}

%o for(n=1, 64, print1(a(n), ", "))

%Y Cf. A195586, A163659, A237649.

%K sign,mult

%O 1,2

%A _Paul D. Hanna_, Sep 20 2011