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 10 results.

A183869 a(n) = n + floor(sqrt(4*n + 5)); complement of A004116.

Original entry on oeis.org

2, 4, 5, 7, 8, 10, 11, 12, 14, 15, 16, 18, 19, 20, 21, 23, 24, 25, 26, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100, 101, 102, 103, 104, 105, 106, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 119, 120
Offset: 0

Views

Author

Clark Kimberling, Jan 07 2011

Keywords

Comments

a(n-2) appears to be the minimum number of rectangular tiles to place on an n X n grid of unit squares, possibly of different sizes, such that each side of every tile lies on a grid line, every unit square is covered by at most one tile, and each row and each column of the grid has exactly one unit square that is not covered by any tile. - Yifan Xie, Jul 19 2025 [The conjecture is proven. - Yifan Xie, Jul 24 2025]

Crossrefs

Programs

  • Mathematica
    a=4; b=5; Table[n+Floor[(a*n+b)^(1/2)],{n,0,100}]
  • PARI
    a(n) = n + sqrtint(4*n+5); \\ Michel Marcus, Jul 19 2025

A003022 Length of shortest (or optimal) Golomb ruler with n marks.

Original entry on oeis.org

1, 3, 6, 11, 17, 25, 34, 44, 55, 72, 85, 106, 127, 151, 177, 199, 216, 246, 283, 333, 356, 372, 425, 480, 492, 553, 585
Offset: 2

Views

Author

Keywords

Comments

a(n) is the least integer such that there is an n-element set of integers between 0 and a(n), the sums of pairs (of not necessarily distinct elements) of which are distinct.
From David W. Wilson, Aug 17 2007: (Start)
An n-mark Golomb ruler has a unique integer distance between any pair of marks and thus measures n(n-1)/2 distinct integer distances.
An optimal n-mark Golomb ruler has the smallest possible length (distance between the two end marks) for an n-mark ruler.
A perfect n-mark Golomb ruler has length exactly n(n-1)/2 and measures each distance from 1 to n(n-1)/2. (End)
Positions where A143824 increases (see also A227590). - N. J. A. Sloane, Apr 08 2016
From Gus Wiseman, May 17 2019: (Start)
Also the smallest m such that there exists a length-n composition of m for which every restriction to a subinterval has a different sum. Representatives of compositions for the first few terms are:
0: ()
1: (1)
3: (2,1)
6: (2,3,1)
11: (3,1,5,2)
17: (4,2,3,7,1)
Representatives of corresponding Golomb rulers are:
{0}
{0,1}
{0,2,3}
{0,2,5,6}
{0,3,4,9,11}
{0,4,6,9,16,17}
(End)

Examples

			a(5)=11 because 0-1-4-9-11 (0-2-7-10-11) resp. 0-3-4-9-11 (0-2-7-8-11) are shortest: there is no b0-b1-b2-b3-b4 with different distances |bi-bj| and max. |bi-bj| < 11.
		

References

  • CRC Handbook of Combinatorial Designs, 1996, p. 315.
  • A. K. Dewdney, Computer Recreations, Scientific Amer. 253 (No. 6, Jun), 1985, pp. 16ff; 254 (No. 3, March), 1986, pp. 20ff.
  • S. W. Golomb, How to number a graph, pp. 23-37 of R. C. Read, editor, Graph Theory and Computing. Academic Press, NY, 1972.
  • Richard K. Guy, Unsolved Problems in Number Theory (2nd edition), Springer-Verlag (1994), Section C10.
  • A. Kotzig and P. J. Laufer, Sum triangles of natural numbers having minimum top, Ars. Combin. 21 (1986), 5-13.
  • Miller, J. C. P., Difference bases. Three problems in additive number theory. Computers in number theory (Proc. Sci. Res. Council Atlas Sympos. No. 2, Oxford, 1969), pp. 299--322. Academic Press, London,1971. MR0316269 (47 #4817)
  • Rhys Price Jones, Gracelessness, Proc. 10th S.-E. Conf. Combin., Graph Theory and Computing, 1979, pp. 547-552.
  • Ana Salagean, David Gardner and Raphael Phan, Index Tables of Finite Fields and Modular Golomb Rulers, in Sequences and Their Applications - SETA 2012, Lecture Notes in Computer Science. Volume 7280, 2012, pp. 136-147.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A106683 for triangle of marks.
0-1-4-9-11 corresponds to 1-3-5-2 in A039953: 0+1+3+5+2=11
A row or column of array in A234943.
Adding 1 to these terms gives A227590. Cf. A143824.
For first differences see A270813.

Programs

  • Mathematica
    Min@@Total/@#&/@GatherBy[Select[Join@@Permutations/@Join@@Table[IntegerPartitions[i],{i,0,15}],UnsameQ@@ReplaceList[#,{_,s__,_}:>Plus[s]]&],Length] (* Gus Wiseman, May 17 2019 *)
  • Python
    from itertools import combinations, combinations_with_replacement, count
    def a(n):
        for k in count(n-1):
            for c in combinations(range(k), n-1):
                c = c + (k, )
                ss = set()
                for s in combinations_with_replacement(c, 2):
                    if sum(s) in ss: break
                    else: ss.add(sum(s))
                if len(ss) == n*(n+1)//2: return k # Jianing Song, Feb 14 2025, adapted from the python program of A345731

Formula

a(n) >= n(n-1)/2, with strict inequality for n >= 5 (Golomb). - David W. Wilson, Aug 18 2007

Extensions

425 sent by Ed Pegg Jr, Nov 15 2004
a(25), a(26) proved by OGR-25 and OGR-26 projects, added by Max Alekseyev, Sep 29 2010
a(27) proved by OGR-27, added by David Consiglio, Jr., Jun 09 2014
a(28) proved by OGR-28, added by David Consiglio, Jr., Jan 19 2023

A014616 a(n) = solution to the postage stamp problem with 2 denominations and n stamps.

Original entry on oeis.org

2, 4, 7, 10, 14, 18, 23, 28, 34, 40, 47, 54, 62, 70, 79, 88, 98, 108, 119, 130, 142, 154, 167, 180, 194, 208, 223, 238, 254, 270, 287, 304, 322, 340, 359, 378, 398, 418, 439, 460, 482, 504, 527, 550, 574, 598, 623, 648, 674, 700, 727, 754, 782, 810, 839, 868
Offset: 1

Views

Author

Keywords

Comments

Fred Lunnon [W. F. Lunnon] defines "solution" to be the smallest value not obtainable by the best set of stamps. The solutions given are one lower than this, that is, the sequence gives the largest number obtainable without a break using the best set of stamps.
a(n-2), for n >= 3, is the number of independent entries of a bisymmetric n X n matrix B_n with B_n[1,1] and B_n[n,n] fixed. Hence a(n-2) = A002620(n+1) - 2. See the Jul 07 2015 comment on A002620. For n=1 and n=2 this matrix B_n is fixed. Bisymmetric matrices B_n, with B_n[1,1] and B_n[n,n] fixed, are, for n >= 3, determined by giving the a(n-2) entries for [1,2], ...., [1,n-1]; [2,2], ..., [2,n-1]; [3,3], ..., [3,n-2]; ..., [ceiling(n/2),n-(ceiling(n/2)-1)]. - Wolfdieter Lang, Aug 16 2015
a(n-1) is the largest possible n-th element in an additive basis of order 2. - Charles R Greathouse IV, May 05 2020

Examples

			Bisymmetric matrix B_5, with B_5[1,1] and B_5[5,5] fixed, have a(3) free entries: for rows 1 and 2: each 3, row 3:  1, altogether 3 + 3 + 1 = 7 = a(5-2). Mark the corresponding matrix entries with x, and obtain a pattern symmetric around the central vertical. - _Wolfdieter Lang_, Aug 16 2015
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section C12, pp. 185-190.

Crossrefs

A row or column of the array A196416 (possibly with 1 subtracted from it).

Programs

Formula

a(n) = floor((n^2 + 6*n + 1)/4).
a(n) = A002620(n+3) - 2 = A024206(n+2) - 1 = (2*n*(n+6)-(-1)^n+1)/8.
G.f.: x*(-2 + x^2)/((1 + x)*(x - 1)^3). - R. J. Mathar, Jul 09 2011
a(n) = floor(A028884(n+1)/4). - Reinhard Zumkeller, Apr 07 2013
a(n)+a(n+1) = A046691(n+1). - R. J. Mathar, Mar 13 2021
a(n) = 2*n + A002620(n-1). - Michael Chu, Apr 28 2022
a(n) = A004116(n) + 1. - Michael Chu, May 02 2022
E.g.f.: (x*(7 + x)*cosh(x) + (1 + 7*x + x^2)*sinh(x))/4. - Stefano Spezia, Nov 09 2022
Sum_{n>=1} 1/a(n) = 67/36 - cot(sqrt(2)*Pi)*Pi/(2*sqrt(2)). - Amiram Eldar, Dec 10 2022

Extensions

Entry improved by comments from John Seldon (johnseldon(AT)onetel.com), Sep 15 2004
More terms from John W. Layman, Apr 13 1999

A004137 Maximal number of edges in a graceful graph on n nodes.

Original entry on oeis.org

0, 1, 3, 6, 9, 13, 17, 23, 29, 36, 43, 50, 58, 68, 79, 90, 101, 112, 123, 138, 153, 168, 183, 198, 213, 232
Offset: 1

Views

Author

Keywords

Comments

A graph with e edges is "graceful" if its nodes can be labeled with distinct integers in {0,1,...,e} so that, if each edge is labeled with the absolute difference between the labels of its endpoints, then the e edges have the distinct labels 1, 2, ..., e.
Equivalently, maximum m for which there's a restricted difference basis with respect to m with n elements. A "difference basis w.r.t. m" is a set of integers such that every integer from 1 to m is a difference between two elements of the set. A "restricted" difference basis is one in which the smallest element is 0 and the largest is m.
a(n) is also the length of an optimal ruler with n marks. For definitions see A103294. For example, a(6)=13 is the length of the optimal rulers with 6 marks, {[0, 1, 6, 9, 11, 13], [0, 2, 4, 7, 12, 13], [0, 1, 4, 5, 11, 13], [0, 2, 8, 9, 12, 13], [0, 1, 2, 6, 10, 13], [0, 3, 7, 11, 12, 13]}. Also n = 1 + A103298(a(n)). - Peter Luschny, Feb 28 2005
If the conjecture is true that an optimal ruler with more than 12 segments is a Wichmann ruler then the sequence continues 232, 251, 270, 289, 308, 327, ... - Peter Luschny, Oct 09 2011 [updated to take the verifications of Robison into account, Oct 01 2015]

Examples

			a(7)=17: Label the 7 nodes 0,1,8,11,13,15,17 and include all edges except those from 8 to 15, from 13 to 15, from 13 to 17 and from 15 to 17. {0,1,8,11,13,15,17} is a restricted difference basis w.r.t. 17.
a(21)=153 because there exists a complete ruler (i.e., one that can measure every distance between 1 and 153) with marks [0,1,2,3,7,14,21,28,43,58,73,88,103,118,126,134,142,150,151,152,153] and no complete ruler of greater length with the same number of marks can be found. This ruler is of the type described by B. Wichmann and it is conjectured by _Peter Luschny_ that it is impossible to improve upon Wichmann's construction for finding optimal rulers of bigger lengths.
		

References

  • J.-C. Bermond, Graceful graphs, radio antennae and French windmills, pp. 18-37 of R. J. Wilson, editor, Graph Theory and Combinatorics. Pitman, London, 1978.
  • R. K. Guy, Modular difference sets and error correcting codes. in: Unsolved Problems in Number Theory, 3rd ed. New York: Springer-Verlag, chapter C10, (2004), 181-183.
  • J. C. P. Miller, Difference bases: Three problems in additive number theory, pp. 299-322 of A. O. L. Atkin and B. J. Birch, editors, Computers in Number Theory. Academic Press, NY, 1971.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A080060 is an erroneous version of the sequence, given in Bermond's paper. Cf. A005488.
A289761 provides the conjectured continuation.

Programs

  • C
    See Klaus Nagel link.
    (Parallel C++) See A. Robison link.

Formula

a(n) = n*(n-1)/2 - A212661(n). - Kellen Myers, Jun 06 2016

Extensions

Miller's paper gives these lower bounds for the 8 terms from a(15) to a(22): 79, 90, 101, 112, 123, 138, 153, 168.
Edited by Dean Hickerson, Jan 26 2003
Terms 79,...,123 from Peter Luschny, Feb 28 2005, with verification by an independent program written by Klaus Nagel. Using this program Hugo Pfoertner found the next term, 138.
Using this program Hugo Pfoertner found further evidence for the conjectured term a(21)=153, Feb 23 2005
Terms a(21) .. a(24) proved by exhaustive search by Arch D. Robison, Hugo Pfoertner, Nov 01 2013
Term a(25) proved by exhaustive search by Arch D. Robison, Peter Luschny, Jan 14 2014
Term a(26) proved by exhaustive search by Fabian Schwartau, Yannic Schröder, Lars Wolf, Joerg Schoebel, Feb 22 2021

A163255 An interspersion: the order array of A163254.

Original entry on oeis.org

1, 3, 2, 7, 5, 4, 13, 10, 8, 6, 21, 17, 14, 11, 9, 31, 26, 22, 18, 15, 12, 43, 37, 32, 27, 23, 19, 16, 57, 50, 44, 38, 33, 28, 24, 20, 73, 65, 58, 51, 45, 39, 34, 29, 25, 91, 82, 74, 66, 59, 52, 46, 40, 35, 30, 111, 101, 92, 83, 75, 67, 60, 53, 47, 41, 36
Offset: 1

Views

Author

Clark Kimberling, Jul 24 2009

Keywords

Comments

A permutation of the natural numbers.
Except for initial terms, rows 1 to 4 are A002061, A002522, A014206, A059100 and columns 1 to 4 are A002620, A024206, A014616, A004116.
This is the interspersion of the fractal sequence A167430; i.e., row n of this array consists of the numbers k such that n=A167430(k). - Clark Kimberling, Nov 03 2009

Examples

			Corner:
1....3....7...13
2....5...10...17
4....8...14...22
To obtain A163255 from A163254, replace each term of A163254 by its rank when all the terms of A163254 are arranged in increasing order.
		

Crossrefs

A112970 A generalized Stern sequence.

Original entry on oeis.org

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

Views

Author

Paul Barry, Oct 07 2005

Keywords

Comments

Conjectures: a(2^n)=a(2^(n+1)+1)=A033638(n); a(2^n-1)=a(3*2^n-1)=1.
The Gi1 and Gi2 triangle sums, see A180662 for their definitions, of Sierpinski's triangle A047999 equal this sequence. The Gi1 and Gi2 sums can also be interpreted as (i + 4*j = n) and (4*i + j = n) sums, see the Northshield reference. Some A112970(2^n-p) sequences, 0<=p<=32, lead to known sequences, see the crossrefs. - Johannes W. Meijer, Jun 05 2011

Crossrefs

Cf. A120562 (Northshield).
Cf. A033638 (p=0), A000012 (p=1), A004526 (p=2, p=3, p=5, p=9, p=17), A002620 (p=4, p=7, p=13, p=25), A000027 (p=6, p=11, p=21), A004116 (p=8, p=15, p=29), A035106 (p=10, p=19), A024206 (p=14, p=27), A007494 (p=18), A014616 (p=22), A179207 (p=26). - Johannes W. Meijer, Jun 05 2011

Programs

  • Maple
    A112970:=proc(n) option remember; if n <0 then A112970(n):=0 fi: if (n=0 or n=1) then 1 elif n mod 2 = 0 then A112970(n/2) + A112970((n/2)-2) else A112970((n-1)/2); fi; end: seq(A112970(n),n=0..99); # Johannes W. Meijer, Jun 05 2011
  • Mathematica
    a[n_] := a[n] = Which[n<0, 0, n==0 || n==1, 1, Mod[n, 2]==0, a[n/2] + a[n/2-2], True, a[(n-1)/2]];
    Table[a[n], {n, 0, 99}] (* Jean-François Alcover, Aug 02 2022 *)

Formula

a(n) = Sum_{k=0..n} mod(sum{j=0..n, (-1)^(n-k)*C(j, n-j)*C(k, j-k)}, 2).
From Johannes W. Meijer, Jun 05 2011: (Start)
a(2*n+1) = a(n) and a(2*n) = a(n) + a(n-2) with a(0) = 1, a(1) = 1 and a(n)=0 for n<=-1.
G.f.: Product_{n>=0} (1 + x^(2^n) + x^(4*2^n)). (End)
G.f. A(x) satisfies: A(x) = (1 + x + x^4) * A(x^2). - Ilya Gutkovskiy, Jul 09 2019

A036572 Number of tetrahedra in largest triangulation of polygonal prism with regular polygonal base.

Original entry on oeis.org

3, 6, 10, 14, 19, 24, 30, 36, 43, 50, 58, 66, 75, 84, 94, 104, 115, 126, 138, 150, 163, 176, 190, 204, 219, 234, 250, 266, 283, 300, 318, 336, 355, 374, 394, 414, 435, 456, 478, 500, 523, 546, 570, 594, 619, 644, 670, 696, 723, 750, 778, 806
Offset: 3

Views

Author

Jesus De Loera (deloera(AT)math.ucdavis.edu)

Keywords

Crossrefs

Cf. A036573.

Programs

  • Magma
    [Ceiling((n*n+6*n-16)/4): n in [3..60]]; // Vincenzo Librandi, Oct 21 2013
  • Mathematica
    CoefficientList[Series[(2 x^2 - 3)/((x - 1)^3 (x + 1)), {x, 0, 60}], x] (* Vincenzo Librandi, Oct 21 2013 *)
    LinearRecurrence[{2,0,-2,1},{3,6,10,14},60] (* Harvey P. Dale, Jun 05 2017 *)
  • PARI
    Vec(x^3*(2*x^2-3)/((x-1)^3*(x+1)) + O(x^100)) \\ Colin Barker, Sep 05 2013
    

Formula

a(n) = ceiling((n*n + 6*n - 16)/4) = A004116(n) - 3. - Ralf Stephan, Oct 13 2003
From Colin Barker, Sep 05 2013: (Start)
a(n) = (-31 - (-1)^n + 12*n + 2*n^2)/8.
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
G.f.: x^3*(2*x^2-3) / ((x-1)^3*(x+1)). (End)

Extensions

More terms from Ralf Stephan, Oct 13 2003

A204250 Symmetric matrix read by antidiagonals given by T(i,j)=i*j+i+j-2.

Original entry on oeis.org

1, 3, 3, 5, 6, 5, 7, 9, 9, 7, 9, 12, 13, 12, 9, 11, 15, 17, 17, 15, 11, 13, 18, 21, 22, 21, 18, 13, 15, 21, 25, 27, 27, 25, 21, 15, 17, 24, 29, 32, 33, 32, 29, 24, 17, 19, 27, 33, 37, 39, 39, 37, 33, 27, 19, 21, 30, 37, 42, 45, 46, 45, 42, 37, 30, 21, 23, 33, 41, 47
Offset: 1

Views

Author

Clark Kimberling, Jan 14 2012

Keywords

Examples

			Northwest corner:
1...3...5....7....9
3...6...9....12...15
5...9...13...17...21
7...12..17...22...27
		

Crossrefs

Cf. A204251.

Programs

  • Mathematica
    f[i_, j_] := i*j + i + j - 2;
    m[n_] := Table[f[i, j], {i, 1, n}, {j, 1, n}]
    TableForm[m[5]] (* 5x5 principal submatrix *)
    Flatten[Table[f[i, n + 1 - i],
      {n, 1, 12}, {i, 1, n}]]          (* A204250 *)
    Permanent[m_] :=
      With[{a = Array[x, Length[m]]},
       Coefficient[Times @@ (m.a), Times @@ a]];
    Table[Permanent[m[n]], {n, 1, 14}] (* A204251 *)

A234305 Irregular triangle read by rows. Theoretical distribution of electrons based on the Janet's sequence A167268.

Original entry on oeis.org

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

Views

Author

Paul Curtz, Jan 02 2014

Keywords

Comments

a(n) is not A173642, a compact Bohr-Stoner model (1924), modified by Charles Janet in 1930. The good distribution is A168208.
Only sequences N16(n) in A234398 are used:
N16(1)= 1 followed by 2's = A040000,
N16(2)= 1, 2, 3, 4, 5, followed by 6's = A101272,
N16(3)= 1 to 9, followed by 10's,
N16(4)= 1 to 13, followed by 14's, etc.
The distribution by rows are in the example.
The N16(n)'s are respectively on columns (hence triangle T)
1, 2, 4, 6, 9, 12, 16, 20, 25, 30, 36, A002620(n+2)
3, 5, 8, 11, 15, 19, 24, 29, 35, A024206(n+2)
7, 10, 14, 18, 23, 28, 34, A014616(n+3)
13, 17, 22, 27, 33, A004116(n+4)
21, 26, 32,
31, etc.
See A163255.
Antidiagonals give the natural numbers A000027, like rows sums in the example.
A033638=1, 1, 2, 3, 5, 7,... is upon the triangle T.

Examples

			1,      H
2,       He
2, 1,    Li
2, 2,    Be
2, 2, 1,
2, 2, 2,
2, 2, 3,
2, 2, 4,
2, 2, 5,
2, 2, 6,
2, 2, 6, 1,
2, 2, 6, 2,
2, 2, 6, 2, 1,
2, 2, 6, 2, 2,
2, 2, 6, 2, 3,
2, 2, 6, 2, 4,
2, 2, 6, 2, 5,
2, 2, 6, 2, 6,
2, 2, 6, 2, 6, 1,
2, 2, 6, 2, 6, 2,
2, 2, 6, 2, 6, 2, 1,
2, 2, 6, 2, 6, 2, 2,
2, 2, 6, 2, 6, 2, 3, etc.
		

Crossrefs

Cf. A002061, A002522 (or A160457), A014206, A059100, diagonals of the triangle T. A004526.

A377802 Triangle read by rows: T(n, k) = (2 * (n+1)^2 + 7 - (-1)^n) / 8 - k.

Original entry on oeis.org

1, 2, 1, 4, 3, 2, 6, 5, 4, 3, 9, 8, 7, 6, 5, 12, 11, 10, 9, 8, 7, 16, 15, 14, 13, 12, 11, 10, 20, 19, 18, 17, 16, 15, 14, 13, 25, 24, 23, 22, 21, 20, 19, 18, 17, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31
Offset: 1

Views

Author

Werner Schulte, Nov 07 2024

Keywords

Comments

The natural numbers, based on quarter-squares (A002620 and A033638); every natural number occurs exactly twice.

Examples

			Triangle T(n, k) for 1 <= k <= n starts:
n\ k :   1   2   3   4   5   6   7   8   9  10  11  12  13
==========================================================
   1 :   1
   2 :   2   1
   3 :   4   3   2
   4 :   6   5   4   3
   5 :   9   8   7   6   5
   6 :  12  11  10   9   8   7
   7 :  16  15  14  13  12  11  10
   8 :  20  19  18  17  16  15  14  13
   9 :  25  24  23  22  21  20  19  18  17
  10 :  30  29  28  27  26  25  24  23  22  21
  11 :  36  35  34  33  32  31  30  29  28  27  26
  12 :  42  41  40  39  38  37  36  35  34  33  32  31
  13 :  49  48  47  46  45  44  43  42  41  40  39  38  37
  etc.
		

Crossrefs

A002620 (column 1), A024206 (column 2), A014616 (column 3), A004116 (column 4), A033638 (main diagonal), A290743 (1st subdiagonal).

Programs

  • PARI
    T(n,k)=(2*(n+1)^2+7-(-1)^n)/8-k

Formula

T(n, k) = A002620(n+1) + 1 - k.
T(2*n-1, n) = n^2 - n + 1 = A002061(n); T(2*n-2, n) = (n-1)^2 = A000290(n-1) for n > 1; T(2*n-3, n) = (n-1) * (n-2) = A002378(n-2) for n > 2; T(2*n-4, n) = (n-1) * (n-3) = A005563(n-3) for n > 3.
Row sums are (2 * n^3 + 5 * n - n * (-1)^n) / 8 = (A006003(n) + A026741(n)) / 2.
G.f.: x*y*(1 - x*y + x^2*y + x^4*y^2 - x^5*y^3 + x^6*y^3 - x^3*y*(1 + 2*y - y^2))/((1 - x)^3*(1 + x)*(1 - x*y)^3*(1 + x*y)). - Stefano Spezia, Nov 08 2024
Showing 1-10 of 10 results.