A145818 Odd positive integers a(n) such that for every integer m == 3 (mod 4) there exists a unique representation of the form m = a(l) + 2*a(s), but there are no such representations for m == 1 (mod 4).
1, 5, 17, 21, 65, 69, 81, 85, 257, 261, 273, 277, 321, 325, 337, 341, 1025, 1029, 1041, 1045, 1089, 1093, 1105, 1109, 1281, 1285, 1297, 1301, 1345, 1349, 1361, 1365, 4097, 4101, 4113, 4117, 4161, 4165, 4177, 4181, 4353, 4357, 4369, 4373, 4417, 4421, 4433
Offset: 1
Keywords
Links
- Klaus Brockhaus, Table of n, a(n) for n = 1..8192
Programs
-
Mathematica
aQ[n_] := OddQ[n] && Module[{d = Reverse[IntegerDigits[n, 2]]}, Length[d] < 2 || Max[d[[2;; -1;; 2]]] == 0]; Select[Range[4500], aQ] (* Amiram Eldar, Dec 15 2018 *)
-
PARI
isok(n) = {if (n % 2, my(rb = Vecrev(binary(n)), brb = vector(#rb\2, k, rb[2*k])); (#brb == 0) || vecmax(brb) == 0, 0);} \\ Michel Marcus, Dec 15 2018
Extensions
Extended beyond a(16) by Klaus Brockhaus, Oct 22 2008
Comments