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.

A167381 The numbers read down the left-center column of an arrangement of the natural numbers in square blocks.

Original entry on oeis.org

1, 3, 6, 10, 14, 18, 23, 29, 35, 41, 47, 53, 60, 68, 76, 84, 92, 100, 108, 116, 125, 135, 145, 155, 165, 175, 185, 195, 205, 215, 226, 238, 250, 262, 274, 286, 298, 310, 322, 334, 346, 358, 371, 385, 399, 413, 427, 441, 455, 469, 483, 497, 511, 525, 539, 553
Offset: 1

Views

Author

Paul Curtz, Nov 02 2009

Keywords

Comments

The natural numbers are filled into square blocks of edge length 2, 4, 6, 8, ...
by taking A016742(n+1) = 4, 16, 36, ... at a time:
.......1..2......
.......3..4......
....5..6..7..8...
....9.10.11.12...
...13.14.15.16...
...17.18.19.20...
21.22.23.24.25.26
27.28.29.30.31.32
33.34.35.36.37.38
39.40.41.42.43.44
Reading down the column just left from the center yields a(n).
The length of the rows is given by A001670.
The number of elements in each square block, 4, 16, 36, etc., are the first differences of A166464:
A016742(n) = A166464(n)-A166464(n-1).
Reading the blocks from right to left, row by row, we obtain a permutation of the integers, which starts similar to A166133.

Crossrefs

Cf. A113127, A167991 (first differences).

Programs

  • Mathematica
    r[1] = Range[4]; r[n_] := r[n] = Range[r[n-1][[-1]]+1, r[n-1][[-1]]+(2n)^2 ];
    s[n_] := Partition[r[n], Sqrt[Length[r[n]]]][[All, n]];
    A167381 = Table[s[n], {n, 1, 7}] // Flatten (* Jean-François Alcover, Mar 26 2017 *)
    Module[{nn=7,c},c=TakeList[Range[(2/3)*nn(nn+1)(2*nn+1)],(2*Range[ nn])^2]; Table[Take[c[[n]],{n,-1,2*n}],{n,nn}]]//Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 18 2018 *)

Extensions

Edited by R. J. Mathar, Aug 29 2010
More terms from Jean-François Alcover, Mar 26 2017

A284359 Double triangle (2*n+2 terms by row). Every row is 2*n + 1 followed by 2*n + 1 times 2*n + 2.

Original entry on oeis.org

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

Views

Author

Paul Curtz, Mar 25 2017

Keywords

Comments

In essence the same as A167991. - R. J. Mathar, Mar 27 2017

Examples

			1,  2,
3,  4,  4,  4,
5,  6,  6,  6,  6,  6,
7,  8,  8,  8,  8,  8,  8,  8,
9, 10, 10, 10, 10, 10, 10, 10, 10, 10,
... .
The row sum is A000466(n+1).
		

Crossrefs

Cf. A000466, A005408, A103517 (main diagonal), A167381.

Programs

  • Mathematica
    Table[2 n + 2 - Boole[k == 1], {n, 0, 8}, {k, 2 n + 2}] // Flatten (* Michael De Vlieger, Mar 25 2017 *)
  • PARI
    for(n=0, 10, for(k=1, 2*n + 2, print1(2*n + 2 - (k==1), ", ");); print();) \\ Indranil Ghosh, Mar 26 2017, translated from Mathematica code
    
  • Python
    for n in range(0, 11):
        print([2*n + 2 -(k==1) for k in range(1, 2*n + 3)])
    # Indranil Ghosh, Mar 26 2017

Formula

a(n) = A167381(n+1) - A167381(n).
Showing 1-2 of 2 results.