login
Negabinary-Niven numbers: numbers divisible by the sum of digits in their negabinary representation (A027615).
24

%I #15 Jan 28 2020 03:57:16

%S 1,2,3,4,6,8,9,12,14,15,16,18,20,21,24,28,30,32,33,35,36,40,42,48,50,

%T 52,54,56,57,60,62,63,64,66,68,69,72,76,78,80,81,84,88,90,91,95,96,

%U 100,102,108,110,112,114,120,124,125,126,128,129,132,136,138,140

%N Negabinary-Niven numbers: numbers divisible by the sum of digits in their negabinary representation (A027615).

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

%e 6 is a term since A039724(6) = 11010 and 1 + 1 + 0 + 1 + 0 = 3 is a divisor of 6.

%t negaBinWt[n_] := negaBinWt[n] = If[n==0, 0, negaBinWt[Quotient[n-1, -2]] + Mod[n, 2]]; negaBinNivenQ[n_] := Divisible[n, negaBinWt[n]]; Select[Range[100], negaBinNivenQ]

%Y Cf. A027615, A039724, A005349, A049445, A328208, A328212, A331085, A331088.

%K nonn,base

%O 1,2

%A _Amiram Eldar_, Jan 27 2020