login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A097262 Numbers whose set of base 16 digits is {0,F}, where F base 16 = 15 base 10. 17

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

%S 0,15,240,255,3840,3855,4080,4095,61440,61455,61680,61695,65280,65295,

%T 65520,65535,983040,983055,983280,983295,986880,986895,987120,987135,

%U 1044480,1044495,1044720,1044735,1048320,1048335,1048560,1048575

%N Numbers whose set of base 16 digits is {0,F}, where F base 16 = 15 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 16 for every i.

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

%F a(n) = 15*A033052(n).

%F a(2n) = 16*a(n), a(2n+1) = a(2n)+15.

%t f[n_] := FromDigits[ IntegerDigits[n, 2] /. {1 -> 15}, 16]; Array[f, 32, 0] (* or *)

%t FromDigits[#, 16] & /@ Tuples[{0, 15}, 6] (* _Harvey P. Dale_, Sep 22 2011 *) (* or much slower *)

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

%o (Magma) [n: n in [0..1110000] | Set(IntegerToSequence(n, 16)) subset {0, 15}]; // _Vincenzo Librandi_, Jun 05 2012

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

%K nonn,base

%O 0,2

%A _Ray Chandler_, Aug 03 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 06:04 EDT 2024. Contains 371906 sequences. (Running on oeis4.)