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).
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, 22, 49, 26, 28, 30, 64, 17, 144, 38, 40, 42, 45, 23, 50, 52, 27, 57, 60, 31, 66, 34, 288, 37, 39, 81, 84, 43, 91, 47, 98, 101, 105, 54, 56, 29, 120, 62, 128, 132, 68
Offset: 1
Examples
The first terms, alongside the binary representation of n^2 with a(n) in parentheses, are: n a(n) bin(n^2) -- ---- -------- 1 1 (1) 2 2 (10)0 3 4 (100)1 4 8 (1000)0 5 3 (11)001 6 9 (1001)00 7 6 (110)001 8 16 (10000)00 9 5 (101)0001 10 12 (1100)100 11 7 (111)1001 12 18 (10010)000 13 10 (1010)1001 14 24 (11000)100 15 14 (1110)0001 16 32 (100000)000 17 36 (100100)001 18 20 (10100)0100 19 11 (1011)01001 20 25 (11001)0000
Links
- Ivan Neretin, Table of n, a(n) for n = 1..10000
- Rémy Sigrist, PARI program for A319268
- Rémy Sigrist, Colored logarithmic scatterplot of the first 10000 terms (where the color is function of A070939(n^2) - A070939(a(n)))
- Index entries for sequences that are permutations of the natural numbers
Programs
-
Mathematica
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 *)
-
PARI
See Links section.
Comments