login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A163659 L.g.f.: Sum_{n>=1} a(n)*x^n/n = log(S(x)/x) where S(x) is the g.f. of Stern's diatomic series (A002487). 7
1, 3, -2, 7, 1, -6, 1, 15, -2, 3, 1, -14, 1, 3, -2, 31, 1, -6, 1, 7, -2, 3, 1, -30, 1, 3, -2, 7, 1, -6, 1, 63, -2, 3, 1, -14, 1, 3, -2, 15, 1, -6, 1, 7, -2, 3, 1, -62, 1, 3, -2, 7, 1, -6, 1, 15, -2, 3, 1, -14, 1, 3, -2, 127, 1, -6, 1, 7, -2, 3, 1, -30, 1, 3, -2, 7, 1, -6, 1, 31, -2, 3, 1, -14, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(2^n) = 2^(n+1) - 1 for n>=0.
a(n) is multiplicative with a(2^e) = 2^(e+1) - 1, a(3^e) = -2 if e>0, a(p^e) = 1 if p>3. - Michael Somos, Feb 14 2011
L.g.f.: Sum_{n>=0} log(1 + x^(2^n) + x^(2*2^n)) = Sum_{n>=1} a(n)*x^n/n. - Paul D. Hanna, May 04 2014
G.f.: Sum_{n>=0} 2^n * x^(2^n) * (1 + 2*x^(2^n)) / (1 + x^(2^n) + x^(2*2^n)). - Paul D. Hanna, May 04 2014
Dirichlet g.f.: zeta(s) * (1 - 3^(1-s)) / (1 - 2^(1-s)). - Amiram Eldar, Oct 24 2023
EXAMPLE
L.g.f.: log(S(x)/x) = x + 3*x^2/2 - 2*x^3/3 + 7*x^4/4 + x^5/5 - 6*x^6/6 +...
where S(x) is the g.f. of Stern's diatomic series (A002487):
S(x) = x + x^2 + 2*x^3 + x^4 + 3*x^5 + 2*x^6 + 3*x^7 + x^8 + 4*x^9 +...
MATHEMATICA
a[ n_] := If[ n < 1, 0, Times @@ (Which[ # < 2, 1, # == 2, 2^(#2 + 1) - 1, # == 3, -2, True, 1] & @@@ FactorInteger[n])]; (* Michael Somos, Jun 27 2017 *)
PROG
(PARI) A002487(n)=local(c=1, b=0); while(n>0, if(bitand(n, 1), b+=c, c+=b); n>>=1); b
{a(n)=n*polcoeff(log(sum(k=0, n, A002487(k+1)*x^k)+x*O(x^n)), n)}
for(n=1, 64, print1(a(n), ", "))
(PARI) {a(n) = if( n<1, 0, if( n%3, 1, -2) * sigma(2 ^ valuation(n, 2)))}; /* Michael Somos, Feb 14 2011 */
(PARI) a(n)=local(X=x+x*O(x^n), A); A=log(1+X+X^2) + sum(k=0, #binary(n), log(1 + X^(2*2^k) + X^(4*2^k))); n*polcoeff(A, n)
for(n=1, 64, print1(a(n), ", ")) \\ Paul D. Hanna, May 04 2014
CROSSREFS
Sequence in context: A369042 A243375 A369045 * A348337 A010760 A085594
KEYWORD
sign,easy,mult
AUTHOR
Paul D. Hanna, Aug 02 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 13:32 EDT 2024. Contains 371971 sequences. (Running on oeis4.)