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 A178748 #14 Aug 27 2021 11:31:21 %S A178748 1,2,7,14,37,80,187,410,913,1988,4327,9326,20029,42776,91027,192962, %T A178748 407785,859244,1805887,3786518,7922581,16544192,34486507,71769194, %U A178748 149130817,309446420,641262487,1327264190,2744006893,5666970728,11691855427,24099538706,49630733209 %N A178748 Total number of '1' bits in the terms of 'rows' of A178746. %C A178748 Sum of adjacent terms equals the difference of adjacent terms in A127981. - _David Scambler_, Jun 10 2010 %H A178748 Andrew Howroyd, <a href="/A178748/b178748.txt">Table of n, a(n) for n = 0..1000</a> %H A178748 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,3,-4,-4). %F A178748 G.f: (1/2)*x^3 - 1/4 + (x^4 + x^3 - (3/4)*x^2 - (1/2)*x + 1/4)*F(x) = 0. [From GUESSS] %F A178748 From _David Scambler_, Jun 10 2010: (Start) %F A178748 a(n) = (2^n*(3*n+8) + (3*n+1)*(-1)^n)/9. %F A178748 a(n) + a(n-1) = A127981(n+1) - A127981(n). %F A178748 (End) %F A178748 From _Colin Barker_, Mar 04 2020: (Start) %F A178748 G.f.: (1 - 2*x^3) / ((1 + x)^2*(1 - 2*x)^2). %F A178748 a(n) = 2*a(n-1) + 3*a(n-2) - 4*a(n-3) - 4*a(n-4) for n>3. %F A178748 (End) %e A178748 a(0) = bitcount(1) = 1. %e A178748 a(1) = bitcount(3) = 2. %e A178748 a(2) = bitcount(6) + bitcount(6) + bitcount(7) = 2 + 2 + 3 = 7. %t A178748 LinearRecurrence[{2,3,-4,-4},{1,2,7,14},40] (* _Harvey P. Dale_, Aug 27 2021 *) %o A178748 (PARI) seq(n)={my(a=vector(n+1), f=0, p=0, k=1, s=0); while(k<=#a, my(b=bitxor(p+1,p)); f=bitxor(f,b); p=bitxor(p, bitand(b,f)); if(p>2^k, a[k]=s; k++; s=0); s+=hammingweight(p)); a} \\ _Andrew Howroyd_, Mar 03 2020 %o A178748 (PARI) a(n) = {(2^n*(3*n+8) + (3*n+1)*(-1)^n)/9} \\ _Andrew Howroyd_, Mar 03 2020 %o A178748 (PARI) Vec((1 - 2*x^3) / ((1 + x)^2*(1 - 2*x)^2) + O(x^30)) \\ _Colin Barker_, Mar 04 2020 %Y A178748 Cf. A178747 (sum of terms in rows of A178746). %Y A178748 Cf. A127981. %K A178748 nonn,easy %O A178748 0,2 %A A178748 _David Scambler_, Jun 09 2010 %E A178748 Terms a(16) and beyond from _Andrew Howroyd_, Mar 03 2020