OFFSET
1,2
COMMENTS
The corresponding gaps are 1, 2, 3, 4, 5, 10, 12, 16, 20, 34, 37, 48, 54, 66, 75, 121, 132, 146, 180, 238, 241, 248, 288, 302, 314, 332, 336, 343, 348, 400, 476, 479, 484, 496, 500, ...
EXAMPLE
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.
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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Sep 03 2021
STATUS
approved