A006042 The nim-square of n.
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
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).
Links
- R. J. Mathar, Table of n, a(n) for n = 0..1000
- G. P. Michon, Discussion of Conway's On2 [From _John W. Layman_, Nov 05 2010]
- Index entries for sequences related to Nim-multiplication
- Index entries for sequences that are permutations of the natural numbers
Crossrefs
Programs
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
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)
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
A059970 Nim-factorials: a(1)=1 and, for n>1, a(n)=n*a(n-1), where * denotes Nim multiplication.
1, 2, 1, 4, 2, 11, 1, 8, 5, 9, 2, 4, 9, 4, 1, 16, 8, 140, 5, 82, 9, 145, 2, 44, 6, 108, 9, 154, 13, 209, 1, 32, 20, 132, 10, 243, 172, 123, 4, 139, 68, 62, 11, 222, 182, 92, 2, 16, 36, 224, 5, 242, 91, 24, 11, 105, 178, 56, 5, 241, 92, 205, 1, 64, 39, 20, 23, 161, 225, 53
Offset: 1
Keywords
Comments
Conjectures:
(1) Nim-Factorial(2^n-1)=1 (verified for n=1,2,3,...,16).
(2) Nim-Factorial(2^n+2^(n-1)-1)=2 (verified for n=1,2,3,...,15).
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..8192
- Rémy Sigrist, PARI program for A059970
Programs
-
Maple
A059970 := proc(n) option remember; if n =1 then 1; else A051775(n,procname(n-1)) ; end if; end proc: # R. J. Mathar, Jul 28 2016 based on the program in b051775.txt
-
PARI
\\ See Links section.
Extensions
Corrected by Gerald McGarvey, Nov 12 2005
A059971 n^n using Nim multiplication.
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
Keywords
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..10000
- Rémy Sigrist, PARI program for A059971
- Index entries for sequences related to Nim-multiplication
Programs
-
PARI
See Links section.
Formula
a(n) = A335162(n, n). - Rémy Sigrist, Jun 12 2020
Extensions
a(0) = 1 prepended by Rémy Sigrist, Jun 12 2020
A160679 Square root of n under Nim (or Conway) multiplication.
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
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).
Examples
a(2) = 3 because TIM(3,3) = 2 More generally, a(x)=y because A006042(y)=x.
Links
- Paul Tek, Table of n, a(n) for n = 0..576
- G. P. Michon, Nim-multiplication in Conway's algebraically complete field On2
- Index entries for sequences that are permutations of the natural numbers
- Index entries for sequences related to Nim-multiplication
- Index entries for sequences that are permutations of the natural numbers
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).
A334290 Array read by upward antidiagonals: T(n,k) (n > 0, k > 0) = nim-division of n by k.
1, 2, 3, 3, 1, 2, 4, 2, 3, 15, 5, 12, 1, 5, 12, 6, 15, 8, 10, 4, 9, 7, 13, 10, 1, 8, 14, 11, 8, 14, 11, 14, 13, 7, 13, 10, 9, 4, 9, 4, 1, 15, 6, 15, 6, 10, 7, 12, 11, 9, 6, 7, 5, 11, 8, 11, 5, 14, 2, 5, 1, 12, 3, 13, 12, 7, 12, 6, 15, 13, 6, 8, 10, 9, 14, 4, 9, 5
Offset: 1
Comments
Each row and each column is a permutation of the natural numbers.
Examples
The array begins: n\k| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ---+------------------------------------------------------------ 1| 1 3 2 15 12 9 11 10 6 8 7 5 14 13 4 --> A051917(n) 2| 2 1 3 5 4 14 13 15 11 12 9 10 7 6 8 3| 3 2 1 10 8 7 6 5 13 4 14 15 9 11 12 4| 4 12 8 1 13 15 7 3 14 11 10 2 5 9 6 5| 5 15 10 14 1 6 12 9 8 3 13 7 11 4 2 6| 6 13 11 4 9 1 10 12 5 7 3 8 2 15 14 7| 7 14 9 11 5 8 1 6 3 15 4 13 12 2 10 8| 8 4 12 2 6 5 9 1 7 13 15 3 10 14 11 9| 9 7 14 13 10 12 2 11 1 5 8 6 4 3 15 10| 10 5 15 7 2 11 4 14 12 1 6 9 13 8 3 11| 11 6 13 8 14 2 15 4 10 9 1 12 3 5 7 12| 12 8 4 3 11 10 14 2 9 6 5 1 15 7 13 13| 13 11 6 12 7 3 5 8 15 14 2 4 1 10 9 14| 14 9 7 6 15 4 3 13 2 10 12 11 8 1 5 15| 15 10 5 9 3 13 8 7 4 2 11 14 6 12 1 | | | | | | | | | A004474(n) | | | A004477(n) | | A004480(n) | A006015(n) A004468(n)
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..5050
- Rémy Sigrist, PARI program for A334290
- Index entries for sequences related to Nim-multiplication
Programs
-
PARI
See Links section.
A334291 Array read by upward antidiagonals: T(n,k) (n >= 0, k > 0) = nim-division of n by k.
0, 1, 0, 2, 3, 0, 3, 1, 2, 0, 4, 2, 3, 15, 0, 5, 12, 1, 5, 12, 0, 6, 15, 8, 10, 4, 9, 0, 7, 13, 10, 1, 8, 14, 11, 0, 8, 14, 11, 14, 13, 7, 13, 10, 0, 9, 4, 9, 4, 1, 15, 6, 15, 6, 0, 10, 7, 12, 11, 9, 6, 7, 5, 11, 8, 0, 11, 5, 14, 2, 5, 1, 12, 3, 13, 12, 7
Offset: 0
Comments
This is the array A334290 with a leading row of 0's.
Examples
The array begins: n\k| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ---+------------------------------------------------------------ 0| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1| 1 3 2 15 12 9 11 10 6 8 7 5 14 13 4 --> A051917(n) 2| 2 1 3 5 4 14 13 15 11 12 9 10 7 6 8 3| 3 2 1 10 8 7 6 5 13 4 14 15 9 11 12 4| 4 12 8 1 13 15 7 3 14 11 10 2 5 9 6 5| 5 15 10 14 1 6 12 9 8 3 13 7 11 4 2 6| 6 13 11 4 9 1 10 12 5 7 3 8 2 15 14 7| 7 14 9 11 5 8 1 6 3 15 4 13 12 2 10 8| 8 4 12 2 6 5 9 1 7 13 15 3 10 14 11 9| 9 7 14 13 10 12 2 11 1 5 8 6 4 3 15 10| 10 5 15 7 2 11 4 14 12 1 6 9 13 8 3 11| 11 6 13 8 14 2 15 4 10 9 1 12 3 5 7 12| 12 8 4 3 11 10 14 2 9 6 5 1 15 7 13 13| 13 11 6 12 7 3 5 8 15 14 2 4 1 10 9 14| 14 9 7 6 15 4 3 13 2 10 12 11 8 1 5 15| 15 10 5 9 3 13 8 7 4 2 11 14 6 12 1 | | | | | | | | | A004474(n) | | | A004477(n) | | A004480(n) | A006015(n) A004468(n)
Comments