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.

A349125 Dirichlet inverse of A064989, where A064989 is multiplicative with a(2^e) = 1 and a(p^e) = prevprime(p)^e for odd primes p.

This page as a plain text file.
%I A349125 #26 Nov 14 2021 17:13:24
%S A349125 1,-1,-2,0,-3,2,-5,0,0,3,-7,0,-11,5,6,0,-13,0,-17,0,10,7,-19,0,0,11,0,
%T A349125 0,-23,-6,-29,0,14,13,15,0,-31,17,22,0,-37,-10,-41,0,0,19,-43,0,0,0,
%U A349125 26,0,-47,0,21,0,34,23,-53,0,-59,29,0,0,33,-14,-61,0,38,-15,-67,0,-71,31,0,0,35,-22,-73,0,0,37,-79
%N A349125 Dirichlet inverse of A064989, where A064989 is multiplicative with a(2^e) = 1 and a(p^e) = prevprime(p)^e for odd primes p.
%H A349125 Antti Karttunen, <a href="/A349125/b349125.txt">Table of n, a(n) for n = 1..20000</a>
%H A349125 Wikipedia, <a href="https://en.wikipedia.org/wiki/Dirichlet_convolution">Dirichlet convolution</a>
%H A349125 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>
%F A349125 a(1) = 1; a(n) = -Sum_{d|n, d < n} A064989(n/d) * a(d).
%F A349125 a(n) = A349126(n) - A064989(n).
%F A349125 Multiplicative with a(p^e) = 0 if e > 1, -1 if p = 2 and -prevprime(p) otherwise. - _Sebastian Karlsson_, Nov 13 2021
%F A349125 a(n) = A008683(n) * A064989(n). [Because A064989 is fully multiplicative. See "Properties" section in the Wikipedia article]
%t A349125 f[p_, e_] := If[e == 1, If[p == 2, -1, -NextPrime[p, -1]], 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Nov 13 2021 *)
%o A349125 (PARI)
%o A349125 A064989(n) = { my(f = factor(n)); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f); };
%o A349125 A349125(n) = (moebius(n)*A064989(n));
%o A349125 (PARI) A349125(n) = { my(f = factor(n)); prod(i=1, #f~, if(1<f[i,2], 0, if(2==f[i,1], -1, -precprime(f[i,1]-1)))); }; \\ (After Karlsson's multiplicative formula)
%o A349125 (Python)
%o A349125 from sympy import prevprime, factorint, prod
%o A349125 def f(p, e):
%o A349125     return 0 if e > 1 else -1 if p == 2 else -prevprime(p)
%o A349125 def a(n):
%o A349125     return prod(f(p, e) for p, e in factorint(n).items()) # _Sebastian Karlsson_, Nov 13 2021
%Y A349125 Cf. A008683, A064989, A151800, A349126, A349127.
%Y A349125 Cf. also A055615, A346234, A349134.
%K A349125 sign,mult
%O A349125 1,3
%A A349125 _Antti Karttunen_, Nov 13 2021