A359507 a(n) is the least integer k such that there exists a strictly increasing integer sequence n = b_1 < b_2 < ... < b_t = n + k with the property that b_1 XOR b_2 XOR ... XOR b_t = 0.
0, 2, 3, 3, 3, 5, 3, 5, 3, 5, 3, 9, 3, 5, 3, 9, 3, 5, 3, 9, 3, 5, 3, 17, 3, 5, 3, 9, 3, 5, 3, 17, 3, 5, 3, 9, 3, 5, 3, 17, 3, 5, 3, 9, 3, 5, 3, 33, 3, 5, 3, 9, 3, 5, 3, 17, 3, 5, 3, 9, 3, 5, 3, 33, 3, 5, 3, 9, 3, 5, 3, 17, 3, 5, 3, 9, 3, 5, 3, 33, 3, 5, 3, 9, 3, 5, 3, 17, 3, 5, 3, 9, 3, 5, 3, 65, 3, 5, 3, 9, 3, 5
Offset: 0
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 0..65537
Programs
-
PARI
A359506(n) = if(n==0, return (0), my (x=[n], y); for (m=n+1, oo, if (vecmin(y=[bitxor(v, m) | v<-x])==0, return (m), x=setunion(x, Set(y))))); \\ From A359506. A359507(n) = (A359506(n)-n); \\ Antti Karttunen, Nov 22 2024
Formula
a(n) = A359506(n) - n.
Extensions
More terms from Antti Karttunen, Nov 22 2024
Comments