login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Sum of the Doudna sequence and its Dirichlet inverse: a(n) = A005940(n) + A324640(n).
2

%I #5 Mar 11 2019 20:47:28

%S 2,0,0,4,0,12,0,8,9,20,0,12,0,36,30,16,0,10,0,20,54,60,0,24,25,100,15,

%T 36,0,48,0,32,90,44,90,28,0,84,150,40,0,32,0,60,97,180,0,48,81,146,66,

%U 100,0,270,150,72,126,500,0,108,0,324,93,64,250,-128,0,44,270,-48,0,56,0,220,339,84,270,-48,0,80,391,308,0,140,110

%N Sum of the Doudna sequence and its Dirichlet inverse: a(n) = A005940(n) + A324640(n).

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

%F a(n) = A005940(n) + A324640(n).

%o (PARI)

%o up_to = 16384;

%o DirInverse(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = -sumdiv(n, d, if(d<n, v[n/d]*u[d], 0))); (u) }; \\ Compute the Dirichlet inverse of the sequence given in input vector v.

%o A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ From A005940

%o v324640 = DirInverse(vector(up_to,n,A005940(n)));

%o A324640(n) = v324640[n];

%o A324641(n) = (A005940(n)+A324640(n));

%K sign

%O 1,1

%A _Antti Karttunen_, Mar 11 2019