A334883 Primitive practical numbers (A267124) with a record gap to the next primitive practical number.
1, 2, 6, 42, 104, 140, 1036, 1590, 2730, 7900, 10374, 19180, 22660, 23180, 26418, 105868, 114960, 139060, 295780, 403524, 482250, 1294144, 2468944, 4799058, 5379282, 19035500, 20233936, 21803860, 112406992, 789190976, 3520928922
Offset: 1
Examples
The first 8 primitive practical numbers are 1, 2, 6, 20, 28, 30, 42 and 66. The differences between these terms are 1, 4, 14, 8, 2, 12 and 24. The record gaps are 1, 4, 14 and 24, which occur after the terms 1, 2, 6 and 42.
Programs
-
Mathematica
f[p_, e_] := (p^(e + 1) - 1)/(p - 1); pracQ[fct_] := (ind = Position[fct[[;; , 1]]/(1 + FoldList[Times, 1, f @@@ Most@fct]), ?(# > 1 &)]) == {}; pracTestQ[fct, k_] := Module[{f = fct}, f[[k, 2]] -= 1; pracQ[f]]; primPracQ[n_] := Module[{fct = FactorInteger[n]}, pracQ[fct] && AllTrue[Range@Length[fct], fct[[#, 2]] == 1 || ! pracTestQ[fct, #] &]]; seq = {1}; m = 2; dm = 1; Do[If[primPracQ[n], d = n - m; If[d > dm, dm = d; AppendTo[seq, m]]; m = n], {n, 4, 10^5, 2}]; seq
Comments