A368417 Binary numbers B whose binary expansion can be split into parts s and t where B = s^2 + t^2.
101, 10100, 110100, 110010000, 1010010000, 1110001000000, 10010001000000, 11110000100000000, 100010000100000000, 111110000010000000000, 1000010000010000000000, 1111110000001000000000000, 10000010000001000000000000, 11111110000000100000000000000
Offset: 1
Examples
a(1) = 101 is B=5 which splits as bits s = 10_2 and t = 1_2 with s^2 + t^2 = 5. (This holds in any base.) a(3) = 110100 is B=52 which splits as bits s = 110_2 = 6 and t = 100_2 = 4 with 6^2 + 4^2 = 52.
Crossrefs
Cf. A368416 (decimal splits).
Programs
-
Mathematica
zero[n_]:=0; one[n_]:=1; a[n_]:=If[EvenQ[n], FromDigits[Join[Array[one,n/2], Array[zero,n/2], {1}, Array[zero,n]]], FromDigits[Join[{1}, Array[zero,(n-3)/2], {1}, Array[zero,(n-3)/2], {0}, {1}, Array[zero,n-1]]]]; Join[{101}, Array[a,13,2]] (* Stefano Spezia, Dec 25 2023 *)
Formula
a(2*n) = decimal digits 1^n 0^n 1 0^(2*n), where ^ denotes repetition, for n > 0;
a(2*n+1) = decimal digits (1 0^(n-1))^2 0 1 0^(2*n), similarly, for n > 0.
Comments