A360388 Positive integers with binary expansion (b(1), ..., b(m)) such that Sum_{i = 1..m-k} b(i)*b(i+k) is odd for all k = 0..m-1.
1, 11, 13, 2787, 3189, 36783, 37063, 43331, 47803, 49813, 56669, 58121, 62961, 9205487, 16215601, 23070091, 23248907, 27264653, 27475981, 43469906355, 55167946629, 75985591407, 80056245671, 81489328999, 83389490039, 87235136243, 88437433811, 90400346819
Offset: 1
Examples
For n = 11: - the binary expansion of 11 is b = (1,1,0,1), - b(1)*b(1) + b(2)*b(2) + b(3)*b(3) + b(4)*b(4) = 1 + 1 + 0 + 1 = 3 is odd, - b(1)*b(2) + b(2)*b(3) + b(3)*b(4) = 1 + 0 + 0 = 1 is odd, - b(1)*b(3) + b(2)*b(4) = 0 + 1 = 1 is odd, - b(1)*b(4) = 1 is odd, - so 11 belongs to the sequence.
References
- R. K. Guy, Unsolved Problems in Number Theory, E38.
Links
Programs
-
PARI
See Links section.
-
Python
from itertools import count, islice from functools import reduce from operator import ixor def A360388_gen(startvalue=1): # generator of terms >= startvalue for n in count(max(startvalue,1)): b = tuple(int(d) for d in bin(n)[2:]) m = len(b) if all(reduce(ixor, (b[i]&b[i+k] for i in range(m-k))) for k in range(m)): yield n A360388_list = list(islice(A360388_gen(),10)) # Chai Wah Wu, Feb 07 2023
Comments