|
| |
|
|
A055941
|
|
a(n) = sum( i[j] - j, j = 0 .. k-1) where n = sum( 2^i[j], j = 0 .. k-1).
|
|
3
| |
|
|
0, 0, 1, 0, 2, 1, 2, 0, 3, 2, 3, 1, 4, 2, 3, 0, 4, 3, 4, 2, 5, 3, 4, 1, 6, 4, 5, 2, 6, 3, 4, 0, 5, 4, 5, 3, 6, 4, 5, 2, 7, 5, 6, 3, 7, 4, 5, 1, 8, 6, 7, 4, 8, 5, 6, 2, 9, 6, 7, 3, 8, 4, 5, 0, 6, 5, 6, 4, 7, 5, 6, 3, 8, 6, 7, 4, 8, 5, 6, 2, 9, 7, 8, 5, 9, 6, 7, 3, 10, 7, 8, 4, 9, 5, 6, 1, 10, 8, 9, 6, 10, 7, 8, 4
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,5
|
|
|
COMMENTS
| Used to calculate number of subspaces of Zp^n where Zp is field of integers mod p.
Consider a square matrix A and call it special if (0) A is an upper triangular matrix, (1) a nonzero column of A has a 1 on the main diagonal and (2) if a row has a 1 on the main diagonal then this is the only nonzero element in that row.
If the diagonal of a special matrix is given (it can only contain 0's and 1's), many of the fields of A are determined by (0), (1) and (2). The number of fields that can be freely chosen while still satisfying (0), (1) and (2) is a(n), where n is the diagonal, read as a binary number with least significant bit at upper left.
|
|
|
REFERENCES
| A. Siegel, Linear Aspects of Boolean Functions, 1999 (unpublished)
|
|
|
FORMULA
| a(n) = Sum (total number of zero-bits to the right of 1-bit) over all 1-bits of n.
|
|
|
EXAMPLE
| 20 = 2^4 + 2^2, thus a(20) = (2-0) + (4-1) = 5
|
|
|
PROG
| (GNU/MIT Scheme:) (define (A055941 n) (let loop ((n n) (ze 0) (s 0)) (cond ((zero? n) s) ((even? n) (loop (/ n 2) (1+ ze) s)) (else (loop (/ (-1+ n) 2) ze (+ s ze))))))
|
|
|
CROSSREFS
| a(n) = A161511(n)-A000120(n) = A161920(n+1)-1-A029837(n+1). Cf. A126441.
Sequence in context: A177995 A147786 A119387 * A068076 A138498 A050319
Adjacent sequences: A055938 A055939 A055940 * A055942 A055943 A055944
|
|
|
KEYWORD
| nonn
|
|
|
AUTHOR
| Anno Siegel (siegel(AT)zrz.tu-berlin.de), Jul 18 2000
|
|
|
EXTENSIONS
| Edited, extended and Scheme-code added by Antti Karttunen (His-Firstname.His-Surname(AT)gmail.com), Oct 12 2009
|
| |
|
|