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.

A003972 Moebius transform of A003961; a(n) = phi(A003961(n)), where A003961 shifts the prime factorization of n one step towards the larger primes.

This page as a plain text file.
%I A003972 #42 Apr 15 2025 08:27:15
%S A003972 1,2,4,6,6,8,10,18,20,12,12,24,16,20,24,54,18,40,22,36,40,24,28,72,42,
%T A003972 32,100,60,30,48,36,162,48,36,60,120,40,44,64,108,42,80,46,72,120,56,
%U A003972 52,216,110,84,72,96,58,200,72,180,88,60,60,144,66,72,200,486,96,96,70
%N A003972 Moebius transform of A003961; a(n) = phi(A003961(n)), where A003961 shifts the prime factorization of n one step towards the larger primes.
%H A003972 Antti Karttunen, <a href="/A003972/b003972.txt">Table of n, a(n) for n = 1..20000</a> (first 1000 terms from Vincenzo Librandi)
%F A003972 Multiplicative with a(p^e) = (q-1)q^(e-1) where q = nextPrime(p). - _David W. Wilson_, Sep 01 2001
%F A003972 a(n) = A000010(A003961(n)) = A037225(A108228(n)) = A037225(A048673(n)-1). - _Antti Karttunen_, Aug 20 2020
%F A003972 Sum_{k=1..n} a(k) ~ c * n^2, where c = (3/Pi^2) * Product_{p prime} (p^2-p)/(p^2 - nextPrime(p)) = 1.2547593344... . - _Amiram Eldar_, Nov 18 2022
%t A003972 b[1] = 1; b[p_?PrimeQ] := b[p] = Prime[ PrimePi[p] + 1]; b[n_] := b[n] = Times @@ (b[First[#]]^Last[#] &) /@ FactorInteger[n]; a[n_] := Sum[ MoebiusMu[n/d]*b[d], {d, Divisors[n]}]; Table[a[n], {n, 1, 70}]  (* _Jean-François Alcover_, Jul 18 2013 *)
%o A003972 (PARI) A003972(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); eulerphi(factorback(f)); }; \\ _Antti Karttunen_, Aug 20 2020
%o A003972 (Python)
%o A003972 from math import prod
%o A003972 from sympy import nextprime, factorint
%o A003972 def A003972(n): return prod((q:=nextprime(p))**(e-1)*(q-1) for p, e in factorint(n).items()) # _Chai Wah Wu_, Jul 18 2022
%Y A003972 Cf. A000010, A003961, A037225, A048673, A108228.
%Y A003972 Cf. also A003973.
%K A003972 nonn,mult
%O A003972 1,2
%A A003972 _Marc LeBrun_
%E A003972 More terms from _David W. Wilson_, Aug 29 2001
%E A003972 Secondary name added by _Antti Karttunen_, Aug 20 2020