OFFSET
1,2
COMMENTS
This sequence is a permutation of the natural numbers with inverse A319499.
We can build a variant of this sequence for any base b > 1.
We can build a variant of this sequence for any strictly increasing sequence of nonnegative integers.
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)))
EXAMPLE
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
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 *)
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Sep 16 2018
STATUS
approved