login
Search: a335162 -id:a335162
     Sort: relevance | references | number | modified | created      Format: long | short | data
The nim-square of n.
(Formerly M2251)
+10
6
0, 1, 3, 2, 6, 7, 5, 4, 13, 12, 14, 15, 11, 10, 8, 9, 24, 25, 27, 26, 30, 31, 29, 28, 21, 20, 22, 23, 19, 18, 16, 17, 52, 53, 55, 54, 50, 51, 49, 48, 57, 56, 58, 59, 63, 62, 60, 61, 44, 45, 47, 46, 42, 43, 41, 40, 33, 32, 34, 35, 39, 38, 36, 37, 103, 102, 100, 101, 97, 96, 98, 99
OFFSET
0,3
COMMENTS
This is a permutation of the natural numbers; A160679 is the inverse permutation. - Jianing Song, Aug 10 2022
REFERENCES
J. H. Conway, On Numbers and Games. Academic Press, NY, 1976, pp. 51-53.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
FORMULA
a(n) = A051775(n,n).
From Jianing Song, Aug 10 2022: (Start)
If n = Sum_j 2^e(j), then a(n) is the XOR of A006017(e(j))'s. Proof: let N+ = XOR and N* denote the nim addition and the nim multiplication, then n N* n = (Sum_j 2^e(j)) N* (Sum_j 2^e(j)) = (Nim-sum_j 2^e(j)) N* (Nim-sum_j 2^e(j)) = (Nim-sum_j (2^e(j) N* 2^e(j))) N+ (Nim-sum_{i<j} ((2^e(i) N* 2^e(j)) N+ (2^e(j) N* 2^e(i)))) = (Nim-sum_j (2^e(j) N* 2^e(j))) N+ (Nim-sum_{i<j} 0) = Nim-sum_j (2^e(j) N* 2^e(j)).
For example, for n = 11 = 2^0 + 2^1 + 2^3, a(11) = A006017(0) XOR A006017(1) XOR A006017(3) = 1 XOR 3 XOR 13 = 15.
More generally, if n = Sum_j 2^e(j), k is a power of 2, then the nim k-th power of n is the XOR of (nim k-th power of 2^e(j))'s. (End)
MAPLE
read("transforms") ;
# insert source of nimprodP2() and A051775() from the b-file at A051776 here...
A006042 := proc(n)
A051775(n, n) ;
end proc:
L := [seq( A006042(n), n=1..1000) ]; # R. J. Mathar, May 28 2011
CROSSREFS
Diagonal of A051775. Without 0, diagonal of A051776.
Column 2 of array in A335162.
Other nim k-th powers: A051917 (k=-1), A160679 (k=1/2), A335170 (k=3), A335535 (k=4), A335171 (k=5), A335172 (k=6), A335173 (k=7), A335536 (k=8).
KEYWORD
nonn,nice,easy,look
EXTENSIONS
a(1)-a(49) confirmed, a(50)-a(71) added by John W. Layman, Nov 05 2010
a(0) prepended by Jianing Song, Aug 10 2022
STATUS
approved
Nim-cube of n.
+10
4
0, 1, 1, 1, 14, 13, 8, 10, 14, 10, 13, 8, 14, 8, 10, 13, 152, 145, 133, 141, 189, 182, 167, 173, 203, 199, 212, 217, 224, 238, 248, 247, 152, 141, 145, 133, 224, 247, 238, 248, 189, 173, 182, 167, 203, 217, 199, 212, 152, 133, 141, 145, 203, 212, 217, 199, 224
OFFSET
0,5
LINKS
J. H. Conway, Integral lexicographic codes, Discrete Mathematics 83.2-3 (1990): 219-235. See Table 3.
PROG
(PARI) See Links section.
CROSSREFS
A column of the array in A335162.
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 12 2020
EXTENSIONS
More terms from Rémy Sigrist, Jun 12 2020
STATUS
approved
Nim sixth-power of n.
+10
4
0, 1, 1, 1, 8, 10, 13, 14, 8, 14, 10, 13, 8, 13, 14, 10, 203, 199, 217, 212, 248, 247, 238, 224, 182, 189, 167, 173, 141, 133, 152, 145, 203, 212, 199, 217, 141, 145, 133, 152, 248, 224, 247, 238, 182, 173, 189, 167, 203, 217, 212, 199, 182, 167, 173, 189, 141
OFFSET
0,5
LINKS
J. H. Conway, Integral lexicographic codes, Discrete Mathematics 83.2-3 (1990): 219-235. See Table 3.
CROSSREFS
A column of the array in A335162.
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 12 2020
EXTENSIONS
More terms from Rémy Sigrist, Jun 12 2020
STATUS
approved
Nim fifth-power of n.
+10
3
0, 1, 3, 2, 2, 2, 3, 3, 1, 2, 1, 2, 3, 1, 1, 3, 72, 76, 65, 69, 88, 93, 83, 86, 106, 108, 96, 102, 122, 125, 114, 117, 196, 207, 200, 195, 229, 239, 235, 225, 244, 253, 251, 242, 213, 221, 216, 208, 140, 130, 138, 132, 191, 176, 187, 180, 159, 147, 154, 150
OFFSET
0,3
LINKS
J. H. Conway, Integral lexicographic codes, Discrete Mathematics 83.2-3 (1990): 219-235. See Table 3.
CROSSREFS
A column of the array in A335162.
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 12 2020
EXTENSIONS
More terms from Rémy Sigrist, Jun 12 2020
STATUS
approved
Nim seventh-power of n.
+10
3
0, 1, 2, 3, 11, 9, 15, 12, 13, 4, 14, 5, 6, 10, 8, 7, 118, 113, 32, 34, 105, 111, 40, 42, 78, 74, 55, 52, 58, 57, 95, 90, 155, 51, 146, 48, 31, 175, 30, 165, 190, 63, 181, 60, 135, 24, 143, 25, 237, 16, 17, 227, 201, 46, 44, 197, 37, 250, 245, 39, 215, 20, 21
OFFSET
0,3
LINKS
J. H. Conway, Integral lexicographic codes, Discrete Mathematics 83.2-3 (1990): 219-235. See Table 3.
CROSSREFS
A column of the array in A335162.
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 12 2020
EXTENSIONS
More terms from Rémy Sigrist, Jun 12 2020
STATUS
approved
Nim fourth-power of n.
+10
3
0, 1, 2, 3, 5, 4, 7, 6, 10, 11, 8, 9, 15, 14, 13, 12, 21, 20, 23, 22, 16, 17, 18, 19, 31, 30, 29, 28, 26, 27, 24, 25, 42, 43, 40, 41, 47, 46, 45, 44, 32, 33, 34, 35, 37, 36, 39, 38, 63, 62, 61, 60, 58, 59, 56, 57, 53, 52, 55, 54, 48, 49, 50, 51, 87, 86, 85, 84
OFFSET
0,3
LINKS
J. H. Conway, Integral lexicographic codes, Discrete Mathematics 83.2-3 (1990): 219-235. See Table 3.
CROSSREFS
A column of the array in A335162.
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jun 13 2020
STATUS
approved
Nim eighth-power of n.
+10
3
0, 1, 3, 2, 7, 6, 4, 5, 14, 15, 13, 12, 9, 8, 10, 11, 31, 30, 28, 29, 24, 25, 27, 26, 17, 16, 18, 19, 22, 23, 21, 20, 58, 59, 57, 56, 61, 60, 62, 63, 52, 53, 55, 54, 51, 50, 48, 49, 37, 36, 38, 39, 34, 35, 33, 32, 43, 42, 40, 41, 44, 45, 47, 46, 123, 122, 120
OFFSET
0,3
LINKS
J. H. Conway, Integral lexicographic codes, Discrete Mathematics 83.2-3 (1990): 219-235. See Table 3.
CROSSREFS
A column of the array in A335162.
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jun 13 2020
STATUS
approved
n^n using Nim multiplication.
+10
2
1, 1, 3, 1, 5, 2, 13, 12, 14, 13, 1, 6, 13, 8, 13, 1, 17, 8, 158, 155, 72, 170, 198, 48, 145, 208, 165, 25, 55, 205, 171, 206, 55, 158, 6, 140, 151, 53, 113, 252, 191, 254, 228, 26, 116, 130, 146, 243, 145, 118, 72, 14, 75, 115, 20, 69, 60, 177, 121, 99, 171, 169, 170
OFFSET
0,3
FORMULA
a(n) = A335162(n, n). - Rémy Sigrist, Jun 12 2020
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
John W. Layman, Mar 05 2001
EXTENSIONS
a(0) = 1 prepended by Rémy Sigrist, Jun 12 2020
STATUS
approved
Square root of n under Nim (or Conway) multiplication.
+10
2
0, 1, 3, 2, 7, 6, 4, 5, 14, 15, 13, 12, 9, 8, 10, 11, 30, 31, 29, 28, 25, 24, 26, 27, 16, 17, 19, 18, 23, 22, 20, 21, 57, 56, 58, 59, 62, 63, 61, 60, 55, 54, 52, 53, 48, 49, 51, 50, 39, 38, 36, 37, 32, 33, 35, 34, 41, 40, 42, 43, 46, 47, 45, 44, 124, 125, 127, 126, 123, 122, 120
OFFSET
0,3
COMMENTS
Because Conway's field On2 (endowed with Nim-multiplication and [bitwise] Nim-addition) has characteristic 2, the Nim-square function (A006042) is an injective field homomorphism (i.e., the square of a sum is the sum of the squares). Thus the square function is a bijection within any finite additive subgroup of On2 (which is a fancy way to say that an integer and its Nim-square have the same bit length). Therefore the Nim square-root function is also a field homomorphism (the square-root of a Nim-sum is the Nim-sum of the square roots) which can be defined as the inverse permutation of A006042 (as such, it preserves bit-length too).
FORMULA
Letting NIM (= XOR) TIM and RIM denote respectively the sum, product and square root in Conway's Nim-field On2, we see that the bit-length of NIM(x,TIM(x,x)) is less than that of the positive integer x. This remark turns the following relations into an effective recursive definition of a(n) = RIM(n) which uses the fact that RIM is a field homomorphism in On2:
a(0) = 0
a(n) = NIM(n, a(NIM(n, a(n, TIM(n,n)) )
Note: TIM(n,n) = A006042(n)
From Jianing Song, Aug 10 2022: (Start)
For 0 <= n <= 2^2^k-1, a(n) = A335162(n, 2^(2^k-1)). This is because {0,1,...,2^2^k-1} together with the nim operations makes a field isomorphic to GF(2^2^k).
Also for n > 0, a(n) = A335162(n, (A212200(n)+1)/2). (End)
EXAMPLE
a(2) = 3 because TIM(3,3) = 2
More generally, a(x)=y because A006042(y)=x.
CROSSREFS
Cf. A006042 (Nim-squares). A051917 (Nim-reciprocals), A335162, A212200.
KEYWORD
easy,nonn
AUTHOR
Gerard P. Michon, Jun 25 2009
STATUS
approved
a(n) is the greatest nim-power of n.
+10
1
1, 1, 3, 3, 15, 15, 15, 15, 14, 15, 14, 15, 15, 14, 14, 15, 252, 252, 255, 255, 252, 252, 255, 255, 252, 252, 255, 255, 255, 255, 252, 252, 255, 255, 255, 255, 252, 255, 252, 255, 255, 255, 255, 255, 255, 252, 255, 252, 255, 252, 252, 255, 255, 255, 255, 255
OFFSET
0,3
COMMENTS
For any n >= 0, a(n) is the greatest term in n-th row of A335162.
EXAMPLE
For n = 10:
- the first nim-powers of 10 are: 1, 10, 14, 13, 8, 1, ...
- so a(10) = 14.
PROG
(C) See Links section.
CROSSREFS
Cf. A335162.
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jun 13 2020
STATUS
approved

Search completed in 0.015 seconds