login
Numbers k such that k divides the sum of digits in primorial base of all numbers from 1 to k.
4

%I #14 Feb 22 2024 09:08:45

%S 1,2,10,22,58,62,63,64,66,67,68,118,178,418,838,1258,1264,1265,1277,

%T 1278,1678,2098,4618,9238,10508,10509,10510,10512,10513,10514,13858,

%U 14704,14754,18478,23098,23102,23276,27718,60058,120118,138602,139016,139024,139134

%N Numbers k such that k divides the sum of digits in primorial base of all numbers from 1 to k.

%C The corresponding quotients are 1, 1, 2, 3, 4, 4, 4, 4, 4, ....

%H Amiram Eldar, <a href="/A333703/b333703.txt">Table of n, a(n) for n = 1..136</a>

%H <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>.

%e 10 is a term since the sum of digits in primorial base (A276150) of k from 1 to 10 is 1 + 1 + 2 + 2 + 3 + 1 + 2 + 2 + 3 + 3 = 20, which is divisible by 10.

%t max = 10; bases = Prime@Range[max, 1, -1]; nmax = Times @@ bases - 1; s[n_] := Plus @@ IntegerDigits[n, MixedRadix[bases]]; seq = {}; sum = 0; Do[sum += s[n]; If[Divisible[sum, n], AppendTo[seq, n]], {n, 1, 10^6}]; seq

%Y Cf. A049345, A276150, A095376, A114136, A333702, A333704, A333705.

%K nonn,base

%O 1,2

%A _Amiram Eldar_, Apr 02 2020