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.

A378221 Dirichlet inverse of sigma(A003961(n)), where A003961 is fully multiplicative function with a(prime(i)) = prime(i+1).

This page as a plain text file.
%I A378221 #14 Jan 13 2025 01:29:18
%S A378221 1,-4,-6,3,-8,24,-12,0,5,32,-14,-18,-18,48,48,0,-20,-20,-24,-24,72,56,
%T A378221 -30,0,7,72,0,-36,-32,-192,-38,0,84,80,96,15,-42,96,108,0,-44,-288,
%U A378221 -48,-42,-40,120,-54,0,11,-28,120,-54,-60,0,112,0,144,128,-62,144,-68,152,-60,0,144,-336,-72,-60,180,-384,-74,0
%N A378221 Dirichlet inverse of sigma(A003961(n)), where A003961 is fully multiplicative function with a(prime(i)) = prime(i+1).
%H A378221 Antti Karttunen, <a href="/A378221/b378221.txt">Table of n, a(n) for n = 1..20000</a>
%H A378221 <a href="/index/Pri#prime_indices">Index entries for sequences related to prime indices in the factorization of n</a>.
%F A378221 Multiplicative with a(p) = -q-1, a(p^2) = q, a(p^k) = 0 for k > 2, where q = A151800(p), the least prime > p.
%F A378221 a(n) = A046692(A003961(n)).
%t A378221 f[p_, e_] := Which[e == 1, -NextPrime[p]-1, e == 2, NextPrime[p], e >= 3, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Jan 12 2025 *)
%o A378221 (PARI) A378221(n) = { my(f=factor(n)~); prod(i=1, #f, if(1==f[2,i], -(nextprime(1+f[1,i])+1), if(2==f[2,i], nextprime(1+f[1,i]), 0))); };
%o A378221 (Python)
%o A378221 from math import prod
%o A378221 from sympy import nextprime, factorint
%o A378221 def A378221(n): return 0 if any(map(lambda x:x>2,(f:=factorint(n)).values())) else prod(-nextprime(p)-1 if e&1 else nextprime(p) for p,e in f.items()) # _Chai Wah Wu_, Nov 23 2024
%Y A378221 Dirichlet inverse of A003973.
%Y A378221 Cf. A003961, A046692, A151800, A346234, A378220.
%K A378221 sign,mult
%O A378221 1,2
%A A378221 _Antti Karttunen_, Nov 23 2024