cp's OEIS Frontend

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.

A160020 Row sums of triangle in A160019 .

Original entry on oeis.org

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
Offset: 0

Views

Author

Philippe Deléham, Apr 29 2009

Keywords

Examples

			Triangle A160019 begins : 1 ; 1,3 ; 1,0,3 ; 1,3,5,7 ; 1,0,2,4,3 ; 1,3,0,2,5,7 ; ...
		

Crossrefs

Programs

  • 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

Formula

a(n) = b^2 + (n+1-b)*(n-b), where b = 2^A000120(n). - Andrew Howroyd, Feb 02 2020

Extensions

Terms a(11) and beyond from Andrew Howroyd, Feb 02 2020