|
|
A290254
|
|
The viabin numbers of the self-conjugate integer partitions.
|
|
2
|
|
|
0, 1, 5, 6, 19, 21, 26, 28, 71, 75, 85, 89, 102, 106, 116, 120, 271, 279, 299, 307, 333, 341, 361, 369, 398, 406, 426, 434, 460, 468, 488, 496, 1055, 1071, 1111, 1127, 1179, 1195, 1235, 1251, 1309, 1325, 1365, 1381, 1433, 1449, 1489, 1505, 1566, 1582, 1622
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
For the definition of viabin number see comment in A290253.
The binary representation of a(n) is obtained by concatenating the binary representation of (n-1) and the reversed bit-flipped binary representation of (n-1) and then dropping the last bit. This suggests that it would have been more natural to index from 0. - Peter J. Taylor, Sep 24 2021
|
|
LINKS
|
|
|
FORMULA
|
a(n) = a(n-1) + 2*4^(f(n-1) - 1) + 3*2^(f(n-1) - 1) - 1 if n = 2^k + 1, k > 0, otherwise a(n-1) + (2^(A007814(n-1) + 2) - 3)*2^f(A025480(n-2)) with a(1) = 0, a(2) = 1 where f(n) = A000523(n) for n > 0 with f(0) = 0. - Mikhail Kurkov, Sep 24 2021
|
|
EXAMPLE
|
19 is in the sequence. Indeed, binary (19) = 10011 and so the southeast border of the Ferrers board of the corresponding integer partition is ENNEEN, where E = (1,0) and N = (0,1). This leads to the self-conjugate integer partition [3,1,1].
|
|
MAPLE
|
a := proc (n) local i, m, r: m, r := n, 0: for i from 0 while 1 < m do r := 2*r+1-irem(m, 2, 'm') end do: r+2^i end proc: SC := {0}: for n to 3000 do if a(n) = n then SC := `union`(SC, {n}) else end if end do: SC; # first part of the program taken from A059894.
|
|
MATHEMATICA
|
nmax = 3000; (* nmax=3000 gives 64 terms *)
a[n_] := Module[{i, m = n, r = 0}, For[i = 0, 1 < m, i++, r = 2*r + 1 - Mod[m, 2]; m = Quotient[m, 2]]; r + 2^i];
SC = {0};
For[n = 1, n <= nmax, n++, If[a[n] == n, SC = Union[SC, {n}]]];
|
|
PROG
|
(Python) a = lambda n: int(bin(n-1)[2:] + ''.join(str(1 ^ int(ch)) for ch in bin(n-1)[-1:2:-1]), 2) # Peter J. Taylor, Sep 24 2021
(PARI) a(n) = my(v=binary(max(1, n-1))[^1]); n<<#v + bitneg(fromdigits(Vecrev(v), 2)); \\ Kevin Ryde, Nov 30 2021
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|