# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a227408 Showing 1-1 of 1 %I A227408 #20 Jan 17 2018 17:19:17 %S A227408 0,22,25,38,41,70,73,134,137,237,243,262,265,365,371,429,435,461,467, %T A227408 492,494,498,501,518,521,621,627,685,691,717,723,748,750,754,757,813, %U A227408 819,845,851,876,878,882,885,909,915,940,942,946,949,972,974,978,981,988,995,1002,1009,1030,1033,1133,1139,1197,1203,1229 %N A227408 Set of all n, where n = r(s(n)) = s(r(n)), given that r(n) = n+bitcount(n), s(n) = n-bitcount(n), and bitcount(n) is the count of binary 1's in n. %C A227408 This is a simple sequence where the nesting of functions r(n), and s(n), are grouped in a special way: n = r(s(n)) = s(r(n)), and those three values must be equal. %H A227408 Andres M. Torres, Table of n, a(n) for n = 1..10000 %F A227408 Find all n, such that: n = r(s(n)) = s(r(n)), where r(n) = n+bitcount(n) and s(n) = n-bitcount(n) %e A227408 0 = r(s(0)) = s(r(0)) = r(0) = s(0) = 0. %e A227408 22 = r(s(22))= s(r(22)) = r(19) = s(25) = 22. %e A227408 25 = r(s(25))= s(r(25)) = r(22) = s(28) = 25. %e A227408 38 = r(s(38))= s(r(38)) = r(35) = s(41) = 38. %o A227408 (PARI) npbc(n) = n + hammingweight(n) %o A227408 nmbc(n) = n - hammingweight(n) %o A227408 isok(n) = (n == npbc(nmbc(n))) && (n == nmbc(npbc(n))) \\ _Michel Marcus_, Aug 08 2013 %Y A227408 Cf. A055938, A010061, A010062, A227359, A227361. %K A227408 nonn,base %O A227408 1,2 %A A227408 _Andres M. Torres_, Jul 10 2013 %E A227408 Offset changed from 0 to 1 by _Michel Marcus_, Aug 08 2013 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE