login
Numbers whose set of base 12 digits is {0,B}, where B base 12 = 11 base 10.
2

%I #15 Sep 08 2022 08:45:14

%S 0,11,132,143,1584,1595,1716,1727,19008,19019,19140,19151,20592,20603,

%T 20724,20735,228096,228107,228228,228239,229680,229691,229812,229823,

%U 247104,247115,247236,247247,248688,248699,248820,248831,2737152

%N Numbers whose set of base 12 digits is {0,B}, where B base 12 = 11 base 10.

%C n such that there exists a permutation p_1, ..., p_n of 1, ..., n such that i + p_i is a power of 12 for every i.

%H Vincenzo Librandi, <a href="/A097258/b097258.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) = 11*A033048(n).

%F a(2n) = 12*a(n), a(2n+1) = a(2n)+11.

%t f[n_] := FromDigits[ IntegerDigits[n, 2] /. {1 -> 11}, 12]; Array[f, 33, 0] (* or much slower *)

%t fQ[n_] := Union@ Join[{0, 11}, IntegerDigits[n, 12]] == {0, 11}; Select[ Range[0, 27370162], fQ] (* _Robert G. Wilson v_, May 12 2012 *)

%t FromDigits[#,12]&/@Tuples[{0,11},6] (* _Vincenzo Librandi_, May 26 2012 *)

%o (Magma) [n: n in [0..2800000] | Set(IntegerToSequence(n, 12)) subset {0, 11}]; // _Vincenzo Librandi_, May 26 2012

%Y Cf. A001196, A005823, A097251-A097262.

%K nonn,base

%O 0,2

%A _Ray Chandler_, Aug 03 2004