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.

A164894 Base-10 representation of the binary string formed by appending 10, 100, 1000, 10000, ..., etc., to 1.

Original entry on oeis.org

1, 6, 52, 840, 26896, 1721376, 220336192, 56406065280, 28879905423616, 29573023153783296, 60565551418948191232, 248076498612011791288320, 2032242676629600594233921536, 33296264013899376135928570454016, 1091051979207454757222107396637212672
Offset: 1

Views

Author

Gil Broussard, Aug 29 2009

Keywords

Comments

These numbers are half the sum of powers of 2 indexed by differences of a triangular number and each smaller triangular number (e.g., 21 - 15 = 6, 21 - 10 = 11, ..., 21 - 0 = 21).
This suggests another way to think about these numbers: consider the number triangle formed by the characteristic function of the triangular numbers (A010054), join together the first n rows (the very first row is row 0) as a single binary string and that gives the (n + 1)th term of this sequence. - Alonso del Arte, Nov 15 2013
Numbers k such that the k-th composition in standard order (row k of A066099) is an initial interval. - Gus Wiseman, Apr 02 2020

Examples

			a(1) = 1, also 1 in binary.
a(2) = 6, or 110 in binary.
a(3) = 52, or 110100 in binary.
a(4) = 840, or 1101001000 in binary.
		

Crossrefs

The version for prime (rather than binary) indices is A002110.
The non-strict generalization is A225620.
The reversed version is A246534.
Standard composition numbers of permutations are A333218.
Standard composition numbers of strict increasing compositions are A333255.

Programs

  • Mathematica
    Table[Sum[2^((n^2 + n)/2 - (k^2 + k)/2 - 1), {k, 0, n - 1}], {n, 25}] (* Alonso del Arte, Nov 14 2013 *)
    Module[{nn=15,t},t=Table[10^n,{n,0,nn}];Table[FromDigits[Flatten[IntegerDigits/@Take[t,k]],2],{k,nn}]] (* Harvey P. Dale, Jan 16 2024 *)
  • Python
    def a(n): return int("".join("1"+"0"*i for i in range(n)), 2)
    print([a(n) for n in range(1, 16)]) # Michael S. Branicky, Jul 05 2021
    
  • Python
    def A164894(n): return sum(1<<(k*((n<<1)-k-1)>>1)+n-1 for k in range(n)) # Chai Wah Wu, Jul 11 2025

Formula

a(n) = Sum_{k=0..n-1} 2^((n^2 + n)/2 - (k^2 + k)/2 - 1). - Alonso del Arte, Nov 15 2013
Intersection of A333255 and A333217. - Gus Wiseman, Apr 02 2020
a(n) = Sum_{k=0..n-1} 2^(k*(2*n-k-1)/2+n-1). - Chai Wah Wu, Jul 11 2025