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.

A249544 Array read by antidiagonals: T(m,n) read in binary is a palindrome with m runs of n ones separated by single zeros.

Original entry on oeis.org

1, 3, 5, 7, 27, 21, 15, 119, 219, 85, 31, 495, 1911, 1755, 341, 63, 2015, 15855, 30583, 14043, 1365, 127, 8127, 128991, 507375, 489335, 112347, 5461, 255, 32639, 1040319, 8255455, 16236015, 7829367, 898779, 21845, 511, 130815, 8355711
Offset: 1

Views

Author

Tilman Piesk, Oct 31 2014

Keywords

Comments

The entries in this array are all in A194602, and therefore can be interpreted as integer partitions: T(m,n) is the integer partition with m times the addend n+1, and no other non-one addends. The array A249543 contains the corresponding indices of A194602.

Examples

			Array starts:                                          Binary:
  n    1      2       3         4          5
m
1      1      3       7        15         31               1        11          111
2      5     27     119       495       2015             101     11011      1110111
3     21    219    1911     15855     128991           10101  11011011  11101110111
4     85   1755   30583    507375    8255455
5    341  14043  489335  16236015  528349151
		

Crossrefs

Cf. A249543, A194602; Rows: A000225, A129868; Columns: A002450, A083713.

Programs

  • PHP
    A249544($m, $n) {
    // a                  b            c
    // ( 2^(n+1)^m -1 ) * ( 2^n -1 ) / ( 2^(n+1) -1 )
    $a = gmp_sub( gmp_pow( gmp_pow(2,$n+1), $m ), 1 );
    $b = gmp_sub( gmp_pow(2,$n), 1 );
    $c = gmp_sub( gmp_pow(2,$n+1), 1 );
    $return = gmp_div_q( gmp_mul($a,$b), $c );
    return gmp_strval($return);
    }

Formula

T(m,n) = ( 2^(n+1)^m -1 ) * ( 2^n -1 ) / ( 2^(n+1) -1 ).