OFFSET
1,2
COMMENTS
The record gap values are 1, 2, 4, 6, 8, 12, 18, 20, 24, 28, 30, 36, 40, 42, 44, 48, 54, 64, 70, 72, 76, 80, 84, 88, 90, 98, 100, 112, 122, 124, 128, 136, 160, 180, 192, ...
LINKS
Miriam Hausman and Harold N. Shapiro, On practical numbers, Communications on Pure and Applied Mathematics, Vol. 37, No. 5 (1984), pp. 705-713, section 4.
Giuseppe Melfi, A survey on practical numbers, Rend. Sem. Mat. Univ. Politec. Torino, Vol. 53, No. 4 (1995), pp. 347-359, section 5.
EXAMPLE
The first 6 practical numbers are 1, 2, 4, 6, 8 and 12. The differences between these terms are 1, 2, 2, 2 and 4. The record gaps are 1, 2 and 4, which occur after the terms 1, 2 and 8.
MATHEMATICA
f[p_, e_] := (p^(e + 1) - 1)/(p - 1); pracQ[n_] := (ind = Position[(fct = FactorInteger[n])[[;; , 1]]/(1 + FoldList[Times, 1, f @@@ Most @ fct]), _?(# > 1 &)]) == {}; seq = {}; m = 1; dm = 0; Do[If[pracQ[n], d = n - m; If[d > dm, dm = d; AppendTo[seq, m]]; m = n], {n, 2, 10^6}]; seq
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Apr 29 2020
STATUS
approved