OFFSET
1,5
COMMENTS
Denominator of c_n = Product_{odd p| n} (p-1)/(p-2). Numerator is A173557. [Yamasaki and Yamasaki]. - N. J. A. Sloane, Jan 19 2020
LINKS
Markus Sigg, Table of n, a(n) for n = 1..10000
Yasuo Yamasaki and Aiichi Yamasaki, On the Gap Distribution of Prime Numbers, Kyoto University Research Information Repository, October 1994. MR1370273 (97a:11141).
FORMULA
Sum_{k=1..n} a(k) ~ c * n^2, where c = (2/3) * Product_{p prime} (1 - 3/(p*(p+1))) = 0.1950799046... . - Amiram Eldar, Nov 12 2022
a(n) = abs( Sum_{d divides n, d odd} mobius(d) * phi(d) ). - Peter Bala, Feb 01 2024
MAPLE
A305444 := proc(n) mul(d - 2, d = numtheory[factorset](n) minus {2}) end proc:
MATHEMATICA
a[n_] := If[n == 1, 1, Times @@ (DeleteCases[FactorInteger[n][[All, 1]], 2] - 2)];
Array[a, 100] (* Jean-François Alcover, Apr 08 2020*)
PROG
(PARI) a(n)={my(f=factor(n>>valuation(n, 2))[, 1]); prod(i=1, #f, f[i]-2)} \\ Andrew Howroyd, Aug 12 2018
(Python)
from math import prod
from sympy import primefactors
def A305444(n): return prod(p-2 for p in primefactors(n>>(~n&n-1).bit_length())) # Chai Wah Wu, Sep 08 2023
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Markus Sigg, Aug 12 2018
STATUS
approved