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.

A012257 Irregular triangle read by rows: row 0 is {2}; if row n is {r_1, ..., r_k} then row n+1 is {r_k 1's, r_{k-1} 2's, r_{k-2} 3's, etc.}.

Original entry on oeis.org

2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 2, 3, 4, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 6, 7, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9, 10, 10, 11, 12, 13, 14
Offset: 0

Views

Author

Lionel Levine (levine(AT)ultranet.com)

Keywords

Comments

I have sometimes referred to this as Lionel Levine's triangle in lectures. - N. J. A. Sloane, Mar 21 2021
The shape of each row tends to a limit curve when scaled to a fixed size. It is the same limit curve as this continuous version: start with f_0=x over [0,1]; then repeatedly reverse (1-x), integrate from zero (x-x^2/2), scale to 1 (2x-x^2) and invert (1-sqrt(1-x)). For the limit curve we have f'(0) = F(1) = lim A011784(n+2)/(A011784(n+1)*A011784(n)) ~ 0.27887706 (obtained numerically). - Martin Fuller, Aug 07 2006

Examples

			Initial rows are:
{2},
{1,1},
{1,2},
{1,1,2},
{1,1,2,3},
{1,1,1,2,2,3,4},
{1,1,1,1,2,2,2,3,3,4,4,5,6,7},
...
		

Crossrefs

Programs

  • Haskell
    a012257 n k = a012257_tabf !! (n-1) !! (k-1)
    a012257_row n = a012257_tabf !! (n-1)
    a012257_tabf = iterate (\row -> concat $
                            zipWith replicate (reverse row) [1..]) [1, 1]
    -- Reinhard Zumkeller, Aug 11 2014, May 30 2012
  • Maple
    T:= proc(n) option remember; `if`(n=0, 2, (h->
          seq(i$h[-i], i=1..nops(h)))([T(n-1)]))
        end:
    seq(T(n), n=0..8);  # Alois P. Heinz, Mar 31 2021
  • Mathematica
    row[1] = {1, 1}; row[n_] := row[n] = MapIndexed[ Function[ Table[#2 // First, {#1}]], row[n-1] // Reverse] // Flatten; Array[row, 7] // Flatten (* Jean-François Alcover, Feb 10 2015 *)
    NestList[Flatten@ MapIndexed[ConstantArray[First@ #2, #1] &, Reverse@ #] &, {1, 1}, 6] // Flatten (* Michael De Vlieger, Jul 12 2017 *)

Formula

Sum of row n = A011784(n+2); e.g. row 5 is {1, 1, 1, 2, 2, 3, 4} and the sum of the elements is 1+1+1+2+2+3+4 = 14 = A011784(7). - Benoit Cloitre, Aug 06 2003
T(n,A011784(n+1)) = A011784(n). - Reinhard Zumkeller, Aug 11 2014

Extensions

Initial row {2} added by N. J. A. Sloane, Mar 21 2021

A304679 A prime-multiplicity (or run-length) describing recurrence: a(n+1) = A181821(a(n)).

Original entry on oeis.org

3, 4, 6, 18, 450, 205439850, 241382525361273331926149714645357743772646450
Offset: 0

Views

Author

Gus Wiseman, May 16 2018

Keywords

Comments

The first entry 3 is optional so has offset 0.

Examples

			The list of multisets with Heinz numbers in the sequence is A014643. The number of k's in row n + 1 is equal to the k-th term of row n. The length of row n is A014644(n).
        3: {2}
        4: {1,1}
        6: {1,2}
       18: {1,2,2}
      450: {1,2,2,3,3}
205439850: {1,2,2,3,3,4,4,4,5,5,5}
		

Crossrefs

Programs

  • Mathematica
    Function[m,Times@@Prime/@m]/@NestList[Join@@Table[Table[i,{#[[i]]}],{i,Length[#]}]&,{2},6]

A014644 Form array starting with {1,1}; then i-th term in a row gives number of i's in next row; sequence is formed from final term in each row.

Original entry on oeis.org

1, 2, 2, 3, 5, 11, 38, 272, 6474, 1090483, 4363282578, 2940715000315189, 7930047000157075949085439, 14412592242471457956514645440241289655074, 70636608026754077888330819116433040562582634705380432362008848092
Offset: 1

Views

Author

Keywords

Examples

			a(5)=5 because 5 is the last number of the 5th row of A014643, (1,2,2,3,3,4,4,4,5,5,5).
		

Crossrefs

Programs

  • Mathematica
    NestList[Flatten@ MapIndexed[ConstantArray[First[#2], #1] &, #] &, {1, 1}, 8][[All, -1]] (* Michael De Vlieger, Dec 16 2021 *)

Formula

log a(n) grows like a constant times phi^n, where phi = golden ratio. - Colin Mallows
a(n) converges to a(n-2)*a(n-1)*phi (within 6 decimals for a(15)). - Johan Claes, Oct 02 2005
Limit_{n -> oo} a(n+2)/(a(n+1)*a(n)) = 1/phi. - Benoit Cloitre, Oct 13 2005

Extensions

a(1)-a(11) computed by Colin Mallows
a(12)-a(15) computed by Johan Claes Oct 02 2005
Showing 1-3 of 3 results.