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-2 of 2 results.

A357138 Minimal run-length of the n-th composition in standard order; a(0) = 0.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Sep 18 2022

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n. 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

			Composition 92 in standard order is (2,1,1,3), so a(92) = 1.
		

Crossrefs

See link for more sequences related to standard compositions.
The version for Heinz numbers of partitions is A051904, for parts A055396.
For parts instead of run-length we have A333768, maximal A333766.
The opposite (maximal) version is A357137.
For first instead of minimal we have A357180, last A357181.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[If[n==0,0,Min[Length/@Split[stc[n]]]],{n,0,100}]

A100573 Smallest difference between distinct prime divisors of n, or 0 if n is a prime power.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 1, 0, 5, 2, 0, 0, 1, 0, 3, 4, 9, 0, 1, 0, 11, 0, 5, 0, 1, 0, 0, 8, 15, 2, 1, 0, 17, 10, 3, 0, 1, 0, 9, 2, 21, 0, 1, 0, 3, 14, 11, 0, 1, 6, 5, 16, 27, 0, 1, 0, 29, 4, 0, 8, 1, 0, 15, 20, 2, 0, 1, 0, 35, 2, 17, 4, 1, 0, 3, 0, 39, 0, 1, 12, 41, 26, 9, 0, 1, 6, 21, 28, 45
Offset: 1

Views

Author

Leroy Quet, Jan 02 2005

Keywords

Examples

			For 30 = 2*3*5, 2 and 3 are separated by only 1, so a(30) = 1.
		

Crossrefs

Cf. also A046665, A297173.

Programs

  • Mathematica
    <Labos Elemer, Jan 05 2005 *)
    Table[Min[Differences[Transpose[FactorInteger[n]][[1]]]],{n,100}]/.\[Infinity]->0 (* Harvey P. Dale, Jul 27 2015 *)
  • PARI
    A100573(n) = if(omega(n)<=1,0,my(ps=factor(n)[,1]); vecmin(vector((#ps)-1,i,ps[i+1]-ps[i]))); \\ Antti Karttunen, Mar 03 2018

Extensions

More terms from Labos Elemer, Jan 05 2005
Showing 1-2 of 2 results.