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

A158894 Sawtooth pattern of one, then two, then three, then four etc. consecutive odd numbers, starting each time at 3.

Original entry on oeis.org

3, 3, 5, 3, 5, 7, 3, 5, 7, 9, 3, 5, 7, 9, 11, 3, 5, 7, 9, 11, 13, 3, 5, 7, 9, 11, 13, 15, 3, 5, 7, 9, 11, 13, 15, 17, 3, 5, 7, 9, 11, 13, 15, 17, 19, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 3, 5, 7, 9, 11, 13, 15, 17, 19
Offset: 1

Views

Author

Paul Curtz, Mar 29 2009

Keywords

Comments

Obtained from A158405 by deleting the 1's, or from A141620 by deleting the positive numbers and flipping all signs.

Crossrefs

Programs

  • Mathematica
    sp[n_]:=Module[{cl=Range[3,51,2],l={}},Table[l=Join[l,Take[cl,i]], {i,n}];l ]; sp[15] (* Harvey P. Dale, Oct 30 2011 *)
    Table[Range[3,2n+1,2],{n,15}]//Flatten (* Harvey P. Dale, Jun 27 2025 *)
  • PARI
    forstep(m=3,9,2,forstep(n=3,m,2,print1(n", "))) \\ Charles R Greathouse IV, Oct 30 2011

Formula

a(A000124(i))=3, i>=0. - R. J. Mathar, Apr 04 2009

Extensions

Edited by R. J. Mathar, Apr 04 2009
Corrected by Harvey P. Dale, Oct 30 2011

A261819 Encoded symmetrical antidiagonal square binary matrices with either 1 or 2 ones.

Original entry on oeis.org

1, 6, 16, 40, 384, 576, 4096, 10240, 17408, 393216, 589824, 1081344, 16777216, 41943040, 71303168, 136314880, 6442450944, 9663676416, 17716740096, 34628173824, 1099511627776
Offset: 0

Views

Author

Eric Werley, Sep 24 2015

Keywords

Comments

We encode square matrices that have zeros everywhere except the antidiagonal where the antidiagonal is symmetric with either 1 or 2 ones in it. We do this by reading off digits antidiagonally to get a binary number and then convert the number to a base 10 number.

Examples

			The 3 X 3 matrix
0 0 0
0 1 0
0 0 0
gives 000010000. Writing this as a base 10 number gives a(2)=16.
The 4 X 4 matrix
0 0 0 0
0 0 1 0
0 1 0 0
0 0 0 0
gives 0000000110000000. Writing this as a base 10 number gives a(4)=384.
The 5 X 5 matrix
0 0 0 0 0
0 0 0 1 0
0 0 0 0 0
0 1 0 0 0
0 0 0 0 0
gives 0000000000010100000000000. Writing this as a base 10 number gives a(7)=10240.
		

Formula

a(n) = A261195(2^n).
a(n) = 2^(A000217(floor(sqrt(4*n + 1)) - 1)) * (((A262769(floor(n/2)) * 2^((floor(sqrt(4*n + 1)) - 2*A002260(+1))/2)) * (1+(-1)^(floor(sqrt(4*n + 1))))/2) + ((A262777(floor(n/2)) * 2^((floor(sqrt(4*n + 1)) - A158405(+1))/2)) * (1-(-1)^(floor(sqrt(4*n + 1))))/2)).

A095873 Triangle T(n,k) = (2*k-1)*(n+k-1)*(n-k+1) read by rows, 1<=k<=n.

Original entry on oeis.org

1, 4, 9, 9, 24, 25, 16, 45, 60, 49, 25, 72, 105, 112, 81, 36, 105, 160, 189, 180, 121, 49, 144, 225, 280, 297, 264, 169, 64, 189, 300, 385, 432, 429, 364, 225, 81, 240, 385, 504, 585, 616, 585, 480, 289, 100, 297, 480, 637, 756, 825
Offset: 1

Views

Author

Gary W. Adamson, Jun 10 2004

Keywords

Comments

Matrix square of A158405.

Examples

			[1 0 0 / 1 3 0 / 1 3 5]^2 = [1 0 0 / 4 9 0 / 9 24 25]. Delete the zeros and
read by rows:
1;
4, 9;
9, 24, 25;
16,45, 60, 49;
25,72,105,112, 81;
		

References

  • Albert H. Beiler, "Recreations in the Theory of Numbers", Dover, 1966.

Crossrefs

Programs

  • Maple
    A095873 := proc(n,k)
            (2*k-1)*(n+k-1)*(n-k+1) ;
    end proc:
    seq(seq(A095873(n,k),k=1..n),n=1..13) ; # R. J. Mathar, Oct 30 2011
  • Mathematica
    Table[(2k-1)(n+k-1)(n-k+1),{n,10},{k,n}]//Flatten (* Harvey P. Dale, May 03 2018 *)

Formula

T(n,k) = (2*k-1)*A094728(n,k).
Sum_{k=1..n} T(n,k)= n*(n+1)*(3*n^2+n-1)/6 = A103220(n). - R. J. Mathar, Oct 30 2011

Extensions

Definition in closed form by R. J. Mathar, Oct 30 2011

A211197 Table T(n,k) = 2*n + ((-1)^n)*(1/2 - (k-1) mod 2) - 1/2; n, k > 0, read by antidiagonals.

Original entry on oeis.org

1, 2, 4, 1, 3, 5, 2, 4, 6, 8, 1, 3, 5, 7, 9, 2, 4, 6, 8, 10, 12, 1, 3, 5, 7, 9, 11, 13, 2, 4, 6, 8, 10, 12, 14, 16, 1, 3, 5, 7, 9, 11, 13, 15, 17, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22
Offset: 1

Views

Author

Boris Putievskiy, Feb 03 2013

Keywords

Comments

In general, let B and C be sequences. By b(n) and c(n) denote elements B and C respectively. Table T(n,k) = (1-(-1)^k)*b(n)/2+(1+(-1)^k)*c(n)/2 read by antidiagonals.
For this sequence b(n)=2*n-1, b(n)=A005408(n), c(n)=2*n, c(n)=A005843(n).
If n is odd row T(n,k) is alternation b(n) and c(n) starts from b(n).
If n is even row T(n,k) is alternation c(n) and b(n) starts from c(n).
For this sequence if n is odd alternation numbers 2*n-1 and 2*n starts from 2*n-1.
For this sequence if n is even alternation numbers 2*n and 2*n-1 starts from 2*n.
T(n,k) is replication of the first and the second columns that are “a braid” from sequences B and C.

Examples

			The start of the sequence as table for general case:
  b(1)..c(1)..b(1)..c(1)..b(1)..c(1)..b(1)..c(1)..
  c(2)..b(2)..c(2)..b(2)..c(2)..b(2)..c(2)..b(2)..
  b(3)..c(3)..b(3)..c(3)..b(3)..c(3)..b(3)..c(3)..
  c(4)..b(4)..c(4)..b(4)..c(4)..b(4)..c(4)..b(4)..
  b(5)..c(5)..b(5)..c(5)..b(5)..c(5)..b(5)..c(5)..
  c(6)..b(6)..c(6)..b(6)..c(6)..b(6)..c(6)..b(6)..
  b(7)..c(7)..b(7)..c(7)..b(7)..c(7)..b(7)..c(7)..
  c(8)..b(8)..c(8)..b(8)..c(8)..b(8)..c(8)..b(8)..
  . . .
The start of the sequence as triangle array read by rows for general case:
  b(1);
  c(1),c(2);
  b(1),b(2),b(3);
  c(1),c(2),c(3),c(4);
  b(1),b(2),b(3),b(4),b(5);
  c(1),c(2),c(3),c(4),c(5),c(6);
  b(1),b(2),b(3),b(4),b(5),b(6),b(7);
  c(1),c(2),c(3),c(4),c(5),c(6),c(7),c(8);
. . .
Row number r contains r numbers.
If r is odd  b(1),b(2),...,b(r).
If r is even c(1),c(2),...,c(r).
The start of the sequence as table for b(n)=2*n-1 and c(n)=2*n:
  1....2...1...2...1...2...1...2...
  4....3...4...3...4...3...4...3...
  5....6...5...6...5...6...5...6...
  8....7...8...7...8...7...8...7...
  9...10...9..10...9..10...9..10...
  12..11..12..11..12..11..12..11...
  13..14..13..14..13..14..13..14...
  16..15..16..15..16..15..16..15...
  . . .
The start of the sequence as triangle array read by rows for  b(n)=2*n-1 and c(n)=2*n:
  1;
  2,4;
  1,3,5;
  2,4,6,8;
  1,3,5,7,9;
  2,4,6,8,10,12;
  1,3,5,7,9,11,13;
  2,4,6,8,10,12,14,16;
  . . .
Row number r contains r numbers.
If r is odd  1,3,...2*r-1 - coincides with the elements row number r triangle array read by rows for sequence 2*A002260-1.
If r is even 2,4,...,2*r  - coincides with the elements row number r triangle array read by rows for sequence 2*A002260.
		

Crossrefs

Programs

  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    result =2*i+((-1)**i)*(0.5 - (j-1) % 2) - 0.5
    
  • Python
    a211197_list = [2*n - k%2 for k in range(1, 13) for n in range(1, k+1)] # David Radcliffe, Jun 01 2025

Formula

For the general case:
As a table: T(n,k) = (1-(-1)^k)*b(n)/2+(1+(-1)^k)*c(n)/2.
As a linear sequence: a(n) = (1-(-1)^j)*b(i)/2+(1+(-1)^j)*c(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).
where b(n) = 2*n-1 and c(n) = 2*n.
As a table: T(n,k) = 2*n+((-1)^n)*(1/2- (k-1) mod 2) - 1/2.
As a linear sequence:
a(n) = 2*A002260(n) + ((-1)^A002260(n))*(1/2- (A004736(n)-1) mod 2) -1/2.
a(n) = -(1+(-1)^A003056(n))*A002260(n) +(1+(-1)^A003056(n))*(2*A002260(n)-1)/2.
a(n) = 2*i+((-1)^i)*(1/2- (j-1) mod 2) - 1/2
a(n) = -(1+(-1)^t)*i +(1+(-1)^t)*(2*i-1)/2,
where i = n-t*(t+1)/2, j = (t*t+3*t+4)/2-n, t = floor((-1+sqrt(8*n-7))/2).
T(n, k) = 2*n - 1 + (n+k mod 2); a(n) = 2*A002260(n) - A057211(n). - David Radcliffe, Jun 01 2025

A271668 Triangle read by rows. The first column is A000217(n+1). From the second row we apply - A002262(n) for the following terms of the row.

Original entry on oeis.org

1, 3, 3, 6, 6, 5, 10, 10, 9, 7, 15, 15, 14, 12, 9, 21, 21, 20, 18, 15, 11, 28, 28, 27, 25, 22, 18, 13, 36, 36, 35, 33, 30, 26, 21, 15, 45, 45, 44, 42, 39, 35, 30, 24, 17, 55, 55, 54, 52, 49, 45, 40, 34, 27, 19, 66, 66, 65, 63, 60, 56, 51, 45, 38, 30, 21
Offset: 0

Views

Author

Paul Curtz, Apr 12 2016

Keywords

Comments

Row sums: A084990(n+1).
A158405(n) = A002262(n) + A002260(n). See the formula.
(Without its first column, A094728 is A120070, which could be built from positive A005563 and -A158894.)

Examples

			a(0) = 1, a(1) = 3, a(2) =3-0 = 3,  a(3) = 6, a(4) =6-0= 6, a(5) =6-1= 5, ... .
Triangle:
1,
3,   3,
6,   6,  5,
10, 10,  9,  7,
15, 15, 14, 12,  9,
21, 21, 20, 18, 15, 11,
28, 28, 27, 25, 22, 18, 13,
36, 36, 35, 33, 30, 26, 21, 15,
etc.
		

Crossrefs

Programs

  • Mathematica
    Table[(n^2 - n)/2 - Prepend[Accumulate@ Range[0, n - 3], 0], {n, 12}] // Flatten (* Michael De Vlieger, Apr 12 2016 *)

Formula

a(n) = A094728(n+1) - A049780(n).

A158897 The elements of A059100 at indices of triangular numbers, padded with zeros.

Original entry on oeis.org

6, 0, 11, 0, 0, 18, 0, 0, 0, 27, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 83, 0, 0, 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 198, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Paul Curtz, Mar 29 2009

Keywords

Crossrefs

Cf. A144396.

Formula

a(t)=A059100(i+1) if t=A000217(i), else a(t)=0.
a(n)=A141620(n-1)+A158405(n+1).

Extensions

Edited and extended by R. J. Mathar, Apr 04 2009

A172049 Irregular triangle T(n,k) = 2k-1 with A008794(n+2) values in row n.

Original entry on oeis.org

1, 1, 1, 3, 5, 7, 1, 3, 5, 7, 1, 3, 5, 7, 9, 11, 13, 15, 17, 1, 3, 5, 7, 9, 11, 13, 15, 17, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43
Offset: 1

Views

Author

Paul Curtz, Jan 24 2010

Keywords

Comments

These are the values A172002(2*n)-A172002(2*n-1) arranged in a table by adding line breaks.
The last (and largest) numbers in the lines are in A056220(floor(n+1)/2).

Examples

			1;
1;
1, 3, 5, 7;
1, 3, 5, 7;
1, 3, 5, 7, 9, 11, 13, 15, 17;
1, 3, 5, 7, 9, 11, 13, 15, 17;
1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31;
1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31;
1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43,...
		

Crossrefs

Cf. A158405.

A174028 Triangle T(n,k) = 2+4k read by rows.

Original entry on oeis.org

2, 2, 6, 2, 6, 10, 2, 6, 10, 14, 2, 6, 10, 14, 18, 2, 6, 10, 14, 18, 22, 2, 6, 10, 14, 18, 22, 26, 2, 6, 10, 14, 18, 22, 26, 30, 2, 6, 10, 14, 18, 22, 26, 30, 34, 2, 6, 10, 14, 18, 22, 26, 30, 34, 38
Offset: 0

Views

Author

Paul Curtz, Mar 06 2010

Keywords

Examples

			2;
2, 6;
2, 6, 10;
2, 6, 10, 14;
2, 6, 10, 14, 18;
2, 6, 10, 14, 18, 22;
2, 6, 10, 14, 18, 22, 26;
		

Crossrefs

Cf. A001105 (row sums), A167268.

Formula

T(n,k) = A016825(k).
T(n,k) = 2*A158405(n+1,k).
Previous Showing 11-18 of 18 results.