OFFSET
0,2
COMMENTS
n such that there exists a permutation p_1, ..., p_n of 1, ..., n such that i + p_i is a power of 11 for every i.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = 10*A033047(n).
a(2n) = 11*a(n), a(2n+1) = a(2n)+10.
MATHEMATICA
f[n_] := FromDigits[ IntegerDigits[n, 2] /. {1 -> 10}, 11]; Array[f, 33, 0] (* or much slower *)
fQ[n_] := Union@ Join[{0, 10}, IntegerDigits[n, 11]] == {0, 10}; Select[ Range[0, 1610519], fQ] (* Robert G. Wilson v, May 12 2012 *)
Join[{0}, Union[Flatten[Table[FromDigits[#, 11]&/@(Join[{10}, #]&/@ Tuples[ {10, 0}, n]), {n, 0, 5}]]]] (* Harvey P. Dale, Sep 23 2013 *)
PROG
(PARI) {for(vv=0, 32,
bvv=binary(vv);
texp=0; btb=0;
forstep(i=length(bvv), 1, -1, btb=btb+10*bvv[i]*11^texp; texp++);
print1(btb, ", ") )} \\ Douglas Latimer, May 12 2012
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ray Chandler, Aug 03 2004
STATUS
approved