A347496 Primorial base Niven numbers (A333426) with a record gap to the next primorial base Niven number.
1, 2, 9, 12, 25, 50, 120, 344, 400, 770, 1120, 3920, 13566, 13734, 19845, 22748, 148148, 167854, 176220, 889896, 2946216, 3685416, 5072256, 7139280, 8521056, 9058900, 9625336, 17825857, 19392072, 27504848, 76952788, 106691001, 162789696, 198582784, 212847225
Offset: 1
Examples
The first 8 primorial 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
max = 7; bases = Prime @ Range[max, 1, -1]; nmax = Times @@ bases - 1; sumdig[n_] := Plus @@ IntegerDigits[n, MixedRadix[bases]]; primoNivenQ[n_] := Divisible[n, sumdig[n]]; gapmax = 0; n1 = 1; s = {}; Do[If[primoNivenQ[n], gap = n - n1; If[gap > gapmax, gapmax = gap; AppendTo[s, n1]]; n1 = n], {n, 2, nmax}]; s
Comments