cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A097262 Numbers whose set of base 16 digits is {0,F}, where F base 16 = 15 base 10.

Original entry on oeis.org

0, 15, 240, 255, 3840, 3855, 4080, 4095, 61440, 61455, 61680, 61695, 65280, 65295, 65520, 65535, 983040, 983055, 983280, 983295, 986880, 986895, 987120, 987135, 1044480, 1044495, 1044720, 1044735, 1048320, 1048335, 1048560, 1048575
Offset: 0

Views

Author

Ray Chandler, Aug 03 2004

Keywords

Comments

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.

Crossrefs

Programs

  • Magma
    [n: n in [0..1110000] | Set(IntegerToSequence(n, 16)) subset {0, 15}]; // Vincenzo Librandi, Jun 05 2012
  • Mathematica
    f[n_] := FromDigits[ IntegerDigits[n, 2] /. {1 -> 15}, 16]; Array[f, 32, 0] (* or *)
    FromDigits[#, 16] & /@ Tuples[{0, 15}, 6] (* Harvey P. Dale, Sep 22 2011 *) (* or much slower *)
    fQ[n_] := Union@ Join[{0, 15}, IntegerDigits[n, 16]] == {0, 15}; Select[ Range[0, 11000000 ], fQ] (* Robert G. Wilson v, May 12 2012 *)

Formula

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