OFFSET
1,3
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
G. H. Hardy and J. E. Littlewood, Some problems of 'Partitio numerorum'; III: On the expression of a number as a sum of primes, Acta Math., Vol. 44, No. 1 (1923), pp. 1-70 (e.g. formula 4.11 p.32).
J. J. Sylvester, On the partition of an even number into two primes, Proc. London Math. See., ser. I, vol.4 (1871), pp. 4-6 (Math. Papers, vol. 2, pp. 709-711.
Marek Wolf, Applications of statistical mechanics in number theory, Physica A 274 (1999) 149-157 (formula (9) p. 154).
FORMULA
a(p^n) = p - 1 for prime p.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k)/A307410(k) = Product_{prime p > 2} (1 + 1/(p*(p-2))) = 1.51478012... (A167864). - Amiram Eldar, Mar 03 2025
EXAMPLE
1, 1, 2, 1, 4/3, 2, 6/5, 1, 2, 4/3, 10/9, 2, 12/11, ...
a(35) = 8 because 35 = 5 * 7 and then product is ((5-1)/(5-2))*((7-1)/(7-2)) = 8/5.
MATHEMATICA
j = {}; Do[prod = 1; Do[If[PrimeQ[n] && IntegerQ[d/n], prod = prod (n - 1)/(n - 2)], {n, 3, d}]; AppendTo[j, prod], {d, 1, 74}]; Numerator[j]
f[p_, e_] := If[p == 2, 1, (p-1)/(p-2)]; a[n_] := Numerator[Times @@ f @@@ FactorInteger[n]]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Mar 03 2025 *)
PROG
(PARI) a(n) = my(f=factor(n)[, 1]); numerator(prod(k=1, #f, if ((p=f[k])>2, (p-1)/(p-2), 1))); \\ Michel Marcus, Feb 05 2025
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Artur Jasinski, Feb 05 2025
STATUS
approved