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

A352516 Number of excedances (parts above the diagonal) of the n-th composition in standard order.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Mar 23 2022

Keywords

Comments

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. See also A000120, A059893, A070939, A114994, A225620.

Examples

			The 5392th composition in standard order is (2,2,4,5), with excedances {1,3,4}, so a(5392) = 3.
		

Crossrefs

Positions of first appearances are A104462.
The opposite version is A352514, counted by A352521 (first column A219282).
The weak opposite version is A352515, counted by A352522 (first A238874).
The weak version is A352517, counted by A352525 (first column A177510).
The triangle A352524 counts these compositions (first column A008930).
A008292 is the triangle of Eulerian numbers (version without zeros).
A011782 counts compositions.
A173018 counts permutations by number of excedances, weak A123125.
A238349 counts comps by fixed points, first col A238351, rank stat A352512.
A352487 is the excedance set of A122111.
A352523 counts comps by unfixed points, first A010054, rank stat A352513.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    pd[y_]:=Length[Select[Range[Length[y]],#
    				

A101305 Begin with 0 and at each successive iteration append the next power of 10.

Original entry on oeis.org

0, 10, 10100, 101001000, 10100100010000, 10100100010000100000, 101001000100001000001000000, 10100100010000100000100000010000000, 10100100010000100000100000010000000100000000, 101001000100001000001000000100000001000000001000000000
Offset: 0

Views

Author

Jorge Coveiro, Dec 22 2004

Keywords

Examples

			a(1) = 10;
a(2) = 10100 (concatenate 10 and 100);
a(3) = 101001000 (concatenate 10, 100 and 1000);
a(4) = 10100100010000.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := FromDigits[ Flatten[ Table[ IntegerDigits[10^i], {i, n}]]]; Table[ f[n], {n, 8}] (* Robert G. Wilson v, Dec 22 2004 *)
    nxt[{n_,a_}]:={n+1,FromDigits[Join[IntegerDigits[a],IntegerDigits[ 10^(n+1)]]]}; NestList[nxt,{0,0},10][[All,2]] (* Harvey P. Dale, Oct 26 2020 *)
  • Python
    def a(n): return 0 if n==0 else int("".join("1"+"0"*(i+1) for i in range(n)))
    print([a(n) for n in range(10)]) # Michael S. Branicky, Jun 28 2022
    
  • Python
    def A101305(n): return 10**n*sum(10**(k*((n<<1)-k+1)>>1) for k in range(n)) # Chai Wah Wu, Aug 05 2025

Extensions

Edited by Robert G. Wilson v, Dec 22 2004

A104645 Difference between the previous and the next primes to x, where x is the number obtained from concatenation of the first n primes (A019518).

Original entry on oeis.org

10, 6, 20, 24, 24, 60, 18, 48, 100, 48, 156, 74, 88, 68, 42, 126, 366, 106, 186, 136, 228, 104, 30, 246, 52, 218, 814, 58, 536, 174, 90, 924, 180, 298, 120, 330, 96, 508, 504, 60, 762, 588, 330, 138, 552, 726, 452, 634, 660, 354, 534, 1770, 52, 262, 834, 790, 250, 624
Offset: 2

Views

Author

Labos Elemer, Mar 18 2005

Keywords

Examples

			For n=4, concatenate(2,3,5,7) gives 2357. The closest other primes are 2371 and 2351 and their difference is a(4)=20.
		

Crossrefs

Programs

Formula

a(n) = A151800(A019518(n)) - A151799(A019518(n)).

Extensions

Corrected, extended, and edited by Charles R Greathouse IV, Apr 28 2010
Showing 1-3 of 3 results.