A377477 Consider the nonadjacent form for n, then reverse the digits, leaving any trailing zeros alone, and take the absolute value.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 19, 12, 13, 14, 15, 16, 17, 18, 11, 20, 21, 38, 35, 24, 29, 26, 39, 28, 25, 30, 31, 32, 33, 34, 23, 36, 41, 22, 27, 40, 37, 42, 83, 76, 45, 70, 67, 48, 61, 58, 51, 52, 77, 78, 71, 56, 57, 50, 79, 60, 49, 62, 63, 64, 65, 66, 47
Offset: 0
Examples
For n = 22: the nonadjacent form for 22 is "10T0T0" (where T denotes -1), reversing the digits and leaving any trailing zeros alone yields "T0T010", so a(22) = |- 2^5 - 2^3 + 2^1| = 38.
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..10921
- Joerg Arndt, Matters Computational (The Fxtbook), pages 61-62.
- Rémy Sigrist, PARI program
- Wikipedia, Non-adjacent form
- Index entries for sequences that are permutations of the natural numbers
Programs
-
PARI
\\ See Links section.
Comments