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.

A290254 The viabin numbers of the self-conjugate integer partitions.

This page as a plain text file.
%I A290254 #40 Apr 21 2024 22:25:52
%S A290254 0,1,5,6,19,21,26,28,71,75,85,89,102,106,116,120,271,279,299,307,333,
%T A290254 341,361,369,398,406,426,434,460,468,488,496,1055,1071,1111,1127,1179,
%U A290254 1195,1235,1251,1309,1325,1365,1381,1433,1449,1489,1505,1566,1582,1622
%N A290254 The viabin numbers of the self-conjugate integer partitions.
%C A290254 For the definition of viabin number see comment in A290253.
%C A290254 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
%H A290254 Alois P. Heinz, <a href="/A290254/b290254.txt">Table of n, a(n) for n = 1..16384</a>
%F A290254 { 0 } union fixed points of A059894. - _Alois P. Heinz_, Aug 24 2017
%F A290254 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 [verification needed]
%e A290254 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].
%p A290254 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.
%t A290254 nmax = 3000; (* nmax=3000 gives 64 terms *)
%t A290254 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];
%t A290254 SC = {0};
%t A290254 For[n = 1, n <= nmax, n++, If[a[n] == n, SC = Union[SC, {n}]]];
%t A290254 SC (* _Jean-François Alcover_, Dec 16 2020, after Maple *)
%o A290254 (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
%o A290254 (PARI) a(n) = my(v=binary(max(1,n-1))[^1]); n<<#v + bitneg(fromdigits(Vecrev(v),2)); \\ _Kevin Ryde_, Nov 30 2021
%Y A290254 Cf. A059894, A290253.
%K A290254 nonn
%O A290254 1,3
%A A290254 _Emeric Deutsch_, Aug 23 2017