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 26 results. Next

A053538 Triangle: a(n,m) = ways to place p balls in n slots with m in the rightmost p slots, 0<=p<=n, 0<=m<=n, summed over p, a(n,m)= Sum_{k=0..n} binomial(k,m)*binomial(n-k,k-m), (see program line).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 5, 5, 4, 1, 1, 8, 10, 7, 5, 1, 1, 13, 18, 16, 9, 6, 1, 1, 21, 33, 31, 23, 11, 7, 1, 1, 34, 59, 62, 47, 31, 13, 8, 1, 1, 55, 105, 119, 101, 66, 40, 15, 9, 1, 1, 89, 185, 227, 205, 151, 88, 50, 17, 10, 1, 1, 144, 324, 426, 414, 321, 213, 113, 61, 19, 11, 1, 1
Offset: 0

Views

Author

Wouter Meeussen, May 23 2001

Keywords

Comments

Riordan array (1/(1-x-x^2), x(1-x)/(1-x-x^2)). Row sums are A000079. Diagonal sums are A006053(n+2). - Paul Barry, Nov 01 2006
Subtriangle of the triangle given by (0, 1, 1, -1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Mar 05 2012
Mirror image of triangle in A208342. - Philippe Deléham, Mar 05 2012
A053538 is jointly generated with A076791 as an array of coefficients of polynomials u(n,x): initially, u(1,x)=v(1,x)=1, for n>1, u(n,x) = x*u(n-1,x) + v(n-1,x) and v(n,x) = u(n-1,x) + v(n-1,x). See the Mathematica section at A076791. - Clark Kimberling, Mar 08 2012
The matrix inverse starts
1;
-1, 1;
-1, -1, 1;
1, -2, -1, 1;
3, 1, -3, -1, 1;
1, 6, 1, -4, -1, 1;
-7, 4, 10, 1, -5, -1, 1;
-13, -13, 8, 15, 1, -6, -1, 1;
3, -31, -23, 13, 21, 1, -7, -1, 1; - R. J. Mathar, Mar 15 2013
Also appears to be the number of subsets of {1..n} containing n with k maximal anti-runs of consecutive elements increasing by more than 1. For example, the subset {1,3,6,7,11,12} has maximal anti-runs ((1,3,6),(7,11),(12)) so is counted under a(12,3). For runs instead of anti-runs we get A202064. - Gus Wiseman, Jun 26 2025

Examples

			n=4; Table[binomial[k, j]binomial[n-k, k-j], {k, 0, n}, {j, 0, n}] splits {1, 4, 6, 4, 1} into {{1, 0, 0, 0, 0}, {3, 1, 0, 0, 0}, {1, 4, 1, 0, 0}, {0, 0, 3, 1, 0}, {0, 0, 0, 0, 1}} and this gives summed by columns {5, 5, 4, 1, 1}
Triangle begins :
   1;
   1,  1;
   2,  1,  1;
   3,  3,  1, 1;
   5,  5,  4, 1, 1;
   8, 10,  7, 5, 1, 1;
  13, 18, 16, 9, 6, 1, 1;
...
(0, 1, 1, -1, 0, 0, 0, ...) DELTA (1, 0, -1, 1, 0, 0, 0, ...) begins :
  1;
  0,  1;
  0,  1,  1;
  0,  2,  1,  1;
  0,  3,  3,  1, 1;
  0,  5,  5,  4, 1, 1;
  0,  8, 10,  7, 5, 1, 1;
  0, 13, 18, 16, 9, 6, 1, 1;
		

Crossrefs

Column k = 1 is A000045.
Row sums are A000079.
Column k = 2 is A010049.
For runs instead of anti-runs we have A202064.
For integer partitions see A268193, strict A384905, runs A116674.
A034839 counts subsets by number of maximal runs.
A384175 counts subsets with all distinct lengths of maximal runs, complement A384176.
A384877 gives lengths of maximal anti-runs in binary indices, firsts A384878.
A384893 counts subsets by number of maximal anti-runs.

Programs

  • GAP
    Flat(List([0..12], n-> List([0..n], k-> Sum([0..n], j->  Binomial(j,k)*Binomial(n-j,j-k)) ))); # G. C. Greubel, May 16 2019
  • Magma
    [[(&+[Binomial(j,k)*Binomial(n-j,j-k): j in [0..n]]): k in [0..n]]: n in [0..12]]; // G. C. Greubel, May 16 2019
    
  • Maple
    a:= (n, m)-> add(binomial(k, m)*binomial(n-k, k-m), k=0..n):
    seq(seq(a(n,m), m=0..n), n=0..12);  # Alois P. Heinz, Sep 19 2013
  • Mathematica
    Table[Sum[Binomial[k, m]*Binomial[n-k, k-m], {k,0,n}], {n,0,12}, {m,0,n}]
  • PARI
    {T(n,k) = sum(j=0,n, binomial(j,k)*binomial(n-j,j-k))}; \\ G. C. Greubel, May 16 2019
    
  • Sage
    [[sum(binomial(j,k)*binomial(n-j,j-k) for j in (0..n)) for k in (0..n)] for n in (0..12)] # G. C. Greubel, May 16 2019
    

Formula

From Philippe Deléham, Mar 05 2012: (Start)
T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k) - T(n-2,k-1), T(0,0) = T(1,0) = T(1,1) = 1 and T(n,k) = 0 if k<0 or if k>n.
G.f.: 1/(1-(1+y)*x-(1-y)*x^2).
Sum_{k, 0<=k<=n} T(n,k)*x^k = A077957(n), A000045(n+1), A000079(n), A001906(n+1), A007070(n), A116415(n), A084326(n+1), A190974(n+1), A190978(n+1), A190984(n+1), A190990(n+1), A190872(n+1) for x = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 respectively. (End)

A384889 Number of subsets of {1..n} with all equal lengths of maximal anti-runs (increasing by more than 1).

Original entry on oeis.org

1, 2, 4, 8, 14, 23, 37, 59, 93, 146, 230, 365, 584, 940, 1517, 2450, 3959, 6404, 10373, 16822, 27298, 44297, 71843, 116429, 188550, 305200, 493930, 799422, 1294108, 2095291, 3392736, 5493168, 8892148, 14390372, 23282110, 37660759, 60914308, 98528312, 159386110
Offset: 0

Views

Author

Gus Wiseman, Jun 18 2025

Keywords

Examples

			The subset {3,6,7,9,10,12} has maximal anti-runs ((3,6),(7,9),(10,12)), with lengths (2,2,2), so is counted under a(12).
The a(0) = 1 through a(4) = 14 subsets:
  {}  {}   {}     {}       {}
      {1}  {1}    {1}      {1}
           {2}    {2}      {2}
           {1,2}  {3}      {3}
                  {1,2}    {4}
                  {1,3}    {1,2}
                  {2,3}    {1,3}
                  {1,2,3}  {1,4}
                           {2,3}
                           {2,4}
                           {3,4}
                           {1,2,3}
                           {2,3,4}
                           {1,2,3,4}
		

Crossrefs

For runs instead of anti-runs we have A243815, distinct A384175, complement A384176.
For distinct instead or equal lengths we have A384177, ranks A384879.
For partitions instead of subsets we have A384888.
A034296 counts flat or gapless partitions, ranks A066311 or A073491.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A047966 counts uniform partitions (equal multiplicities), ranks A072774.
A384893 counts subsets by number of maximal anti-runs, for partitions A268193, A384905.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],SameQ@@Length/@Split[#,#2!=#1+1&]&]],{n,0,10}]
  • PARI
    lista(n)=Vec(sum(i=1,(n+1)\2,1/(1-x^(2*i-1)/(1-x)^(i-1))-1,1-x+O(x*x^n))/(1-x)^2) \\ Christian Sievers, Jun 20 2025

Formula

G.f.: ( Sum_{i>=1} (1/(1-x^(2*i-1)/(1-x)^(i-1))-1) + 1-x ) / (1-x)^2. - Christian Sievers, Jun 21 2025

Extensions

a(21) and beyond from Christian Sievers, Jun 20 2025

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.

A385886 Irregular triangle read by rows listing the lengths of maximal anti-runs (sequences of distinct consecutive elements increasing by more than 1) of binary indices, duplicate rows removed.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 1, 1, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 3, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 2, 1, 3, 1, 2, 2, 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 A384877, 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 A384877.

Examples

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

Crossrefs

In the following references, "before" is short for "before removing duplicate rows".
Positions of singleton rows appear to be A001906 = A055588 - 1.
Positions of rows of the form (1,1,...) appear to be A001911-2, before A023758.
Row sums appear to be A200648, before A000120.
Row lengths appear to be A200649, before A384890.
Standard composition numbers of each row appear to be A348366.
Before we had A384877, ranks A385816, firsts A052499.
For runs instead of anti-runs we have A385817, see A245563, A245562, A246029.

Programs

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

A202064 Triangle T(n,k), read by rows, given by (2, -1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 1/2, -1/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 2, 0, 3, 1, 0, 4, 4, 0, 0, 5, 10, 1, 0, 0, 6, 20, 6, 0, 0, 0, 7, 35, 21, 1, 0, 0, 0, 8, 56, 56, 8, 0, 0, 0, 0, 9, 84, 126, 36, 1, 0, 0, 0, 0, 10, 120, 252, 120, 10, 0, 0, 0, 0, 0, 11, 165, 462, 330, 55, 1, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Philippe Deléham, Dec 10 2011

Keywords

Comments

Riordan array (x/(1-x)^2, x^2/(1-x)^2).
Mirror image of triangle in A119900.
A203322*A130595 as infinite lower triangular matrices. - Philippe Deléham, Jan 05 2011
From Gus Wiseman, Jul 07 2025: (Start)
Also the number of subsets of {1..n} containing n with k maximal runs (sequences of consecutive elements increasing by 1). For example, row n = 5 counts the following subsets:
{5} {1,5} {1,3,5}
{4,5} {2,5}
{3,4,5} {3,5}
{2,3,4,5} {1,2,5}
{1,2,3,4,5} {1,4,5}
{2,3,5}
{2,4,5}
{1,2,3,5}
{1,2,4,5}
{1,3,4,5}
For anti-runs instead of runs we have A053538.
Without requiring n see A210039, A202023, reverse A098158, A109446.
(End)

Examples

			Triangle begins :
1
2, 0
3, 1, 0
4, 4, 0, 0
5, 10, 1, 0, 0
6, 20, 6, 0, 0, 0
7, 35, 21, 1, 0, 0, 0
8, 56, 56, 8, 0, 0, 0, 0
		

Crossrefs

Cf. A007318, A005314 (antidiagonal sums), A119900, A084938, A130595, A203322.
Column k = 1 is A000027.
Row sums are A000079.
Column k = 2 is A000292.
Without zeros we have A034867.
Last nonzero term in each row appears to be A124625.
A034839 counts subsets by number of maximal runs, for anti-runs A384893.
A116674 counts strict partitions by number of maximal runs, for anti-runs A384905.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&Length[Split[#,#2==#1+1&]]==k&]],{n,12},{k,n}] (* Gus Wiseman, Jul 07 2025 *)

Formula

G.f.: 1/((1-x)^2-y*x^2).
Sum_{k, 0<=k<=n} T(n,k)*x^k = A000027(n+1), A000079(n), A000129(n+1), A002605(n+1), A015518(n+1), A063727(n), A002532(n+1), A083099(n+1), A015519(n+1), A003683(n+1), A002534(n+1), A083102(n), A015520(n+1), A091914(n) for x = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 10, 11, 12, 13 respectively.
T(n,k) = binomial(n+1,2k+1).
T(n,k) = 2*T(n-1,k) + T(n-2,k-1) - T(n-2,k), T(0,0) = 1, T(1,0) = 2, T(1,1) = 0 and T(n,k) = 0 if k<0 or if k>n. - Philippe Deléham, Mar 15 2012

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}]]

A385818 The number k such that the k-th composition in standard order lists the maximal run lengths of each nonnegative integer's binary indices, with duplicates removed.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 12, 16, 11, 13, 17, 14, 18, 20, 24, 32, 15, 19, 21, 25, 33, 22, 26, 34, 28, 36, 40, 48, 64, 23, 27, 35, 29, 37, 41, 49, 65, 30, 38, 42, 50, 66, 44, 52, 68, 56, 72, 80, 96, 128, 31, 39, 43, 51, 67, 45, 53, 69, 57, 73, 81, 97
Offset: 0

Views

Author

Gus Wiseman, Jul 18 2025

Keywords

Comments

A permutation of the nonnegative integers.
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.
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

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 14th composition in standard order, so A385889(53) = 14, and after removing duplicate rows a(16) = 14.
		

Crossrefs

For anti-runs instead of runs we appear to have A348366.
See also A385816 (standard compositions of rows of A384877), reverse A209859.
The compositions themselves are listed by A385817.
Before removing duplicates we had A385889.
A245563 lists run lengths of binary indices (ranks A246029), rev A245562, strict A328592.
A384175 counts subsets with all distinct lengths of maximal runs, complement A384176.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2;
    stcinv/@DeleteDuplicates[Table[Length/@Split[bpe[n],#2==#1+1&],{n,0,100}]]

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}]
Previous Showing 11-20 of 26 results. Next