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!)
A317843 Dirichlet inverse of Stern's diatomic sequence (A002487). 10

%I #11 Feb 16 2020 07:56:14

%S 1,-1,-2,0,-3,2,-3,0,0,3,-5,0,-5,3,8,0,-5,0,-7,0,4,5,-7,0,2,5,0,0,-7,

%T -8,-5,0,14,5,9,0,-11,7,10,0,-11,-4,-13,0,-8,7,-9,0,0,-2,8,0,-13,0,19,

%U 0,18,7,-11,0,-9,5,14,0,23,-14,-11,0,14,-9,-13,0,-15,11,-20,0,13,-10,-13,0,2,11,-19,0,9,13,10,0,-17,8,11,0

%N Dirichlet inverse of Stern's diatomic sequence (A002487).

%H Antti Karttunen, <a href="/A317843/b317843.txt">Table of n, a(n) for n = 1..16384</a>

%H <a href="/index/St#Stern">Index entries for sequences related to Stern's sequences</a>

%F a(1) = 1; for n > 1, a(n) = -Sum_{d|n, d<n} A002487(n/d)*a(d).

%t s[0] = 0; s[1] = 1;

%t s[n_] := s[n] = If[EvenQ[n], s[n/2], s[(n-1)/2] + s[(n+1)/2]];

%t a[n_] := a[n] = If[n == 1, 1, -Sum[s[n/d] a[d], {d, Most@ Divisors[n]}]];

%t Array[a, 100] (* _Jean-François Alcover_, Feb 16 2020 *)

%o (PARI)

%o A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487

%o A317843(n) = if(1==n,1,-sumdiv(n,d,if(d<n,A002487(n/d)*A317843(d),0)));

%Y Cf. A002487, A317839, A317841, A317842.

%K sign

%O 1,3

%A _Antti Karttunen_, Aug 09 2018

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 May 5 14:41 EDT 2024. Contains 372275 sequences. (Running on oeis4.)