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 A067895 #14 Dec 10 2024 05:24:19 %S A067895 1,21,422,8444,168888,3377776,67555552,1351111104,27022222208, %T A067895 540444444416,10808888888832,216177777777664,4323555555555328, %U A067895 86471111111110656,1729422222222221312,34588444444444442624,691768888888888885248,13835377777777777770496,276707555555555555540992 %N A067895 Write 2^n, 2^n+1, 2^n+2, ..., 2^(n+1)-1 in binary and add as if they were decimal numbers. %H A067895 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (22,-40). %F A067895 G.f.: (1 - x)/(1 - 22x + 40*x^2). %F A067895 a(n) = 2^(n-1)*(19*10^n - 1)/9. %F A067895 a(n) = 22*a(n-1) - 40*a(n-2). %F A067895 E.g.f.: exp(2*x)*(19*exp(18*x) - 1)/18. - _Stefano Spezia_, Apr 03 2023 %e A067895 2^2 to 2^3-1 = 4 through 7 = 100, 101, 110 and 111 in binary and when summed = 422. %t A067895 Table[Total[FromDigits[IntegerDigits[#,2]]&/@(Range[2^n,2^(n+1)-1])],{n,0,20}] (* _Harvey P. Dale_, May 20 2012 *) %o A067895 (PARI) a(n)=if(n<0,0,2^(n-1)*(19*10^n-1)/9) %Y A067895 Cf. A067894. %K A067895 nonn,base,easy %O A067895 0,2 %A A067895 _N. J. A. Sloane_, May 15 2003