cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A316441 a(n) = Sum (-1)^k where the sum is over all factorizations of n into factors > 1 and k is the number of factors.

This page as a plain text file.
%I A316441 #11 Sep 23 2018 21:27:27
%S A316441 1,-1,-1,0,-1,0,-1,-1,0,0,-1,0,-1,0,0,1,-1,0,-1,0,0,0,-1,1,0,0,-1,0,
%T A316441 -1,1,-1,-1,0,0,0,1,-1,0,0,1,-1,1,-1,0,0,0,-1,0,0,0,0,0,-1,1,0,1,0,0,
%U A316441 -1,1,-1,0,0,1,0,1,-1,0,0,1,-1,0,-1,0,0,0,0,1,-1
%N A316441 a(n) = Sum (-1)^k where the sum is over all factorizations of n into factors > 1 and k is the number of factors.
%C A316441 First term greater than 1 in absolute value is a(256) = 2.
%H A316441 Antti Karttunen, <a href="/A316441/b316441.txt">Table of n, a(n) for n = 1..65537</a>
%H A316441 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>
%F A316441 Dirichlet g.f.: Product_{n > 1} 1/(1 + 1/n^s).
%e A316441 The factorizations of 24 are (2*2*2*3), (2*2*6), (2*3*4), (2*12), (3*8), (4*6), (24); so a(24) = 1 - 2 + 3 - 1 = 1.
%t A316441 facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
%t A316441 Table[Sum[(-1)^Length[f],{f,facs[n]}],{n,200}]
%o A316441 (PARI) A316441(n, m=n, k=0) = if(1==n, (-1)^k, my(s=0); fordiv(n, d, if((d>1)&&(d<=m), s += A316441(n/d, d, k+1))); (s)); \\ _Antti Karttunen_, Sep 08 2018, after _Michael B. Porter_'s code for A001055
%Y A316441 Cf. A001222, A001055, A045778, A114592, A162247, A190938, A259936, A281116, A303386.
%K A316441 sign
%O A316441 1,256
%A A316441 _Gus Wiseman_, Jul 03 2018
%E A316441 Secondary offset added by _Antti Karttunen_, Sep 08 2018