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.
%I A365712 #9 Sep 19 2023 15:32:18 %S A365712 2,0,0,1,0,-6,0,-7,9,-4,0,21,0,4,12,13,0,-9,0,-10,-12,-16,0,-3,4,-26, %T A365712 27,-32,0,72,0,-1,48,-10,-8,36,0,16,78,94,0,54,0,50,18,14,0,3,4,74,30, %U A365712 91,0,-27,32,-25,-48,-52,0,-30,0,-62,-18,-74,52,18,0,-25,-42,-66,0,-36,0,-74,-78,-110,-32,0,0,-40,81 %N A365712 Sum of balanced ternary enumeration of integers (A117966) and its Dirichlet inverse. %H A365712 Antti Karttunen, <a href="/A365712/b365712.txt">Table of n, a(n) for n = 1..19683</a> %F A365712 a(n) = A117966(n) + A365711(n). %F A365712 a(1) = 2, and for n > 1, a(n) = -Sum_{d|n, 1<d<n} A117966(d) * A365711(n/d). %o A365712 (PARI) %o A365712 A117966(n) = subst(Pol(apply(x->if(x == 2, -1, x), digits(n, 3)), 'x), 'x, 3); \\ From A117966 by _Gheorghe Coserea_ %o A365712 memoA365711 = Map(); %o A365712 A365711(n) = if(1==n,1,my(v); if(mapisdefined(memoA365711,n,&v), v, v = -sumdiv(n,d,if(d<n,A117966(n/d)*A365711(d),0)); mapput(memoA365711,n,v); (v))); %o A365712 A365712(n) = (A117966(n)+A365711(n)); %Y A365712 Cf. A117966, A365711. %Y A365712 Cf. also A365714, A365804. %K A365712 sign %O A365712 1,1 %A A365712 _Antti Karttunen_, Sep 19 2023