login
Catalan-Niven numbers: numbers that are divisible by the sum of the digits in their representation in terms of the Catalan numbers (A014418).
8

%I #9 Apr 01 2022 11:38:11

%S 1,2,4,5,6,9,10,12,14,16,18,21,24,28,30,32,33,40,42,44,45,48,55,56,57,

%T 60,65,72,78,80,84,88,95,100,105,112,126,128,130,132,134,135,138,140,

%U 144,145,146,147,152,155,156,168,170,174,180,184,185,195,210,216

%N Catalan-Niven numbers: numbers that are divisible by the sum of the digits in their representation in terms of the Catalan numbers (A014418).

%C Numbers k such that A014420(k) | k.

%C All the Catalan numbers (A000108) are terms.

%C If k is an odd Catalan number (A038003), then k+1 is a term.

%H Amiram Eldar, <a href="/A352508/b352508.txt">Table of n, a(n) for n = 1..10000</a>

%e 4 is a term since its Catalan representation, A014418(4) = 20, has the sum of digits A014420(4) = 2 + 0 = 2 and 4 is divisible by 2.

%e 9 is a term since its Catalan representation, A014418(9) = 120, has the sum of digits A014420(9) = 1 + 2 + 0 = 3 and 9 is divisible by 3.

%t c[n_] := c[n] = CatalanNumber[n]; q[n_] := Module[{s = {}, m = n, i}, While[m > 0, i = 1; While[c[i] <= m, i++]; i--; m -= c[i]; AppendTo[s, i]]; Divisible[n, Plus @@ IntegerDigits[Total[4^(s - 1)], 4]]]; Select[Range[216], q]

%Y Cf. A014418, A014420.

%Y Subsequences: A000108, A038003, A352509, A352510, A352511.

%Y Similar sequences: A005349, A049445, A064150, A064438, A064481, A118363, A328208, A328212, A331085, A333426, A342726, A334308, A331728, A342426, A344341, A351714, A351719, A352089, A352107, A352320, A352342.

%K nonn,base

%O 1,2

%A _Amiram Eldar_, Mar 19 2022