A347495 Factorial base Niven numbers (A118363) with a record gap to the next factorial base Niven number.
1, 2, 9, 12, 30, 40, 60, 192, 224, 318, 550, 640, 1136, 1989, 4875, 4980, 23355, 24272, 24378, 40131, 60192, 63872, 80472, 238680, 280140, 2027340, 2872620, 3622068, 13400475, 21293094, 25399080, 28584626, 111020840, 278690360, 355419734, 398884590, 834592590
Offset: 1
Examples
The first 8 factorial base Niven numbers are 1, 2, 4, 6, 8, 9, 12 and 16. The gaps between them are 1, 2, 2, 2, 1, 3 and 4. The record gaps, 1, 2, 3 and 4, occur after the terms 1, 2, 9 and 12.
Programs
-
Mathematica
fivenQ[n_] := Module[{s = 0, i = 2, k = n}, While[k > 0, k = Floor[n/i!]; s = s + (i - 1)*k; i++]; Divisible[n, n - s]]; gapmax = 0; n1 = 1; s = {}; Do[If[fivenQ[n], gap = n - n1; If[gap > gapmax, gapmax = gap; AppendTo[s, n1]]; n1 = n], {n, 2, 10^5}]; s (* after Jean-François Alcover at A034968 *)
Comments