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.

Previous Showing 11-20 of 20 results.

A245564 a(n) = Product_{i in row n of A245562} Fibonacci(i+2).

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 3, 5, 2, 4, 4, 6, 3, 6, 5, 8, 2, 4, 4, 6, 4, 8, 6, 10, 3, 6, 6, 9, 5, 10, 8, 13, 2, 4, 4, 6, 4, 8, 6, 10, 4, 8, 8, 12, 6, 12, 10, 16, 3, 6, 6, 9, 6, 12, 9, 15, 5, 10, 10, 15, 8, 16, 13, 21, 2, 4, 4, 6, 4, 8, 6, 10, 4, 8, 8, 12, 6, 12, 10, 16, 4, 8, 8, 12, 8, 16, 12, 20, 6, 12, 12, 18
Offset: 0

Views

Author

N. J. A. Sloane, Aug 10 2014; revised Sep 05 2014

Keywords

Comments

This is the Run Length Transform of S(n) = Fibonacci(n+2).
The Run Length Transform of a sequence {S(n), n>=0} is defined to be the sequence {T(n), n>=0} given by T(n) = Product_i S(i), where i runs through the lengths of runs of 1's in the binary expansion of n. E.g. 19 is 10011 in binary, which has two runs of 1's, of lengths 1 and 2. So T(19) = S(1)*S(2). T(0)=1 (the empty product).
Also the number of sparse subsets of the binary indices of n, where a set is sparse iff 1 is not a first difference. The maximal case is A384883. For prime instead of binary indices we have A166469. - Gus Wiseman, Jul 05 2025

Examples

			From _Gus Wiseman_, Jul 05 2025: (Start)
The binary indices of 11 are {1,2,4}, with sparse subsets {{},{1},{2},{4},{1,4},{2,4}}, so a(11) = 6.
The maximal runs of binary indices of 11 are ((1,2),(4)), with lengths (2,1), so a(11) = F(2+2)*F(1+2) = 6.
The a(0) = 1 through a(12) = 3 sparse subsets are:
  0    1    2    3    4    5    6    7    8    9    10    11    12
  ------------------------------------------------------------------
  {}   {}   {}   {}   {}   {}   {}   {}   {}   {}    {}    {}    {}
       {1}  {2}  {1}  {3}  {1}  {2}  {1}  {4}  {1}   {2}   {1}   {3}
                 {2}       {3}  {3}  {2}       {4}   {4}   {2}   {4}
                           {1,3}     {3}       {1,4} {2,4} {4}
                                     {1,3}                 {1,4}
                                                           {2,4}
The greatest number whose set of binary indices is a member of column n above is A374356(n).
(End)
		

Crossrefs

A034839 counts subsets by number of maximal runs, strict partitions A116674.
A384877 gives lengths of maximal anti-runs of binary indices, firsts A384878.
A384893 counts subsets by number of maximal anti-runs, for partitions A268193, A384905.

Programs

  • Maple
    with(combinat); ans:=[];
    for n from 0 to 100 do lis:=[]; t1:=convert(n,base,2); L1:=nops(t1); out1:=1; c:=0;
    for i from 1 to L1 do
       if out1 = 1 and t1[i] = 1 then out1:=0; c:=c+1;
       elif out1 = 0 and t1[i] = 1 then c:=c+1;
       elif out1 = 1 and t1[i] = 0 then c:=c;
       elif out1 = 0 and t1[i] = 0 then lis:=[c,op(lis)]; out1:=1; c:=0;
       fi;
       if i = L1 and c>0 then lis:=[c,op(lis)]; fi;
                       od:
    a:=mul(fibonacci(i+2), i in lis);
    ans:=[op(ans),a];
    od:
    ans;
  • Mathematica
    a[n_] := Sum[Mod[Binomial[3k, k] Binomial[n, k], 2], {k, 0, n}];
    a /@ Range[0, 100] (* Jean-François Alcover, Feb 29 2020, after Chai Wah Wu *)
    spars[S_]:=Select[Subsets[S],FreeQ[Differences[#],1]&];
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Table[Length[spars[bpe[n]]],{n,0,30}] (* Gus Wiseman, Jul 05 2025 *)
  • PARI
    a(n)=my(s=1,k); while(n, n>>=valuation(n,2); k=valuation(n+1,2); s*=fibonacci(k+2); n>>=k); s \\ Charles R Greathouse IV, Oct 21 2016
    
  • Python
    # use RLT function from A278159
    from sympy import fibonacci
    def A245564(n): return RLT(n,lambda m: fibonacci(m+2)) # Chai Wah Wu, Feb 04 2022

Formula

a(n) = Sum_{k=0..n} ({binomial(3k,k)*binomial(n,k)} mod 2). - Chai Wah Wu, Oct 19 2016

A385817 Irregular triangle read by rows listing the lengths of maximal runs (sequences of consecutive elements increasing by 1) of binary indices, duplicate rows removed.

Original entry on oeis.org

1, 2, 1, 1, 3, 2, 1, 1, 2, 4, 1, 1, 1, 3, 1, 2, 2, 1, 3, 5, 2, 1, 1, 1, 2, 1, 4, 1, 1, 1, 2, 3, 2, 2, 3, 1, 4, 6, 1, 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, 3, 1, 5, 1, 2, 1, 2, 1, 2, 2, 4, 2, 1, 1, 3, 3, 3, 2, 4, 1, 5, 7, 2, 1, 1, 1, 1, 2, 1, 1, 4, 1, 1, 1, 1, 2, 1
Offset: 0

Views

Author

Gus Wiseman, Jul 14 2025

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.
This is the triangle A245563, except all duplicates after the first instance of each composition are removed. It lists all compositions in order of their first appearance as a row of A245563.

Examples

			The binary indices of 53 are {1,3,5,6}, with maximal runs ((1),(3),(5,6)), with lengths (1,1,2). After removing duplicates, this is our row 16.
Triangle begins:
   0: .
   1: 1
   2: 2
   3: 1 1
   4: 3
   5: 2 1
   6: 1 2
   7: 4
   8: 1 1 1
   9: 3 1
  10: 2 2
  11: 1 3
  12: 5
  13: 2 1 1
  14: 1 2 1
  15: 4 1
  16: 1 1 2
  17: 3 2
  18: 2 3
  19: 1 4
  20: 6
  21: 1 1 1 1
		

Crossrefs

In the following references, "before" is short for "before removing duplicate rows".
Positions of singleton rows appear to be A000071 = A000045-1, before A023758.
Positions of firsts appearances appear to be A001629.
Positions of rows of the form (1,1,...) appear to be A055588 = A001906+1.
First term of each row appears to be A083368.
Row sums appear to be A200648, before A000120.
Row lengths after the first row appear to be A200650+1, before A069010 = A037800+1.
Before the removals we had A245563 (except first term), see A245562, A246029, A328592.
For anti-run ranks we have A385816, before A348366, firsts A052499.
Standard composition numbers of rows are A385818, before A385889.
For anti-runs we have A385886, before A384877, firsts A384878.

Programs

  • Mathematica
    DeleteDuplicates[Table[Length/@Split[Join@@Position[Reverse[IntegerDigits[n,2]],1],#2==#1+1&],{n,0,100}]]

A083368 a(n) is the position of the highest one in A003754(n).

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 4, 1, 3, 2, 1, 5, 2, 1, 4, 1, 3, 2, 1, 6, 1, 3, 2, 1, 5, 2, 1, 4, 1, 3, 2, 1, 7, 2, 1, 4, 1, 3, 2, 1, 6, 1, 3, 2, 1, 5, 2, 1, 4, 1, 3, 2, 1, 8, 1, 3, 2, 1, 5, 2, 1, 4, 1, 3, 2, 1, 7, 2, 1, 4, 1, 3, 2, 1, 6, 1, 3, 2, 1, 5, 2, 1, 4, 1, 3, 2, 1, 9, 2, 1, 4, 1, 3, 2, 1, 6, 1, 3, 2, 1, 5, 2
Offset: 1

Views

Author

Gary W. Adamson, Jun 04 2003

Keywords

Comments

Previous name was: A Fibbinary system represents a number as a sum of distinct Fibonacci numbers (instead of distinct powers of two). Using representations without adjacent zeros, a(n) = the highest bit-position which changes going from n-1 to n.
A003754(n), when written in binary, is the representation of n.
Often one uses Fibbinary representations without adjacent ones (the Zeckendorf expansion).
a(A000071(n+3)) = n. - Reinhard Zumkeller, Aug 10 2014
From Gus Wiseman, Jul 24 2025: (Start)
Conjecture: To obtain this sequence, start with A245563 (maximal run lengths of binary indices), then remove empty and duplicate rows (giving A385817), then take the first term of each remaining row. Some variations:
- For sum instead of first term we appear to have A200648.
- For length instead of first term we appear to have A200650+1.
- For last instead of first term we have A385892.
(End)

Examples

			27 is represented 110111, 28 is 111010; the fourth position changes, so a(28)=4.
		

References

  • Jay Kappraff, Beyond Measure: A Guided Tour Through Nature, Myth and Number, World Scientific, 2002, page 460.

Crossrefs

A035612 is the analogous sequence for Zeckendorf representations.
A001511 is the analogous sequence for power-of-two representations.
Appears to be the first element of each row of A385817, see A083368, A200648, A200650, A385818, A385892.
A000120 counts ones in binary expansion.
A245563 gives run lengths of binary indices, see A089309, A090996, A245562, A246029, A328592.
A384877 gives anti-run lengths of binary indices, ranks A385816.

Programs

  • Haskell
    a083368 n = a083368_list !! (n-1)
    a083368_list = concat $ h $ drop 2 a000071_list where
       h (a:fs@(a':_)) = (map (a035612 . (a' -)) [a .. a' - 1]) : h fs
    -- Reinhard Zumkeller, Aug 10 2014

Formula

For n = F(a)-1 to F(a+1)-2, a(n) = A035612(F(a+1)-1-n).
a(n) = a(k)+1 if n = ceiling(phi*k) where phi is the golden ratio; otherwise a(n) = 1. - Tom Edgar, Aug 25 2015

Extensions

Edited by Don Reble, Nov 12 2005
Shorter name from Joerg Arndt, Jul 27 2025

A384883 Number of maximal sparse subsets of the binary indices of n, where a set is sparse iff 1 is not a first difference.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 1, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 4, 2, 2, 3, 4, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, 2, 4, 2, 2, 4, 4, 2, 2, 2, 4, 3, 3, 4, 5, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 1, 1, 1, 2, 1, 1, 2
Offset: 0

Views

Author

Gus Wiseman, Jul 02 2025

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.

Examples

			The binary indices of 27 are {1,2,4,5}, with maximal sparse subsets {{1,4},{1,5},{2,4},{2,5}}, so a(27) = 4.
		

Crossrefs

For subsets of {1..n} we get A000931 (shifted), maximal case of A000045 (shifted).
This is the maximal case of A245564.
The greatest number whose binary indices are one of these subsets is A374356.
For prime instead of binary indices we have A385215, maximal case of A166469.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A202064 counts subsets containing n with k maximal runs.
A384877 gives lengths of maximal anti-runs in binary indices, firsts A384878.
A384893 counts subsets by number of maximal anti-runs, for partitions A268193, A384905.

Programs

  • Mathematica
    spars[S_]:=Select[Subsets[S],FreeQ[Differences[#],1]&];
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    maximize[sys_]:=Complement@@Prepend[Most[Subsets[#]]&/@sys,sys];
    Table[Length[maximize[spars[bpe[n]]]],{n,0,100}]

A384906 Number of maximal anti-runs of consecutive parts not increasing by 1 in the prime indices of n (with multiplicity).

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Jun 22 2025

Keywords

Comments

First differs from A300820 at a(462) = 3, A300820(462) = 2.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 462 are {1,2,4,5}, with maximal anti-runs ((1),(2,4),(5)), so a(462) = 3.
		

Crossrefs

For the strict case we have A356228.
For binary instead of prime indices we have A384890 (for runs A069010).
For runs instead of anti-runs we have A385213.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798.
A384877 gives lengths of maximal anti-runs in binary indices, firsts A384878.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Split[prix[n],#2!=#1+1&]],{n,100}]

A385213 Number of maximal runs of consecutive parts increasing by 1 in the prime indices of n (with multiplicity).

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 1, 3, 2, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 3, 2, 2, 1, 3, 2, 2, 3, 3, 1, 1, 1, 5, 2, 2, 1, 3, 1, 2, 2, 4, 1, 2, 1, 3, 2, 2, 1, 4, 2, 3, 2, 3, 1, 3, 2, 4, 2, 2, 1, 2, 1, 2, 3, 6, 2, 2, 1, 3, 2, 2, 1, 4, 1, 2, 2, 3, 1, 2, 1, 5, 4, 2, 1, 3, 2, 2, 2
Offset: 1

Views

Author

Gus Wiseman, Jun 22 2025

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 24 are {1,1,1,2}, with maximal runs ((1),(1),(1,2)), so a(24) = 3.
		

Crossrefs

Positions of first appearances are A000079.
For binary instead of prime indices we have A069010 (for anti-runs A384890).
For anti-runs instead of runs we have A384906.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798.
A384877 gives lengths of maximal anti-runs in binary indices, firsts A384878.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Split[prix[n],#2==#1+1&]],{n,100}]

A385572 Number of subsets of {1..n} with the same number of maximal runs (increasing by 1) as maximal anti-runs (increasing by more than 1).

Original entry on oeis.org

1, 2, 3, 4, 7, 12, 19, 34, 63, 112, 207, 394, 739, 1398, 2687, 5152, 9891, 19128, 37039, 71754, 139459, 271522, 528999, 1032308, 2017291, 3945186, 7723203, 15134440, 29679407, 58245068, 114389683, 224796210, 442021743, 869658304, 1711914351, 3371515306
Offset: 0

Views

Author

Gus Wiseman, Jul 04 2025

Keywords

Comments

Also the number of subsets of {1..n} with the same number of adjacent elements increasing by 1 as adjacent elements increasing by more than 1.

Examples

			The set {2,3,5,6,8} has maximal runs ((2,3),(5,6),(8)) and maximal anti-runs ((2),(3,5),(6,8)) so is counted under a(8).
The a(0) = 1 through a(6) = 19 subsets:
  {}  {}   {}   {}   {}       {}       {}
      {1}  {1}  {1}  {1}      {1}      {1}
           {2}  {2}  {2}      {2}      {2}
                {3}  {3}      {3}      {3}
                     {4}      {4}      {4}
                     {1,2,4}  {5}      {5}
                     {1,3,4}  {1,2,4}  {6}
                              {1,2,5}  {1,2,4}
                              {1,3,4}  {1,2,5}
                              {1,4,5}  {1,2,6}
                              {2,3,5}  {1,3,4}
                              {2,4,5}  {1,4,5}
                                       {1,5,6}
                                       {2,3,5}
                                       {2,3,6}
                                       {2,4,5}
                                       {2,5,6}
                                       {3,4,6}
                                       {3,5,6}
		

Crossrefs

The LHS is counted by A034839 (for partitions A384881, strict A116674), rank statistic A069010.
The case containing n + 1 is A217615.
The RHS is counted by A384893 or A210034 (for partitions A268193, strict A384905), rank statistic A384890.
Subsets of this type are ranked by A385575.
A384175 counts subsets with all distinct lengths of maximal runs, complement A384176.
A384877 gives lengths of maximal anti-runs in binary indices, firsts A384878.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<5, [1, 2, 3, 4, 7][n+1], ((3*n-4)*a(n-1)-
          (3*n-5)*a(n-2)+(5*n-12)*a(n-3)-2*(4*n-11)*a(n-4)+4*(n-3)*a(n-5))/(n-1))
        end:
    seq(a(n), n=0..35);  # Alois P. Heinz, Jul 06 2025
  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Length[Split[#,#2==#1+1&]]==Length[Split[#,#2!=#1+1&]]&]],{n,0,10}]
  • PARI
    a(n)=polcoef([1,1,1]*[x,0,0;x,x^2,1;0,x,x]^n*[1,0,0]~,n) \\ Christian Sievers, Jul 06 2025

Formula

Let M be the matrix [1,0,0; 1,x,1/x; 0,1,1]. Then a(n) is the sum of the constant terms of the entries in the left column of M^n. - Christian Sievers, Jul 06 2025

Extensions

a(21) and beyond from Christian Sievers, Jul 06 2025

A385575 Numbers whose binary indices have the same number of adjacent parts differing by 1 as adjacent parts differing by more than 1.

Original entry on oeis.org

1, 2, 4, 8, 11, 13, 16, 19, 22, 25, 26, 32, 35, 38, 44, 49, 50, 52, 64, 67, 70, 76, 87, 88, 91, 93, 97, 98, 100, 104, 107, 109, 117, 128, 131, 134, 140, 151, 152, 155, 157, 167, 174, 176, 179, 182, 185, 186, 193, 194, 196, 200, 203, 205, 208, 211, 214, 217
Offset: 1

Views

Author

Gus Wiseman, Jul 04 2025

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.

Examples

			The terms together with their binary expansions and binary indices begin:
    1:       1 ~ {1}
    2:      10 ~ {2}
    4:     100 ~ {3}
    8:    1000 ~ {4}
   11:    1011 ~ {1,2,4}
   13:    1101 ~ {1,3,4}
   16:   10000 ~ {5}
   19:   10011 ~ {1,2,5}
   22:   10110 ~ {2,3,5}
   25:   11001 ~ {1,4,5}
   26:   11010 ~ {2,4,5}
   32:  100000 ~ {6}
   35:  100011 ~ {1,2,6}
   38:  100110 ~ {2,3,6}
   44:  101100 ~ {3,4,6}
   49:  110001 ~ {1,5,6}
   50:  110010 ~ {2,5,6}
   52:  110100 ~ {3,5,6}
   64: 1000000 ~ {7}
   67: 1000011 ~ {1,2,7}
   70: 1000110 ~ {2,3,7}
   76: 1001100 ~ {3,4,7}
   87: 1010111 ~ {1,2,3,5,7}
   88: 1011000 ~ {4,5,7}
   91: 1011011 ~ {1,2,4,5,7}
   93: 1011101 ~ {1,3,4,5,7}
   97: 1100001 ~ {1,6,7}
   98: 1100010 ~ {2,6,7}
  100: 1100100 ~ {3,6,7}
		

Crossrefs

The LHS rank statistic is A069010, counted by A034839 (for partitions A384881, A116674).
The RHS rank statistic is A384890, counted by A384893 (for partitions A268193, A384905).
Subsets of this type are counted by A385572, with n A217615.
A384175 counts subsets with all distinct lengths of maximal runs, complement A384176.
A384877 gives lengths of maximal anti-runs in binary indices, firsts A384878.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Select[Range[100],Length[Split[bpe[#],#2==#1+1&]]==Length[Split[bpe[#],#2!=#1+1&]]&]
  • PARI
    is_ok(n)=hammingweight(n)==2*hammingweight(bitand(n,n>>1))+1 \\ Christian Sievers, Jul 18 2025

A385576 Numbers whose prime indices have the same number of distinct elements as maximal anti-runs.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 12, 13, 17, 18, 19, 20, 23, 28, 29, 31, 37, 41, 43, 44, 45, 47, 50, 52, 53, 59, 61, 63, 67, 68, 71, 73, 75, 76, 79, 83, 89, 92, 97, 98, 99, 101, 103, 107, 109, 113, 116, 117, 120, 124, 127, 131, 137, 139, 147, 148, 149, 151, 153, 157, 163
Offset: 1

Views

Author

Gus Wiseman, Jul 04 2025

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
These are also numbers with the same number of adjacent equal prime indices as adjacent unequal prime indices.

Examples

			The prime indices of 2640 are {1,1,1,1,2,3,5}, with 4 distinct parts {1,2,3,5} and 4 maximal anti-runs ((1),(1),(1),(2,3,5)), so 2640 is in the sequence.
The terms together with their prime indices begin:
   1: {}
   2: {1}
   3: {2}
   5: {3}
   7: {4}
  11: {5}
  12: {1,1,2}
  13: {6}
  17: {7}
  18: {1,2,2}
  19: {8}
  20: {1,1,3}
  23: {9}
  28: {1,1,4}
  29: {10}
  31: {11}
  37: {12}
  41: {13}
  43: {14}
  44: {1,1,5}
  45: {2,2,3}
  47: {15}
		

Crossrefs

The LHS is the rank statistic A001221, triangle counted by A116608.
The RHS is the rank statistic A375136, triangle counted by A133121.
These partitions are counted by A385574.
A034296 counts flat or gapless partitions, ranks A066311 or A073491.
A047993 counts partitions with max part = length, ranks A106529.
A356235 counts partitions with a neighborless singleton, ranks A356237.
A384877 gives lengths of maximal anti-runs of binary indices, firsts A384878.
A384893 counts subsets by maximal anti-runs, for partitions A268193, strict A384905.
A385572 counts subsets with the same number of runs as anti-runs, ranks A385575.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],#==1||PrimeNu[#]==Length[Split[prix[#],UnsameQ]]&]

Formula

A001221(a(n)) = A375136(a(n)).

A385892 In the sequence of run lengths of binary indices of each positive integer (A245563), remove all duplicate rows after the first and take the last term of each remaining row.

Original entry on oeis.org

1, 2, 1, 3, 1, 2, 4, 1, 1, 2, 3, 5, 1, 1, 1, 2, 2, 3, 4, 6, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 5, 7, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 6, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 6, 7
Offset: 1

Views

Author

Gus Wiseman, Jul 18 2025

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.

Examples

			The binary indices of 53 are {1,3,5,6}, with maximal runs ((1),(3),(5,6)), with lengths (1,1,2), which is the 16th row of A385817, so a(16) = 2.
		

Crossrefs

In the following references, "before" is short for "before removing duplicate rows".
Positions of firsts appearances appear to be A000071.
Without the removals we have A090996.
For sum instead of last we have A200648, before A000120.
For length instead of last we have A200650+1, before A069010 = A037800+1.
Last term of row n of A385817 (ranks A385818, before A385889), first A083368.
A245563 gives run lengths of binary indices, see A245562, A246029, A328592.
A384877 gives anti-run lengths of binary indices, A385816.

Programs

  • Mathematica
    Last/@DeleteDuplicates[Table[Length/@Split[Join@@Position[Reverse[IntegerDigits[n,2]],1],#2==#1+1&],{n,100}]]
Previous Showing 11-20 of 20 results.