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-10 of 470 results. Next

A144328 A002260 preceded by a column of 1's: a (1, 1, 2, 3, 4, 5, ...) crescendo triangle by rows.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Sep 18 2008

Keywords

Comments

Row sums = A000124.
Eigensequence of the triangle = A000142, the factorials.
The triangle as an infinite lower triangular matrix * [1,2,3,...] = A064999.
Generated from A128227 by rotating each row by one position to the right. - R. J. Mathar, Sep 25 2008
A sequence B is called a reluctant sequence of sequence A, if B is triangle array read by rows: row number k coincides with first k elements of the sequence A. Sequence A144328 is the reluctant sequence of A028310 (1 followed by the natural numbers). - Boris Putievskiy, Dec 12 2012
If offset were changed to 0, a(n) would equal the
Let S_n be the set of partitions of n into distinct parts where the number of parts is maximal for that n. For example, for n=6, the set S_6 consists of just one such partition: S_6={1,2,3}. Similarly, for n=7, S_7={1,2,4}, But for n=8, S_8 will contain two partitions S_8= { {1,2,5}, {1,3,4} }. Then |S(n)| = a(n+1). Cf. A178702. - David S. Newman and Benoit Jubin, Dec 13 2010

Examples

			First few rows of the triangle:
  1;
  1, 1;
  1, 1, 2;
  1, 1, 2, 3;
  1, 1, 2, 3, 4;
  1, 1, 2, 3, 4, 5;
  ...
		

Crossrefs

Programs

  • Haskell
    a144328 n k = a144328_tabl !! (n-1) !! (k-1)
    a144328_row n = a144328_tabl !! (n-1)
    a144328_tabl = [1] : map (\xs@(x:_) -> x : xs) a002260_tabl
    -- Reinhard Zumkeller, Apr 29 2015
    
  • Mathematica
    Flatten[Table[Join[{1},Range[n]],{n,0,11}]] (* Harvey P. Dale, Aug 10 2013 *)
  • Python
    from math import comb, isqrt
    def A144328(n): return n-comb((m:=isqrt(k:=n<<1))+(k>m*(m+1)),2)-(comb(isqrt(n-1<<1)+1,2)!=n-1) # Chai Wah Wu, Nov 08 2024

Formula

Triangle A002260 (natural numbers crescendo triangle) preceded by a column of 1's, = a (1, 1, 2, 3, 4, 5, ...) crescendo triangle by rows.
a(n) = A028310(m-1), where m = n-t*(t+1)/2, t = floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Dec 13 2012
a(n) = A002260(n)+A010054(n-1)-1. - Chai Wah Wu, Nov 08 2024

A131818 A130296 + A002260 - A000012. Triangle read by rows: row n consists of n, 2, 3, 4, ..., n.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Jul 18 2007

Keywords

Comments

Row sums = A034856; (1, 4, 8, 13, 19, 26, 34, ...).

Examples

			First few rows of the triangle:
  1;
  2, 2;
  3, 2, 3;
  4, 2, 3, 4;
  5, 2, 3, 4, 5;
  6, 2, 3, 4, 5, 6;
  7, 2, 3, 4, 5, 6, 7;
  ...
		

Crossrefs

Programs

  • Mathematica
    Table[Join[{n},Range[2,n]],{n,15}]//Flatten (* Harvey P. Dale, Feb 24 2021 *)
  • PARI
    t(n, k) = if (k==1, n, k); \\ Michel Marcus, Feb 12 2014
    
  • Python
    from math import isqrt, comb
    def A131818(n):
        y = (m:=isqrt(k:=n-1<<1))+(k>m*(m+1))
        return n-comb(y,2) # Chai Wah Wu, Jul 07 2025

Formula

A130296 + A002260 - A000012 as infinite lower triangular matrices.
T(n, 1) = n, T(n, k) = k for k > 1. - Michel Marcus, Feb 12 2014

Extensions

More terms from Michel Marcus, Feb 12 2014

A169581 Positions in A002260(n) and A002024(n) when canonically enumerating A038566(n)/A038567(n), the positive rational numbers <= 1.

Original entry on oeis.org

1, 2, 4, 5, 7, 9, 11, 12, 13, 14, 16, 20, 22, 23, 24, 25, 26, 27, 29, 31, 33, 35, 37, 38, 40, 41, 43, 44, 46, 48, 52, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 71, 73, 77, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 94, 96, 100, 102, 104, 106, 107, 109, 112, 113
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 02 2009

Keywords

Comments

A038566(n) = A002260(a(n)); A038567(n) = A002024(a(n));
A054521(a(n)) = 1; complement of A169582.

A333516 Irregular triangle read by rows in which row n lists the first A000217(n) terms of A002260, n >= 1.

Original entry on oeis.org

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

Views

Author

Andrew Slattery, Mar 25 2020

Keywords

Comments

a(n) equals the difference between n and the largest number less than n that can be expressed as the sum of the i-th triangular number and the j-th tetrahedral number for integers i < j.

Examples

			Triangle begins:
  1;
  1, 1, 2;
  1, 1, 2, 1, 2, 3;
  1, 1, 2, 1, 2, 3, 1, 2, 3, 4;
  1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5;
  1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6;
  1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7;
  ...
		

Crossrefs

Row sums give A000292.
Right border gives A000027.

Programs

  • Maple
    T:= n-> seq([$1..i][], i=1..n):
    seq(T(n), n=1..7);  # Alois P. Heinz, Apr 10 2020
  • Python
    from math import comb, isqrt
    from sympy import integer_nthroot
    def A333516(n): return (r:=n-1-comb((m:=integer_nthroot(6*n,3)[0])+(n>comb(m+2,3))+1,3))-comb((k:=isqrt(m:=r+1<<1))+(m>k*(k+1)),2)+1 # Chai Wah Wu, Nov 10 2024

Formula

a(n) = A002260(A124171(n)).

A128227 Right border (1,1,1,...) added to A002260.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Feb 19 2007

Keywords

Comments

Row sums = A000124: (1, 2, 4, 7, 11, 16, ...). n* each term of the triangle gives A128228, having row sums A006000: (1, 4, 12, 28, 55, ...).
Eigensequence of the triangle = A005425: (1, 2, 5, 14, 43, ...). - Gary W. Adamson, Aug 27 2010
From Franck Maminirina Ramaharo, Aug 25 2018: (Start)
T(n,k) is the number of binary words of length n having k letters 1 such that no 1's lie between any pair of 0's.
Let n lines with equations y = (i - 1)*x - (i - 1)^2, i = 1..n, be drawn in the Cartesian plane. For each line, call the half plane containing the point (-1,1) the upper half plane and the other half the lower half-plane. Then T(n,k) is the number of regions that are the intersections of k upper half-planes and n-k lower half-planes. Here, T(0,0) = 1 corresponds to the plane itself. A region obtained from this arrangement of lines can be associated with a length n binary word such that the i-th letter indicates whether the region is located at the i-th upper half-plane (letter 1) or at the lower half-plane (letter 0).
(End)

Examples

			First few rows of the triangle are:
1;
1, 1;
1, 2, 1;
1, 2, 3, 1;
1, 2, 3, 4, 1;
1, 2, 3, 4, 5, 1;
1, 2, 3, 4, 5, 6, 1;
1, 2, 3, 4, 5, 6, 7, 1;
1, 2, 3, 4, 5, 6, 7, 8, 1;
...
From _Franck Maminirina Ramaharo_, Aug 25 2018: (Start)
For n = 5, the binary words are
(k = 0) 00000;
(k = 1) 10000, 00001;
(k = 2) 11000, 10001, 00011;
(k = 3) 11100, 11001, 10011, 00111;
(k = 4) 11110, 11101, 11011, 10111, 01111;
(k = 5) 11111.
(End)
		

Crossrefs

Programs

  • Mathematica
    (* first n rows of the triangle *)
    a128227[n_] := Table[If[r==q, 1, q], {r, 1, n}, {q, 1, r}]
    Flatten[a128227[13]] (* data *)
    TableForm[a128227[5]] (* triangle *)
    (* Hartmut F. W. Hoft, Jun 10 2017 *)
  • Maxima
    T(n, k) := if n = k then 1 else k + 1$
    for n:0 thru 10 do print(makelist(T(n, k), k, 0, n)); /* Franck Maminirina Ramaharo, Aug 25 2018 */
  • Python
    def T(n, k): return 1 if n==k else k
    for n in range(1, 11): print([T(n, k) for k in range(1, n + 1)]) # Indranil Ghosh, Jun 10 2017
    
  • Python
    from math import comb, isqrt
    def A128227(n): return n-comb(r:=(m:=isqrt(k:=n+1<<1))+(k>m*(m+1))+1,2)+(2 if k==m*(m+1) else r) # Chai Wah Wu, Nov 09 2024
    

Formula

"1" added to each row of "start counting again": (1; 1,2; 1,2,3,...) such that a(1) = 1, giving: (1; 1,1; 1,2,1;...).
T(n,k) = k if 1<=kHartmut F. W. Hoft, Jun 10 2017
From Franck Maminirina Ramaharo, Aug 25 2018: (Start)
The n-th row are the coefficients in the expansion of ((x^2 + (n - 2)*x - n)*x^n + 1)/(x - 1)^2.
G.f. for column k: ((k*x + 1)*x^k)/(1 - x). (End)

A020903 Lim f(f(...f(n))) where f is the fractal sequence given by f(n)=A002260(n+1).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Suppose that f(1), f(2), f(3),... is a fractal sequence (a sequence which contains itself as a proper subsequence, such as 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, ...; if the first occurrence of each n is deleted, the remaining sequence is identical to the original; see the Wikipedia article for details). Then for each n>=1, the limit L(n) of composites f(f(f...f(n)...)) exists and is one of the numbers in the set {k : f(k)=k}. If f(2)>2, then L(n)=1 for all n; if f(2)=2 and f(3)>3, then L(n) is 1 or 2 for all n, etc. Examples: A020903, A191770, A191774.
Conjecture: a(n) and a(n+1) are never both 2. - Robert Israel, Sep 03 2015
From Michel Dekking, Apr 09 2016: (Start)
Proof of the conjecture: Let f(n)=A002260(n+1)=1,2,1,2,3,1,2,3,4,... Then (f(n)) is a concatenation of ladders 1,2 followed by 1,2,3 followed by 1,2,3,4 etc. The proof is by induction. Note that the sequence (a(n)) can be seen as map from the positive integers to the positive integers. The induction starts from the observation that a(1) and a(2) are not both 2.
We use that f(k)2. Any pair (k,k+1) from a ladder has image (a(k),a(k+1)) = (a(f(k)),a(f(k+1))), which occurs either as image of two adjacent integers (j,j+1) earlier in the sequence, and so will not be equal to (2,2) by the induction hypothesis, or as image of a pair (j,1), whose image is also not equal to (2,2). The same holds for a pair consisting of the end of a ladder and the next entry. (End)

Examples

			f=(1,2,1,2,3,1,2,3,4,1,2,3,4,5,1,2,3,4,5,6,...); write
n->n1->n2-> to mean n1=f(n), n2=f(n1),... Then
1->1, 2->2, 3->1, 4->2, 5->3->1, 6->1, 7->2, ...
		

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember; local t; t:= floor((sqrt(8*n+1)-1)/2); procname(n+1-t*(t+1)/2) end proc:
    f(1):= 1: f(2):=2:
    seq(f(i),i=1..1000); # Robert Israel, Sep 03 2015
  • Mathematica
    m[n_] := Floor[(-1 + Sqrt[8 n - 7])/2];
    b[n_] := n - m[n] (m[n] + 1)/2; f[n_] := b[n + 1];
    Table[m[n], {n, 1, 100}]      (*A003056*)
    Table[f[n], {n, 1, 100}]      (*A002260(n+1)*)
    h[n_] := Nest[f, n, 40]
    t = Table[h[n], {n, 1, 300}]  (* A020903 *)
    Flatten[Position[t, 1]]       (* A191777 *)
    Flatten[Position[t, 2]]       (* A020904 *)

A056534 Mapping from the ordering by product (A027750, A056538) to the ordering by sum (A002260, A004736) of ordered pairs (a,b), a>=1, b>=1.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 5, 10, 11, 15, 16, 8, 9, 21, 22, 28, 29, 12, 14, 36, 37, 13, 45, 46, 17, 20, 55, 56, 66, 67, 23, 18, 19, 27, 78, 79, 91, 92, 30, 35, 105, 106, 24, 26, 120, 121, 38, 25, 44, 136, 137, 153, 154, 47, 31, 34, 54, 171, 172, 190, 191, 57, 32, 33, 65, 210, 211, 39
Offset: 1

Views

Author

Antti Karttunen, Jun 20 2000

Keywords

Examples

			The "ordering by sum": (1,1),(1,2),(2,1),(1,3),(2,2),(3,1),(1,4),(2,3),(3,2),(4,1),...
The "ordering by product": (1,1),(1,2),(2,1),(1,3),(3,1),(1,4),(2,2),(4,1),(1,5),(5,1),...
		

Crossrefs

Inverse: A056535.

Programs

  • Maple
    ordered_pair_perm := proc(upto_n) local a,i,j; a := []; for i from 1 to upto_n do for j in sort(divisors(i)) do a := [op(a),binomial(((i/j) + j - 1),2)+j]; od; od; RETURN(a); end;
  • Mathematica
    max = 21; A056534 = {}; For[i = 1, i <= max, i++, Do[ AppendTo[ A056534, Binomial[i/j + j - 1, 2] + j], {j, Divisors[i]}]]; A056534 (* Jean-François Alcover, Oct 05 2012, after Maple *)

A065562 a(n) = b(n)-th highest positive integer not equal to any a(k), 1 <= k < n, where {b(n)} = 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, ... (sequence A002260).

Original entry on oeis.org

1, 2, 4, 3, 6, 8, 5, 9, 11, 13, 7, 12, 15, 17, 19, 10, 16, 20, 22, 24, 26, 14, 21, 25, 28, 30, 32, 34, 18, 27, 31, 35, 37, 39, 41, 43, 23, 33, 38, 42, 45, 47, 49, 51, 53, 29, 40, 46, 50, 54, 56, 58, 60, 62, 64, 36, 48, 55, 59, 63, 66, 68, 70, 72, 74, 76, 44, 57, 65, 69, 73, 77
Offset: 1

Views

Author

Leroy Quet, Nov 29 2001

Keywords

Comments

Every positive integer occurs once and only once somewhere in this sequence.

Examples

			b(6) = 3, so a(6) = 8 = 3rd-highest positive integer not equal to 1, 2, 4, 3, or 6 (the values of a(k), 1 <= k < 6).
		

Crossrefs

Programs

  • Mathematica
    Block[{a = {1}, s = Rest@ Range[96], r}, r = Flatten@ Map[Range, {1}~Join~Differences@ Most@ Reap[Do[If[Sow[PolygonalNumber@ i] > Last@ s, Break[]], {i, Infinity}]][[-1, 1]] ]; Do[AppendTo[a, s[[r[[i]] ]]]; s = Complement[s, a], {i, 2, 3 Max[s]/4}]; a] (* Michael De Vlieger, Sep 23 2017 *)

A127777 A127773 * A002260 as infinite lower triangular matrices.

Original entry on oeis.org

1, 3, 6, 6, 12, 18, 10, 20, 30, 40, 15, 30, 45, 60, 75, 21, 42, 63, 84, 105, 126, 28, 56, 84, 112, 140, 168, 196, 36, 72, 108, 144, 180, 216, 252, 288, 45, 90, 135, 180, 225, 270, 315, 360, 405, 55, 110, 165, 220, 275, 330, 385, 440, 495, 550, 66, 132, 198
Offset: 1

Views

Author

Gary W. Adamson, Jan 28 2007

Keywords

Comments

Triangular number transform of A002260.
Swapped order of the factors: A002260 * A127773 = A127778.

Examples

			First few rows of the triangle:
   1;
   3,  6;
   6, 12, 18;
  10, 20, 30, 40;
  15, 30, 45, 60, 75;
  ...
		

Crossrefs

Cf. A000217, A127773, A000537 (row sums), A127778.

Programs

  • Maple
    T(n,k):=piecewise(k<=n,k*binomial(n+1,n-1),nMircea Merca, Apr 11 2012
  • Mathematica
    Table[k*Binomial[n+1,n-1],{n,20},{k,n}]//Flatten (* Harvey P. Dale, Oct 26 2016 *)

Formula

T(n,k) = k*binomial(n+1,n-1) = Sum_{i=1..k} i*binomial(k,i)*binomial(n+2-k,n-i), 1 <= k <= n. - Mircea Merca, Apr 11 2012

Extensions

More terms from Harvey P. Dale, Oct 26 2016

A128179 A097807 * A002260.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Feb 17 2007

Keywords

Comments

Row sums = A002620: (1, 2, 4, 6, 9, 12, 16, 20, 25, 30, ...).
General case see A211161. Let B and C be sequences. By b(n) and c(n) denote elements B and C respectively. Table T(n,k) = b(n), if k is odd, c(k) if k is even read by antidiagonals. For this sequence b(n)=n, b(n)=A000027(n), c(n)=0, c(n)=A000004(n). - Boris Putievskiy, Feb 05 2013

Examples

			From _Boris Putievskiy_, Feb 05 2013: (Start)
The start of the sequence as a table:
  1, 0, 1, 0, 1, 0, 1, ...
  2, 0, 2, 0, 2, 0, 2, ...
  3, 0, 3, 0, 3, 0, 3, ...
  4, 0, 4, 0, 4, 0, 4, ...
  5, 0, 5, 0, 5, 0, 5, ...
  6, 0, 6, 0, 6, 0, 6, ...
  7, 0, 7, 0, 7, 0, 7, ...
  ... (End)
First few rows of the triangle:
  1;
  0, 2;
  1, 0, 3;
  0, 2, 0, 4;
  1, 0, 3, 0, 5;
  0, 2, 0, 4, 0, 6;
  1, 0, 3, 0, 5, 0, 7;
  ...
		

Crossrefs

Formula

A097807 * A002260 as infinite lower triangular matrices. k-th column = (k, 0, k, 0, ...).
From Boris Putievskiy, Feb 05 2013: (Start)
T(n,k) = (1-(-1)^k)*n/2;
a(n) = (1-(-1)^A004736(n))*A002260(n)/2;
a(n) = (1-(-1)^j)*i/2, where i = n-t*(t+1)/2, j = (t*t+3*t+4)/2-n, t = floor((-1+sqrt(8*n-7))/2). (End)
Showing 1-10 of 470 results. Next