login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A178748 Total number of '1' bits in the terms of 'rows' of A178746. 3
1, 2, 7, 14, 37, 80, 187, 410, 913, 1988, 4327, 9326, 20029, 42776, 91027, 192962, 407785, 859244, 1805887, 3786518, 7922581, 16544192, 34486507, 71769194, 149130817, 309446420, 641262487, 1327264190, 2744006893, 5666970728, 11691855427, 24099538706, 49630733209 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Sum of adjacent terms equals the difference of adjacent terms in A127981. - David Scambler, Jun 10 2010
LINKS
FORMULA
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]
From David Scambler, Jun 10 2010: (Start)
a(n) = (2^n*(3*n+8) + (3*n+1)*(-1)^n)/9.
a(n) + a(n-1) = A127981(n+1) - A127981(n).
(End)
From Colin Barker, Mar 04 2020: (Start)
G.f.: (1 - 2*x^3) / ((1 + x)^2*(1 - 2*x)^2).
a(n) = 2*a(n-1) + 3*a(n-2) - 4*a(n-3) - 4*a(n-4) for n>3.
(End)
EXAMPLE
a(0) = bitcount(1) = 1.
a(1) = bitcount(3) = 2.
a(2) = bitcount(6) + bitcount(6) + bitcount(7) = 2 + 2 + 3 = 7.
MATHEMATICA
LinearRecurrence[{2, 3, -4, -4}, {1, 2, 7, 14}, 40] (* Harvey P. Dale, Aug 27 2021 *)
PROG
(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
(PARI) a(n) = {(2^n*(3*n+8) + (3*n+1)*(-1)^n)/9} \\ Andrew Howroyd, Mar 03 2020
(PARI) Vec((1 - 2*x^3) / ((1 + x)^2*(1 - 2*x)^2) + O(x^30)) \\ Colin Barker, Mar 04 2020
CROSSREFS
Cf. A178747 (sum of terms in rows of A178746).
Cf. A127981.
Sequence in context: A191389 A191319 A018497 * A194590 A107373 A336579
KEYWORD
nonn,easy
AUTHOR
David Scambler, Jun 09 2010
EXTENSIONS
Terms a(16) and beyond from Andrew Howroyd, Mar 03 2020
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)