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!)
A160020 Row sums of triangle in A160019 . 3
1, 4, 4, 16, 10, 18, 22, 64, 46, 46, 58, 76, 88, 94, 106, 256, 214, 198, 226, 196, 288, 246, 274, 312, 436, 370, 406, 388, 484, 438, 466, 1024, 934, 886, 946, 820, 1072, 934, 994, 808, 1348, 1186, 1254, 1012, 1396, 1126, 1186, 1264, 1996, 1786, 1870, 1516, 2044 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
a(n) = b^2 + (n+1-b)*(n-b), where b = 2^A000120(n). - Andrew Howroyd, Feb 02 2020
EXAMPLE
Triangle A160019 begins : 1 ; 1,3 ; 1,0,3 ; 1,3,5,7 ; 1,0,2,4,3 ; 1,3,0,2,5,7 ; ...
PROG
(PARI) \\ here S(n, k) is A047999.S(n, k)={bitand(n-k, k)==0}a(n)={my(b=0); sum(k=0, n, if(S(n, k), b++; 2*b-1, 2*(k-b)))} \\ Andrew Howroyd, Feb 02 2020
(PARI) a(n)={my(b=2^hammingweight(n)); b^2 + (n+1-b)*(n-b)} \\ Andrew Howroyd, Feb 02 2020
CROSSREFS
Sequence in context: A319070 A227074 A174595 * A273370 A273830 A250069
KEYWORD
easy,nonn
AUTHOR
Philippe Deléham, Apr 29 2009
EXTENSIONS
Terms a(11) and beyond from Andrew Howroyd, Feb 02 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 May 1 01:13 EDT 2024. Contains 372143 sequences. (Running on oeis4.)