This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A273180 #24 May 22 2016 07:16:39 %S A273180 1,2,6,19,38,102,307,614,1638,4915,9830,26214,78643,157286,419430, %T A273180 1258291,2516582,6710886,20132659,40265318,107374182,322122547, %U A273180 644245094,1717986918,5153960755,10307921510,27487790694,82463372083,164926744166,439804651110 %N A273180 Numbers n such that ror(n) + rol(n) is a power of 2, where ror(n)=A038572(n) is n rotated one binary place to the right, rol(n)=A006257(n) is n rotated one binary place to the left. %H A273180 Colin Barker, <a href="/A273180/b273180.txt">Table of n, a(n) for n = 1..1000</a> %H A273180 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,17,0,0,-16). %F A273180 From _Colin Barker_, May 19 2016: (Start) %F A273180 a(n) = 17*a(n-3) - 16*a(n-6) for n>6. %F A273180 G.f.: x*(1+2*x+6*x^2+2*x^3+4*x^4) / ((1-x)*(1+x+x^2)*(1-16*x^3)). %F A273180 (End) %t A273180 Select[Range[10^6], IntegerQ@ Log2[FromDigits[RotateRight@ #, 2] + FromDigits[RotateLeft@ #, 2]] &@ IntegerDigits[#, 2] &] (* or *) %t A273180 Rest@ CoefficientList[Series[x (1 + 2 x + 6 x^2 + 2 x^3 + 4 x^4)/((1 - x) (1 + x + x^2) (1 - 16 x^3)), {x, 0, 30}], x] (* _Michael De Vlieger_, May 19 2016 *) %o A273180 (C) %o A273180 #include <stdio.h> %o A273180 int main(int argc, char** argv) %o A273180 { %o A273180 unsigned long long x, n, BL=0; %o A273180 for (n=1; n>0; ++n) { %o A273180 if ((n & (n-1))==0) ++BL; %o A273180 x = (n>>1) + ((n&1) << (BL-1)); // A038572(n) %o A273180 x+= (n*2) - (1ull<<BL) + 1; // A006257(n) for n>0 %o A273180 if ((x & (x-1))==0) printf("%lld, ", n); %o A273180 } %o A273180 } %o A273180 (PARI) Vec(x*(1+2*x+6*x^2+2*x^3+4*x^4)/((1-x)*(1+x+x^2)*(1-16*x^3)) + O(x^50)) \\ _Colin Barker_, May 19 2016 %Y A273180 Cf. A006257, A038572, A088161, A088163, A112627, A273105, A273106. %K A273180 nonn,base,easy %O A273180 1,2 %A A273180 _Alex Ratushnyak_, May 17 2016