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!)
A319268 Lexicographically earliest sequence of distinct positive terms such that for any n > 0, the binary representation of n^2 starts with the binary representation of a(n). 2

%I #15 Nov 09 2018 07:33:45

%S 1,2,4,8,3,9,6,16,5,12,7,18,10,24,14,32,36,20,11,25,13,15,33,72,19,21,

%T 22,49,26,28,30,64,17,144,38,40,42,45,23,50,52,27,57,60,31,66,34,288,

%U 37,39,81,84,43,91,47,98,101,105,54,56,29,120,62,128,132,68

%N Lexicographically earliest sequence of distinct positive terms such that for any n > 0, the binary representation of n^2 starts with the binary representation of a(n).

%C This sequence is a permutation of the natural numbers with inverse A319499.

%C We can build a variant of this sequence for any base b > 1.

%C We can build a variant of this sequence for any strictly increasing sequence of nonnegative integers.

%H Ivan Neretin, <a href="/A319268/b319268.txt">Table of n, a(n) for n = 1..10000</a>

%H Rémy Sigrist, <a href="/A319268/a319268.gp.txt">PARI program for A319268</a>

%H Rémy Sigrist, <a href="/A319268/a319268.png">Colored logarithmic scatterplot of the first 10000 terms</a> (where the color is function of A070939(n^2) - A070939(a(n)))

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%e The first terms, alongside the binary representation of n^2 with a(n) in parentheses, are:

%e n a(n) bin(n^2)

%e -- ---- --------

%e 1 1 (1)

%e 2 2 (10)0

%e 3 4 (100)1

%e 4 8 (1000)0

%e 5 3 (11)001

%e 6 9 (1001)00

%e 7 6 (110)001

%e 8 16 (10000)00

%e 9 5 (101)0001

%e 10 12 (1100)100

%e 11 7 (111)1001

%e 12 18 (10010)000

%e 13 10 (1010)1001

%e 14 24 (11000)100

%e 15 14 (1110)0001

%e 16 32 (100000)000

%e 17 36 (100100)001

%e 18 20 (10100)0100

%e 19 11 (1011)01001

%e 20 25 (11001)0000

%t a = {1}; Do[r = IntegerDigits[n^2, 2]; AppendTo[a, Min@Complement[Table[FromDigits[Take[r, k], 2], {k, Length@r}],a]], {n, 2, 66}]; a (* _Ivan Neretin_, Oct 24 2018 *)

%o (PARI) See Links section.

%Y Cf. A000290, A070939, A272679, A319499.

%K nonn,base

%O 1,2

%A _Rémy Sigrist_, Sep 16 2018

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 May 8 23:08 EDT 2024. Contains 372341 sequences. (Running on oeis4.)