The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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. 3
 0, 22, 25, 38, 41, 70, 73, 134, 137, 237, 243, 262, 265, 365, 371, 429, 435, 461, 467, 492, 494, 498, 501, 518, 521, 621, 627, 685, 691, 717, 723, 748, 750, 754, 757, 813, 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 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS 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. LINKS Andres M. Torres, Table of n, a(n) for n = 1..10000 FORMULA Find all n, such that: n = r(s(n)) = s(r(n)), where r(n) = n+bitcount(n) and s(n) = n-bitcount(n) EXAMPLE 0  = r(s(0)) = s(r(0))  = r(0)  = s(0)  = 0. 22 = r(s(22))= s(r(22)) = r(19) = s(25) = 22. 25 = r(s(25))= s(r(25)) = r(22) = s(28) = 25. 38 = r(s(38))= s(r(38)) = r(35) = s(41) = 38. PROG (PARI) npbc(n) = n + hammingweight(n) nmbc(n) = n - hammingweight(n) isok(n) = (n == npbc(nmbc(n))) && (n == nmbc(npbc(n))) \\ Michel Marcus, Aug 08 2013 CROSSREFS Cf. A055938, A010061, A010062, A227359, A227361. Sequence in context: A178423 A108632 A045096 * A303304 A234540 A124177 Adjacent sequences:  A227405 A227406 A227407 * A227409 A227410 A227411 KEYWORD nonn,base AUTHOR Andres M. Torres, Jul 10 2013 EXTENSIONS Offset changed from 0 to 1 by Michel Marcus, Aug 08 2013 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 3 11:57 EDT 2020. Contains 336198 sequences. (Running on oeis4.)