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!)
A166456 Row sums of triangle A166455. 2
1, 2, 6, 12, 30, 60, 124, 248, 510, 1020, 2044, 4088, 8188, 16376, 32760, 65520, 131070, 262140, 524284, 1048568, 2097148, 4194296, 8388600, 16777200, 33554428, 67108856, 134217720, 268435440, 536870904, 1073741808, 2147483632, 4294967264, 8589934590, 17179869180 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
a(n) = 2^(n+1) - A001316(n). - R. J. Mathar, Oct 30 2009
EXAMPLE
a(3) = 12 = (1 + 5 + 5 + 1).
MATHEMATICA
a[n_] := 2^(n+1) - 2^DigitCount[n, 2, 1]; Array[a, 31, 0] (* Amiram Eldar, Aug 01 2023 *)
PROG
(Python)
def A000120(n):
a = 0
while n > 0:
a += n % 2
n //= 2
return a
def A001316(n):
return 2**A000120(n)
def A166456(n):
return 2**(n+1) - A001316(n)
print([A166456(n) for n in range(80)])
# R. J. Mathar, Oct 30 2009
CROSSREFS
Sequence in context: A005417 A058215 A330542 * A162214 A309728 A100071
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Oct 14 2009
EXTENSIONS
Extended by R. J. Mathar, Oct 30 2009
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 24 09:42 EDT 2024. Contains 371935 sequences. (Running on oeis4.)