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.

Showing 1-4 of 4 results.

A374356 a(n) is the greatest fibbinary number f <= n such that n - f is also a fibbinary number whose binary expansion has no common 1's with that of f (where fibbinary numbers correspond to A003714).

Original entry on oeis.org

0, 1, 2, 2, 4, 5, 4, 5, 8, 9, 10, 10, 8, 9, 10, 10, 16, 17, 18, 18, 20, 21, 20, 21, 16, 17, 18, 18, 20, 21, 20, 21, 32, 33, 34, 34, 36, 37, 36, 37, 40, 41, 42, 42, 40, 41, 42, 42, 32, 33, 34, 34, 36, 37, 36, 37, 40, 41, 42, 42, 40, 41, 42, 42, 64, 65, 66, 66
Offset: 0

Views

Author

Rémy Sigrist, Jul 06 2024

Keywords

Comments

To compute a(n): replace every other bit with zero (starting with the second bit) in each run of consecutive 1's in the binary expansion of n.
From Gus Wiseman, Jul 11 2025: (Start)
This is the greatest binary rank of a sparse subset of the binary indices of n, where:
1. The binary indices of a nonnegative integer are the positions of 1 in its reversed binary expansion.
2. A set is sparse iff 1 is not a first difference.
3. The binary rank of a set {S_1,S_2,...} is Sum_i 2^(S_i-1).
(End)

Examples

			The first terms, in decimal and in binary, are:
  n   a(n)  bin(n)  bin(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     1       1          1
   2     2      10         10
   3     2      11         10
   4     4     100        100
   5     5     101        101
   6     4     110        100
   7     5     111        101
   8     8    1000       1000
   9     9    1001       1001
  10    10    1010       1010
  11    10    1011       1010
  12     8    1100       1000
  13     9    1101       1001
  14    10    1110       1010
  15    10    1111       1010
  16    16   10000      10000
		

Crossrefs

The union is A003714 (Fibbinary numbers).
For prime instead of binary indices we have A385216.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A166469 counts sparse submultisets of prime indices, maximal A385215.
A245564 counts sparse subsets of binary indices, maximal case A384883.
A319630 ranks sparse submultisets of prime indices, complement A104210.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    fbi[q_]:=If[q=={},0,Total[2^q]/2];
    Table[Max@@fbi/@Select[Subsets[bpe[n]],FreeQ[Differences[#],1]&],{n,0,100}] (* Gus Wiseman, Jul 11 2025 *)
  • PARI
    a(n) = { my (v = 0, e, x, y, b); while (n, x = y = 0; e = valuation(n, 2); for (k = 0, oo, if (bittest(n, e+k), n -= b = 2^(e+k); [x, y] = [y + b, x], v += x; break;););); return (v); }

Formula

a(n) = A374354(n, A277561(n)-1).
a(n) = n - A374355(n).
a(n) <= n with equality iff n is a fibbinary number.

A374355 a(n) is the least fibbinary number f <= n such that n - f is also a fibbinary number whose binary expansion has no common 1's with that of f (where fibbinary numbers correspond to A003714).

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 0, 1, 4, 4, 4, 5, 0, 0, 0, 1, 0, 0, 2, 2, 8, 8, 8, 9, 8, 8, 10, 10, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 0, 1, 4, 4, 4, 5, 16, 16, 16, 17, 16, 16, 18, 18, 16, 16, 16, 17, 20, 20, 20, 21, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 0, 1, 4, 4, 4, 5, 0
Offset: 0

Views

Author

Rémy Sigrist, Jul 06 2024

Keywords

Comments

To compute a(n): replace every other bit with zero (starting with the first bit) in each run of consecutive 1's in the binary expansion of n.

Examples

			The first terms, in binary and in decimal, are:
  n   a(n)  bin(n)  bin(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     0       1          0
   2     0      10          0
   3     1      11          1
   4     0     100          0
   5     0     101          0
   6     2     110         10
   7     2     111         10
   8     0    1000          0
   9     0    1001          0
  10     0    1010          0
  11     1    1011          1
  12     4    1100        100
  13     4    1101        100
  14     4    1110        100
  15     5    1111        101
  16     0   10000          0
		

Crossrefs

Programs

  • PARI
    a(n) = { my (v = 0, e, x, y, b); while (n, x = y = 0; e = valuation(n, 2); for (k = 0, oo, if (bittest(n, e+k), n -= b = 2^(e+k); [x, y] = [y + b, x], v += y; break;););); return (v); }

Formula

a(n) = A374354(n, 0).
a(n) = n - A374356(n).
a(n) >= 0 with equality iff n is a fibbinary number.

A374361 Irregular table T(n, k), n >= 0, 0 <= k < A120880(n), read by rows; the n-th row contains the terms t of A005836 such that n - t also belongs to A005836.

Original entry on oeis.org

0, 0, 1, 1, 0, 3, 0, 1, 3, 4, 1, 4, 3, 3, 4, 4, 0, 9, 0, 1, 9, 10, 1, 10, 0, 3, 9, 12, 0, 1, 3, 4, 9, 10, 12, 13, 1, 4, 10, 13, 3, 12, 3, 4, 12, 13, 4, 13, 9, 9, 10, 10, 9, 12, 9, 10, 12, 13, 10, 13, 12, 12, 13, 13, 0, 27, 0, 1, 27, 28, 1, 28, 0, 3, 27, 30, 0, 1, 3, 4, 27, 28, 30, 31
Offset: 0

Views

Author

Rémy Sigrist, Jul 06 2024

Keywords

Comments

In other words, we partition n into pairs of terms of A005836 and list the corresponding terms to get the n-th row.

Examples

			Triangle T(n, k) begins:
  n   n-th row
  --  -----------
   0  0
   1  0, 1
   2  1
   3  0, 3
   4  0, 1, 3, 4
   5  1, 4
   6  3
   7  3, 4
   8  4
   9  0, 9
  10  0, 1, 9, 10
  11  1, 10
  12  0, 3, 9, 12
		

Crossrefs

See A374354 for a similar sequence.

Programs

  • PARI
    row(n) = { my (r = [0], t = 1, d); while (n, d = n % 3; n \= 3; if (d==1, r = concat(r, [v + t | v <- r]), d==2, r = [v + t | v <- r]); t *= 3;); return (r); }

Formula

T(n, 0) = 0 iff n belongs to A005836.
T(n, k) + T(n, A120880(k)-1-k) = n.
T(n, 0) = A374362(n).
T(n, A120880(k)-1) = A374363(n).

A374394 Irregular table T(n, k), n >= 0, 0 <= k < A277561(1+A003754(n)), read by rows; the n-th row lists the numbers z <= n such that the Zeckendorf representations of z and n-z have no common Fibonacci numbers and when combined together correspond to the lazy Fibonacci representation of n.

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 2, 0, 1, 3, 4, 2, 3, 2, 4, 0, 2, 5, 7, 1, 2, 6, 7, 3, 4, 5, 6, 3, 7, 4, 7, 0, 1, 3, 4, 8, 9, 11, 12, 2, 3, 10, 11, 2, 4, 10, 12, 5, 7, 8, 10, 6, 7, 9, 10, 5, 6, 11, 12, 7, 11, 7, 12, 0, 2, 5, 7, 13, 15, 18, 20, 1, 2, 6, 7, 14, 15, 19, 20, 3, 4, 5, 6, 16, 17, 18, 19
Offset: 0

Views

Author

Rémy Sigrist, Jul 07 2024

Keywords

Examples

			Triangle T(n, k) begins:
  n   n-th row
  --  ------------------------
   0  0
   1  0, 1
   2  0, 2
   3  1, 2
   4  0, 1, 3, 4
   5  2, 3
   6  2, 4
   7  0, 2, 5, 7
   8  1, 2, 6, 7
   9  3, 4, 5, 6
  10  3, 7
  11  4, 7
  12  0, 1, 3, 4, 8, 9, 11, 12
  13  2, 3, 10, 11
  14  2, 4, 10, 12
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

Formula

T(n, k) = A022290(A374354(1+A003754(n)), k).
Showing 1-4 of 4 results.