|
|
A164894
|
|
Base-10 representation of the binary string formed by appending 10, 100, 1000, 10000, ..., etc., to 1.
|
|
22
|
|
|
1, 6, 52, 840, 26896, 1721376, 220336192, 56406065280, 28879905423616, 29573023153783296, 60565551418948191232, 248076498612011791288320, 2032242676629600594233921536, 33296264013899376135928570454016, 1091051979207454757222107396637212672
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
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
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum_{k=0..n-1} 2^((n^2 + n)/2 - (k^2 + k)/2 - 1). - Alonso del Arte, Nov 15 2013
|
|
EXAMPLE
|
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.
|
|
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 *)
|
|
PROG
|
(Python)
def a(n): return int("".join("1"+"0"*i for i in range(n)), 2)
|
|
CROSSREFS
|
The version for prime (rather than binary) indices is A002110.
The non-strict generalization is A225620.
Standard composition numbers of permutations are A333218.
Standard composition numbers of strict increasing compositions are A333255.
Cf. A000120, A029931, A048793, A066099, A070939, A124768, A233564, A272919, A333217, A333220, A333379.
|
|
KEYWORD
|
base,easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|