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 26 results. Next

A001477 The nonnegative integers.

Original entry on oeis.org

0, 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, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77
Offset: 0

Views

Author

Keywords

Comments

Although this is a list, and lists normally have offset 1, it seems better to make an exception in this case. - N. J. A. Sloane, Mar 13 2010
The subsequence 0,1,2,3,4 gives the known values of n such that 2^(2^n)+1 is a prime (see A019434, the Fermat primes). - N. J. A. Sloane, Jun 16 2010
Also: The identity map, defined on the set of nonnegative integers. The restriction to the positive integers yields the sequence A000027. - M. F. Hasler, Nov 20 2013
The number of partitions of 2n into exactly 2 parts. - Colin Barker, Mar 22 2015
The number of orbits of Aut(Z^7) as function of the infinity norm n of the representative lattice point of the orbit, when the cardinality of the orbit is equal to 8960 or 168.- Philippe A.J.G. Chevalier, Dec 29 2015
Partial sums give A000217. - Omar E. Pol, Jul 26 2018
First differences are A000012 (the "all 1's" sequence). - M. F. Hasler, May 30 2020
See A061579 for the transposed infinite square matrix, or triangle with rows reversed. - M. F. Hasler, Nov 09 2021
This is the unique sequence (a(n)) that satisfies the inequality a(n+1) > a(a(n)) for all n in N. This simple and surprising result comes from the 6th problem proposed by Bulgaria during the second day of the 19th IMO (1977) in Belgrade (see link and reference). - Bernard Schott, Jan 25 2023

Examples

			Triangular view:
   0
   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
  45  46  47  48  49  50  51  52  53  54
		

References

  • Maurice Protat, Des Olympiades à l'Agrégation, suite vérifiant f(n+1) > f(f(n)), Problème 7, pp. 31-32, Ellipses, Paris 1997.

Crossrefs

Cf. A000027 (n>=1).
Cf. A000012 (first differences).
Partial sums of A057427. - Jeremy Gardiner, Sep 08 2002
Cf. A038608 (alternating signs), A001787 (binomial transform).
Cf. A055112.
Cf. Boustrophedon transforms: A231179, A000737.
Cf. A245422.
Number of orbits of Aut(Z^7) as function of the infinity norm A000579, A154286, A102860, A002412, A045943, A115067, A008586, A008585, A005843, A000217.
When written as an array, the rows/columns are A000217, A000124, A152948, A152950, A145018, A167499, A166136, A167487... and A000096, A034856, A055998, A046691, A052905, A055999... (with appropriate offsets); cf. analogous lists for A000027 in A185787.
Cf. A000290.
Cf. A061579 (transposed matrix / reversed triangle).

Programs

Formula

a(n) = n.
a(0) = 0, a(n) = a(n-1) + 1.
G.f.: x/(1-x)^2.
Multiplicative with a(p^e) = p^e. - David W. Wilson, Aug 01 2001
When seen as array: T(k, n) = n + (k+n)*(k+n+1)/2. Main diagonal is 2*n*(n+1) (A046092), antidiagonal sums are n*(n+1)*(n+2)/2 (A027480). - Ralf Stephan, Oct 17 2004
Dirichlet generating function: zeta(s-1). - Franklin T. Adams-Watters, Sep 11 2005
E.g.f.: x*e^x. - Franklin T. Adams-Watters, Sep 11 2005
a(0)=0, a(1)=1, a(n) = 2*a(n-1) - a(n-2). - Jaume Oliver Lafont, May 07 2008
Alternating partial sums give A001057 = A000217 - 2*(A008794). - Eric Desbiaux, Oct 28 2008
a(n) = 2*A080425(n) + 3*A008611(n-3), n>1. - Eric Desbiaux, Nov 15 2009
a(n) = A007966(n)*A007967(n). - Reinhard Zumkeller, Jun 18 2011
a(n) = Sum_{k>=0} A030308(n,k)*2^k. - Philippe Deléham, Oct 20 2011
a(n) = 2*A028242(n-1) + (-1)^n*A000034(n-1). - R. J. Mathar, Jul 20 2012
a(n+1) = det(C(i+1,j), 1 <= i, j <= n), where C(n,k) are binomial coefficients. - Mircea Merca, Apr 06 2013
a(n-1) = floor(n/e^(1/n)) for n > 0. - Richard R. Forberg, Jun 22 2013
a(n) = A000027(n) for all n>0.
a(n) = floor(cot(1/(n+1))). - Clark Kimberling, Oct 08 2014
a(0)=0, a(n>0) = 2*z(-1)^[( |z|/z + 3 )/2] + ( |z|/z - 1 )/2 for z = A130472(n>0); a 1 to 1 correspondence between integers and naturals. - Adriano Caroli, Mar 29 2015
G.f. as triangle: x*(1 + (x^2 - 5*x + 2)*y + x*(2*x - 1)*y^2)/((1 - x)^3*(1 - x*y)^3). - Stefano Spezia, Jul 22 2025

A000124 Central polygonal numbers (the Lazy Caterer's sequence): n(n+1)/2 + 1; or, maximal number of pieces formed when slicing a pancake with n cuts.

Original entry on oeis.org

1, 2, 4, 7, 11, 16, 22, 29, 37, 46, 56, 67, 79, 92, 106, 121, 137, 154, 172, 191, 211, 232, 254, 277, 301, 326, 352, 379, 407, 436, 466, 497, 529, 562, 596, 631, 667, 704, 742, 781, 821, 862, 904, 947, 991, 1036, 1082, 1129, 1177, 1226, 1276, 1327, 1379
Offset: 0

Views

Author

Keywords

Comments

These are Hogben's central polygonal numbers with the (two-dimensional) symbol
2
.P
1 n
The first line cuts the pancake into 2 pieces. For n > 1, the n-th line crosses every earlier line (avoids parallelism) and also avoids every previous line intersection, thus increasing the number of pieces by n. For 16 lines, for example, the number of pieces is 2 + 2 + 3 + 4 + 5 + ... + 16 = 137. These are the triangular numbers plus 1 (cf. A000217).
m = (n-1)(n-2)/2 + 1 is also the smallest number of edges such that all graphs with n nodes and m edges are connected. - Keith Briggs, May 14 2004
Also maximal number of grandchildren of a binary vector of length n+2. E.g., a binary vector of length 6 can produce at most 11 different vectors when 2 bits are deleted.
This is also the order dimension of the (strong) Bruhat order on the finite Coxeter group B_{n+1}. - Nathan Reading (reading(AT)math.umn.edu), Mar 07 2002
Number of 132- and 321-avoiding permutations of {1,2,...,n+1}. - Emeric Deutsch, Mar 14 2002
For n >= 1 a(n) is the number of terms in the expansion of (x+y)*(x^2+y^2)*(x^3+y^3)*...*(x^n+y^n). - Yuval Dekel (dekelyuval(AT)hotmail.com), Jul 28 2003
Also the number of terms in (1)(x+1)(x^2+x+1)...(x^n+...+x+1); see A000140.
Narayana transform (analog of the binomial transform) of vector [1, 1, 0, 0, 0, ...] = A000124; using the infinite lower Narayana triangle of A001263 (as a matrix), N; then N * [1, 1, 0, 0, 0, ...] = A000124. - Gary W. Adamson, Apr 28 2005
Number of interval subsets of {1, 2, 3, ..., n} (cf. A002662). - Jose Luis Arregui (arregui(AT)unizar.es), Jun 27 2006
Define a number of straight lines in the plane to be in general arrangement when (1) no two lines are parallel, (2) there is no point common to three lines. Then these are the maximal numbers of regions defined by n straight lines in general arrangement in the plane. - Peter C. Heinig (algorithms(AT)gmx.de), Oct 19 2006
Note that a(n) = a(n-1) + A000027(n-1). This has the following geometrical interpretation: Suppose there are already n-1 lines in general arrangement, thus defining the maximal number of regions in the plane obtainable by n-1 lines and now one more line is added in general arrangement. Then it will cut each of the n-1 lines and acquire intersection points which are in general arrangement. (See the comments on A000027 for general arrangement with points.) These points on the new line define the maximal number of regions in 1-space definable by n-1 points, hence this is A000027(n-1), where for A000027 an offset of 0 is assumed, that is, A000027(n-1) = (n+1)-1 = n. Each of these regions acts as a dividing wall, thereby creating as many new regions in addition to the a(n-1) regions already there, hence a(n) = a(n-1) + A000027(n-1). Cf. the comments on A000125 for an analogous interpretation. - Peter C. Heinig (algorithms(AT)gmx.de), Oct 19 2006
When constructing a zonohedron, one zone at a time, out of (up to) 3-d non-intersecting parallelepipeds, the n-th element of this sequence is the number of edges in the n-th zone added with the n-th "layer" of parallelepipeds. (Verified up to 10-zone zonohedron, the enneacontahedron.) E.g., adding the 10th zone to the enneacontahedron requires 46 parallel edges (edges in the 10th zone) by looking directly at a 5-valence vertex and counting visible vertices. - Shel Kaphan, Feb 16 2006
Binomial transform of (1, 1, 1, 0, 0, 0, ...) and inverse binomial transform of A072863: (1, 3, 9, 26, 72, 192, ...). - Gary W. Adamson, Oct 15 2007
If Y is a 2-subset of an n-set X then, for n >= 3, a(n-3) is the number of (n-2)-subsets of X which do not have exactly one element in common with Y. - Milan Janjic, Dec 28 2007
Equals row sums of triangle A144328. - Gary W. Adamson, Sep 18 2008
It appears that a(n) is the number of distinct values among the fractions F(i+1)/F(j+1) as j ranges from 1 to n and, for each fixed j, i ranges from 1 to j, where F(i) denotes the i-th Fibonacci number. - John W. Layman, Dec 02 2008
a(n) is the number of subsets of {1,2,...,n} that contain at most two elements. - Geoffrey Critzer, Mar 10 2009
For n >= 2, a(n) gives the number of sets of subsets A_1, A_2, ..., A_n of n = {1, 2, ..., n} such that Meet_{i = 1..n} A_i is empty and Sum_{j in [n]} (|Meet{i = 1..n, i != j} A_i|) is a maximum. - Srikanth K S, Oct 22 2009
The numbers along the left edge of Floyd's triangle. - Paul Muljadi, Jan 25 2010
Let A be the Hessenberg matrix of order n, defined by: A[1,j] = A[i,i]:=1, A[i,i-1] = -1, and A[i,j] = 0 otherwise. Then, for n >= 1, a(n-1) = (-1)^(n-1)*coeff(charpoly(A,x),x). - Milan Janjic, Jan 24 2010
Also the number of deck entries of Euler's ship. See the Meijer-Nepveu link. - Johannes W. Meijer, Jun 21 2010
(1 + x^2 + x^3 + x^4 + x^5 + ...)*(1 + 2x + 3x^2 + 4x^3 + 5x^4 + ...) = (1 + 2x + 4x^2 + 7x^3 + 11x^4 + ...). - Gary W. Adamson, Jul 27 2010
The number of length n binary words that have no 0-digits between any pair of consecutive 1-digits. - Jeffrey Liese, Dec 23 2010
Let b(0) = b(1) = 1; b(n) = max(b(n-1)+n-1, b(n-2)+n-2) then a(n) = b(n+1). - Yalcin Aktar, Jul 28 2011
Also number of triangular numbers so far, for n > 0: a(n) = a(n-1) + Sum(A010054(a(k)): 0 <= k < n), see also A097602, A131073. - Reinhard Zumkeller, Nov 15 2012
Also number of distinct sums of 1 through n where each of those can be + or -. E.g., {1+2,1-2,-1+2,-1-2} = {3,-1,1,-3} and a(2) = 4. - Toby Gottfried, Nov 17 2011
This sequence is complete because the sum of the first n terms is always greater than or equal to a(n+1)-1. Consequently, any nonnegative number can be written as a sum of distinct terms of this sequence. See A204009, A072638. - Frank M Jackson, Jan 09 2012
The sequence is the number of distinct sums of subsets of the nonnegative integers, and its first differences are the positive integers. See A208531 for similar results for the squares. - John W. Layman, Feb 28 2012
Apparently the number of Dyck paths of semilength n+1 in which the sum of the first and second ascents add to n+1. - David Scambler, Apr 22 2013
Without 1 and 2, a(n) equals the terminus of the n-th partial sum of sequence 1, 1, 2. Explanation: 1st partial sums of 1, 1, 2 are 1, 2, 4; 2nd partial sums are 1, 3, 7; 3rd partial sums are 1, 4, 11; 4th partial sums are 1, 5, 16, etc. - Bob Selcoe, Jul 04 2013
Equivalently, numbers of the form 2*m^2+m+1, where m = 0, -1, 1, -2, 2, -3, 3, ... . - Bruno Berselli, Apr 08 2014
For n >= 2: quasi-triangular numbers; the almost-triangular numbers being A000096(n), n >= 2. Note that 2 is simultaneously almost-triangular and quasi-triangular. - Daniel Forgues, Apr 21 2015
n points in general position determine "n choose 2" lines, so A055503(n) <= a(n(n-1)/2). If n > 3, the lines are not in general position and so A055503(n) < a(n(n-1)/2). - Jonathan Sondow, Dec 01 2015
The digital root is period 9 (1, 2, 4, 7, 2, 7, 4, 2, 1), also the digital roots of centered 10-gonal numbers (A062786), for n > 0, A133292. - Peter M. Chema, Sep 15 2016
Partial sums of A028310. - J. Conrad, Oct 31 2016
For n >= 0, a(n) is the number of weakly unimodal sequences of length n over the alphabet {1, 2}. - Armend Shabani, Mar 10 2017
From Eric M. Schmidt, Jul 17 2017: (Start)
Number of sequences (e(1), ..., e(n+1)), 0 <= e(i) < i, such that there is no triple i < j < k with e(i) < e(j) != e(k). [Martinez and Savage, 2.4]
Number of sequences (e(1), ..., e(n+1)), 0 <= e(i) < i, such that there is no triple i < j < k with e(i) < e(j) and e(i) < e(k). [Martinez and Savage, 2.4]
Number of sequences (e(1), ..., e(n+1)), 0 <= e(i) < i, such that there is no triple i < j < k with e(i) >= e(j) != e(k). [Martinez and Savage, 2.4]
(End)
Numbers m such that 8m - 7 is a square. - Bruce J. Nicholson, Jul 24 2017
From Klaus Purath, Jan 29 2020: (Start)
The odd prime factors != 7 occur in an interval of p successive terms either never or exactly twice, while 7 always occurs only once. If a prime factor p appears in a(n) and a(m) within such an interval, then n + m == -1 (mod p). When 7 divides a(n), then 2*n == -1 (mod 7). a(n) is never divisible by the prime numbers given in A003625.
While all prime factors p != 7 can occur to any power, a(n) is never divisible by 7^2. The prime factors are given in A045373. The prime terms of this sequence are given in A055469.
(End)
From Roger Ford, May 10 2021: (Start)
a(n-1) is the greatest sum of arch lengths for the top arches of a semi-meander with n arches. An arch length is the number of arches covered + 1.
/\ The top arch has a length of 3. /\ The top arch has a length of 3.
/ \ Both bottom arches have a //\\ The middle arch has a length of 2.
//\/\\ length of 1. ///\\\ The bottom arch has a length of 1.
Example: for n = 4, a(4-1) = a(3) = 7 /\
//\\
/\ ///\\\ 1 + 3 + 2 + 1 = 7. (End)
a(n+1) is the a(n)-th smallest positive integer that has not yet appeared in the sequence. - Matthew Malone, Aug 26 2021
For n> 0, let the n-dimensional cube {0,1}^n be, provided with the Hamming distance, d. Given an element x in {0,1}^n, a(n) is the number of elements y in {0,1}^n such that d(x, y) <= 2. Example: n = 4. (0,0,0,0), (1,0,0,0), (0,1,0,0), (0,0,1,0), (0,0,0,1), (0,0,1,1), (0,1,0,1), (0,1,1,0), (1,0,0,1), (1,0,1,0), (1,1,0,0) are at distance <= 2 from (0,0,0,0), so a(4) = 11. - Yosu Yurramendi, Dec 10 2021
a(n) is the sum of the first three entries of row n of Pascal's triangle. - Daniel T. Martin, Apr 13 2022
a(n-1) is the number of Grassmannian permutations that avoid a pattern, sigma, where sigma is a pattern of size 3 with exactly one descent. For example, sigma is one of the patterns, {132, 213, 231, 312}. - Jessica A. Tomasko, Sep 14 2022
a(n+4) is the number of ways to tile an equilateral triangle of side length 2*n with smaller equilateral triangles of side length n and side length 1. For example, with n=2, there are 22 ways to tile an equilateral triangle of side length 4 with smaller ones of sides 2 and 1, including the one tiling with sixteen triangles of sides 1 and the one tiling with four triangles of sides 2. - Ahmed ElKhatib and Greg Dresden, Aug 19 2024
Define a "hatpin" to be the planar graph consisting of a distinguished point (called the "head") and a semi-infinite line from that point. The maximum number of regions than can be formed by drawing n hatpins is a(n-1). See link for the case n = 4. - N. J. A. Sloane, Jun 25 2025

Examples

			a(3) = 7 because the 132- and 321-avoiding permutations of {1, 2, 3, 4} are 1234, 2134, 3124, 2314, 4123, 3412, 2341.
G.f. = 1 + 2*x + 4*x^2 + 7*x^3 + 11*x^4 + 16*x^5 + 22*x^6 + 29*x^7 + ...
		

References

  • Robert B. Banks, Slicing Pizzas, Racing Turtles and Further Adventures in Applied Mathematics, Princeton Univ. Press, 1999. See p. 24.
  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 72, Problem 2.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 80.
  • Henry Ernest Dudeney, Amusements in Mathematics, Nelson, London, 1917, page 177.
  • Derrick Niederman, Number Freak, From 1 to 200 The Hidden Language of Numbers Revealed, A Perigee Book, NY, 2009, p. 83.
  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.
  • Alain M. Robert, A Course in p-adic Analysis, Springer-Verlag, 2000; p. 213.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane, On single-deletion-correcting codes, in Codes and Designs (Columbus, OH, 2000), 273-291, Ohio State Univ. Math. Res. Inst. Publ., 10, de Gruyter, Berlin, 2002.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 98.
  • William Allen Whitworth, DCC Exercises in Choice and Chance, Stechert, NY, 1945, p. 30.
  • Akiva M. Yaglom and Isaak M. Yaglom, Challenging Mathematical Problems with Elementary Solutions. Vol. I. Combinatorial Analysis and Probability Theory. New York: Dover Publications, Inc., 1987, p. 13, #44 (First published: San Francisco: Holden-Day, Inc., 1964).

Crossrefs

Cf. A000096 (Maximal number of pieces that can be obtained by cutting an annulus with n cuts, for n >= 1).
Slicing a cake: A000125, a bagel: A003600.
Partial sums =(A033547)/2, (A014206)/2.
The first 20 terms are also found in A025732 and A025739.
Cf. also A055469 Quasi-triangular primes, A002620, A000217.
A row of the array in A386478.

Programs

Formula

G.f.: (1 - x + x^2)/(1 - x)^3. - Simon Plouffe in his 1992 dissertation
a(n) = A108561(n+3, 2). - Reinhard Zumkeller, Jun 10 2005
G.f.: (1 - x^6)/((1 - x)^2*(1 - x^2)*(1 - x^3)). a(n) = a(-1 - n) for all n in Z. - Michael Somos, Sep 04 2006
Euler transform of length 6 sequence [ 2, 1, 1, 0, 0, -1]. - Michael Somos, Sep 04 2006
a(n+3) = 3*a(n+2) - 3*a(n+1) + a(n) and a(1) = 1, a(2) = 2, a(3) = 4. - Artur Jasinski, Oct 21 2008
a(n) = A000217(n) + 1.
a(n) = a(n-1) + n. E.g.f.:(1 + x + x^2/2)*exp(x). - Geoffrey Critzer, Mar 10 2009
a(n) = Sum_{k = 0..n + 1} binomial(n+1, 2(k - n)). - Paul Barry, Aug 29 2004
a(n) = binomial(n+2, 1) - 2*binomial(n+1, 1) + binomial(n+2, 2). - Zerinvary Lajos, May 12 2006
From Thomas Wieder, Feb 25 2009: (Start)
a(n) = Sum_{l_1 = 0..n + 1} Sum_{l_2 = 0..n}...Sum_{l_i = 0..n - i}...Sum_{l_n = 0..1} delta(l_1, l_2, ..., l_i, ..., l_n) where delta(l_1, l_2, ..., l_i, ..., l_n) = 0 if any l_i != l_(i+1) and l_(i+1) != 0 and delta(l_1, l_2, ..., l_i, ..., l_n) = 1 otherwise. (End)
a(n) = A034856(n+1) - A005843(n) = A000217(n) + A005408(n) - A005843(n). - Jaroslav Krizek, Sep 05 2009
a(n) = 2*a(n-1) - a(n-2) + 1. - Eric Werley, Jun 27 2011
E.g.f.: exp(x)*(1+x+(x^2)/2) = Q(0); Q(k) = 1+x/(1-x/(2+x-4/(2+x*(k+1)/Q(k+1)))); (continued fraction). - Sergei N. Gladkovskii, Nov 21 2011
a(n) = A014132(n, 1) for n > 0. - Reinhard Zumkeller, Dec 12 2012
a(n) = 1 + floor(n/2) + ceiling(n^2/2) = 1 + A004526(n) + A000982(n). - Wesley Ivan Hurt, Jun 14 2013
a(n) = A228074(n+1, n). - Reinhard Zumkeller, Aug 15 2013
For n > 0: A228446(a(n)) = 3. - Reinhard Zumkeller, Mar 12 2014
a(n) >= A263883(n) and a(n(n-1)/2) >= A055503(n). - Jonathan Sondow, Dec 01 2015
From Ilya Gutkovskiy, Jun 29 2016: (Start)
Dirichlet g.f.: (zeta(s-2) + zeta(s-1) + 2*zeta(s))/2.
Sum_{n >= 0} 1/a(n) = 2*Pi*tanh(sqrt(7)*Pi/2)/sqrt(7) = A226985. (End)
a(n) = (n+1)^2 - A000096(n). - Anton Zakharov, Jun 29 2016
a(n) = A101321(1, n). - R. J. Mathar, Jul 28 2016
a(n) = 2*a(n-1) - binomial(n-1, 2) and a(0) = 1. - Armend Shabani, Mar 10 2017
a(n) = A002620(n+2) + A002620(n-1). - Anton Zakharov, May 11 2017
From Klaus Purath, Jan 29 2020: (Start)
a(n) = (Sum_{i=n-2..n+2} A000217(i))/5.
a(n) = (Sum_{i=n-2..n+2} A002378(i))/10.
a(n) = (Sum_{i=n..n+2} A002061(i)+1)/6.
a(n) = (Sum_{i=n-1..n+2} A000290(i)+2)/8.
a(n) = A060533(n-1) + 10, n > 5.
a(n) = (A002378(n) + 2)/2.
a(n) = A152948(n+2) - 1.
a(n) = A152950(n+1) - 2.
a(n) = (A002061(n) + A002061(n+2))/4.
(End)
Sum_{n>=0} (-1)^n/a(n) = A228918. - Amiram Eldar, Nov 20 2020
From Amiram Eldar, Feb 17 2021: (Start)
Product_{n>=0} (1 + 1/a(n)) = cosh(sqrt(15)*Pi/2)*sech(sqrt(7)*Pi/2).
Product_{n>=1} (1 - 1/a(n)) = 2*Pi*sech(sqrt(7)*Pi/2). (End)
a((n^2-3n+6)/2) + a((n^2-n+4)/2) = a(n^2-2n+6)/2. - Charlie Marion, Feb 14 2023

A152950 a(n) = 3 + n*(n-1)/2.

Original entry on oeis.org

3, 4, 6, 9, 13, 18, 24, 31, 39, 48, 58, 69, 81, 94, 108, 123, 139, 156, 174, 193, 213, 234, 256, 279, 303, 328, 354, 381, 409, 438, 468, 499, 531, 564, 598, 633, 669, 706, 744, 783, 823, 864, 906, 949, 993, 1038, 1084, 1131, 1179, 1228, 1278, 1329, 1381, 1434, 1488
Offset: 1

Views

Author

Keywords

Comments

a(1)=3; then add 1 to the first number, then 2, 3, 4, ... and so on.
Numbers m such that 8*m - 23 is a square. - Bruce J. Nicholson, Jul 25 2017

Crossrefs

Programs

Formula

a(n) = A152949(n+1) = 3 + A000217(n-1). - R. J. Mathar, Jan 03 2009
a(n) = 3 + C(n,2), n >= 1. - Zerinvary Lajos, Mar 12 2009
a(n) = a(n-1) + n - 1 (with a(1)=3). - Vincenzo Librandi, Nov 27 2010
Sum_{n>=1} 1/a(n) = 2*Pi*tanh(sqrt(23)*Pi/2)/sqrt(23). - Amiram Eldar, Dec 13 2022
From Elmo R. Oliveira, Nov 18 2024: (Start)
G.f.: x*(3 - 5*x + 3*x^2)/(1-x)^3.
E.g.f.: exp(x)*(3 + x^2/2) - 3.
a(n) = A027691(n-1)/2.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 3. (End)

A027689 a(n) = n^2 + n + 4.

Original entry on oeis.org

4, 6, 10, 16, 24, 34, 46, 60, 76, 94, 114, 136, 160, 186, 214, 244, 276, 310, 346, 384, 424, 466, 510, 556, 604, 654, 706, 760, 816, 874, 934, 996, 1060, 1126, 1194, 1264, 1336, 1410, 1486, 1564, 1644, 1726, 1810, 1896, 1984, 2074, 2166, 2260, 2356, 2454, 2554
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Formula

a(n) = A000217(n-2) + A000217(n+2) for n > 0. - Jon Perry, Jul 23 2003
a(n) = 2*n + a(n-1)-2 (with a(1)=4). - Vincenzo Librandi, Aug 05 2010
Sum_{n>=0} 1/a(n) = Pi*tanh(Pi*sqrt(15)/2)/sqrt(15). - Amiram Eldar, Jan 18 2021
From Elmo R. Oliveira, Oct 28 2024: (Start)
G.f.: 2*(2 - 3*x + 2*x^2)/(1 - x)^3.
E.g.f.: (2*(2 + x) + x^2)*exp(x).
a(n) = 2*A152948(n+2). (End)

A054450 Triangle of partial row sums of unsigned triangle A049310(n,m), n >= m >= 0 (Chebyshev S-polynomials).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 5, 4, 4, 1, 1, 8, 8, 5, 5, 1, 1, 13, 12, 12, 6, 6, 1, 1, 21, 21, 17, 17, 7, 7, 1, 1, 34, 33, 33, 23, 23, 8, 8, 1, 1, 55, 55, 50, 50, 30, 30, 9, 9, 1, 1, 89, 88, 88, 73, 73, 38, 38, 10, 10, 1, 1, 144, 144, 138, 138, 103, 103, 47, 47, 11, 11, 1, 1
Offset: 0

Views

Author

Wolfdieter Lang, Apr 27 2000 and May 08 2000

Keywords

Comments

In the language of the Shapiro et al. reference (given in A053121) such a lower triangular (ordinary) convolution array, considered as a matrix, belongs to the Riordan-group. The G.f. for the row polynomials p(n,x) (increasing powers of x) is Fib(z)/(1-x*z/(1-z^2)) where Fib(x)=1/(1-x-x^2) = g.f. for A000045(n+1) (Fibonacci numbers without 0).
This is the first member of the family of Riordan-type matrices obtained from the unsigned convolution matrix A049310 by repeated application of the partial row sums procedure.

Examples

			Triangle begins as:
   1;
   1,  1;
   2,  1,  1;
   3,  3,  1,  1;
   5,  4,  4,  1,  1;
   8,  8,  5,  5,  1,  1;
  13, 12, 12,  6,  6,  1,  1;
  21, 21, 17, 17,  7,  7,  1,  1;
  34, 33, 33, 23, 23,  8,  8,  1,  1;
  55, 55, 50, 50, 30, 30,  9,  9,  1, 1;
  89, 88, 88, 73, 73, 38, 38, 10, 10, 1, 1;
  ...
Fourth row polynomial (n=3): p(3,x) = 3 + 3*x + x^2 + x^3.
		

Crossrefs

Programs

Formula

T(n, m) = Sum_{k=m..n} |A049310(n, k)| (sequence of partial row sums in column m).
Column m recursion: T(n, m) = Sum_{j=m..n} T(j-1, m)*|A049310(n-j, 0)| + |A049310(n, m)|, n >= m >= 0, a(n, m) := 0 if n
T(n, 0) = A000045(n+1).
T(n, 1) = A052952(n-1).
T(n, 2) = A054451(n-2).
Sum_{k=0..n} T(n, k) = A029907(n) = A054453(n, 0).
G.f. for column m: Fib(x)*(x/(1-x^2))^m, m >= 0, with Fib(x) = g.f. A000045(n+1).
The corresponding square array has T(n, k) = Sum_{j=0..floor(k/2)} binomial(n+k-j, j). - Paul Barry, Oct 23 2004
From G. C. Greubel, Jul 25 2022: (Start)
T(n, 3) = A099571(n-3).
T(n, 4) = A099572(n-4).
T(n, n) = T(n, n-1) = A000012(n).
T(n, n-2) = A000027(n), n >= 2.
T(n, n-3) = A000027(n), n >= 3.
T(n, n-4) = A152948(n), n >= 4.
T(n, n-5) = A152948(n), n >= 5.
T(n, n-6) = A038793(n), n >= 6.
T(n, n-8) = A038794(n), n >= 8.
T(n, n-10) = A038795(n), n >= 10.
T(n, n-12) = A038796(n), n >= 12. (End)

A386478 Array read by upward antidiagonals: T(k,n) = 1 (k = 0, n >= 0), T(k,n) = k^2*n^2/2 - (3*k-4)*n/2 + 1 (k >= 1, n >= 0).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 3, 7, 7, 1, 1, 5, 14, 16, 11, 1, 1, 8, 25, 34, 29, 16, 1, 1, 12, 40, 61, 63, 46, 22, 1, 1, 17, 59, 97, 113, 101, 67, 29, 1, 1, 23, 82, 142, 179, 181, 148, 92, 37, 1, 1, 30, 109, 196, 261, 286, 265, 204, 121, 46, 1, 1, 38, 140, 259, 359, 416, 418, 365, 269, 154, 56, 1, 1, 47, 175, 331, 473, 571, 607, 575, 481, 343, 191, 67, 1
Offset: 0

Author

N. J. A. Sloane, Jul 24 2025

Keywords

Comments

A k-chain is a planar graph consisting of a continuous path made up of k straight segments. T(k,n) is the maximum number of regions the plane can be divided into by drawing n k-chains.
The array is almost symmetric: the difference between T(k,n) and T(n,k) is 2*|k-n| (which is exactly the difference between the numbers of infinite regions). All the rows and columns satisfy the recurrence u(n) = 3*u(n-1) - 3*u(n-2) + u(n-3).

Examples

			Array begins (the rows are T(0,n>=0),, T(1,n>=0), T(2,n>=0), ...):
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
  1, 2, 4, 7, 11, 16, 22, 29, 37, ...
  1, 2, 7, 16, 29, 46, 67, 92, 121, ...
  1, 3, 14, 34, 63, 101, 148, 204, 269, ...
  1, 5, 25, 61, 113, 181, 265, 365, 481, ...
  1, 8, 40, 97, 179, 286, 418, 575, 757, ...
  1, 12, 59, 142, 261, 416, 607, 834, 1097, ...
  1, 17, 82, 196, 359, 571, 832, 1142, 1501, ...
  1, 23, 109, 259, 473, 751, 1093, 1499, 1969, ...
  ...
The first few antidiagonals are:
  1,
  1, 1,
  1, 2, 1,
  1, 2, 4, 1,
  1, 3, 7, 7, 1,
  1, 5, 14, 16, 11, 1,
  1, 8, 25, 34, 29, 16, 1,
  1, 12, 40, 61, 63, 46, 22, 1,
  ...
		

References

  • David O. H. Cutler and N. J. A. Sloane, paper in preparation, August 1 2025.

Crossrefs

The first few rows are A000124, A130883, A140064, A080856, A383465.
The n=1 and 2 columns are A152948 and A386479.

Programs

  • Mathematica
    A386478[k_, n_] := If[k == 0, 1, ((k*n - 3)*k + 4)*n/2 + 1];
    Table[A386478[k - n, n], {k, 0, 12}, {n, 0, k}] (* Paolo Xausa, Jul 26 2025 *)

Extensions

Row 0 added by N. J. A. Sloane, Jul 26 2025

A027927 Number of plane regions after drawing (in general position) a convex n-gon and all its diagonals.

Original entry on oeis.org

1, 2, 5, 12, 26, 51, 92, 155, 247, 376, 551, 782, 1080, 1457, 1926, 2501, 3197, 4030, 5017, 6176, 7526, 9087, 10880, 12927, 15251, 17876, 20827, 24130, 27812, 31901, 36426, 41417, 46905, 52922, 59501, 66676, 74482, 82955, 92132, 102051, 112751, 124272, 136655, 149942, 164176, 179401
Offset: 2

Keywords

Comments

For n>=1, a(n+1) is the number of Grassmannian permutations that avoid a pattern, sigma, where sigma is a pattern of size 5 with exactly one descent. - Jessica A. Tomasko, Nov 15 2022

Examples

			a(2)=1 (segment traced twice has only exterior).
		

Crossrefs

Cf. A006522 (does not count exterior of n-gon).

Programs

  • GAP
    List([2..50], n-> (n^4 -6*n^3 +23*n^2 -42*n +48)/24); # G. C. Greubel, Sep 06 2019
  • Magma
    [(n^4 -6*n^3 +23*n^2 -42*n +48)/24: n in [2..50]]; // G. C. Greubel, Sep 06 2019
    
  • Maple
    seq((n^4 -6*n^3 +23*n^2 -42*n +48)/24, n=2..50); # G. C. Greubel, Sep 06 2019
  • Mathematica
    LinearRecurrence[{5,-10,10,-5,1 }, {1,2,5,12,26}, 50] (* Vincenzo Librandi, Feb 01 2012 *)
    S[n_] :=n*(n+1)/2; Table[S[S[n]+2]/3, {n, 0, 50}] (* Waldemar Puszkarz, Jan 22 2016 *)
  • PARI
    a(n)=n*(n^3-6*n^2+23*n-42)/24+2 \\ Charles R Greathouse IV, Jan 31 2012
    
  • Sage
    [(n^4 -6*n^3 +23*n^2 -42*n +48)/24 for n in (2..50)] # G. C. Greubel, Sep 06 2019
    

Formula

a(n) = T(n, 2*n-4), T given by A027926.
a(n) = 1 + binomial(n, 4) + binomial(n-1, 2) = (n^4 - 6*n^3 + 23*n^2 - 42*n + 48)/24.
G.f.: x^2*(1 -3*x +5*x^2 -3*x^3 +x^4)/(1-x)^5. - Colin Barker, Jan 31 2012
a(n) = (1/6)*A152950(n-1)*A152948(n). - Bruno Berselli, Jan 31 2012
a(n) = A000217(A000217(n-2)+2)/3, a(n+1) - a(n) = A004006(n-1) for n > 2. - Waldemar Puszkarz, Jan 22 2016 [Adjusted for offset by Peter Munn, Jan 10 2023]
a(n) = 1 + Sum {i=3..5} binomial(n-1, i-1). - Jessica A. Tomasko, Nov 15 2022

Extensions

New name from Len Smiley, Oct 19 2001

A055472 Primes of the form k(k+1)/2+2 (i.e., two more than a triangular number).

Original entry on oeis.org

2, 3, 5, 17, 23, 47, 107, 173, 233, 353, 467, 563, 743, 863, 1277, 1433, 1487, 2213, 2417, 2777, 3083, 3323, 4007, 4373, 5153, 7877, 8387, 10733, 11177, 11783, 13043, 13697, 14537, 15053, 15227, 17207, 17393, 17957, 18917, 21323, 22157, 23873
Offset: 1

Author

Henry Bottomley, Jun 27 2000

Keywords

Comments

Equal to primes of the form (k^2+15)/8. Also equal to primes p such that 8*p-15 is a square. - Chai Wah Wu, Jul 14 2014
Primes of A152948. - Klaus Purath, Jan 03 2021

Crossrefs

Programs

  • Mathematica
    Select[Table[(n^2-n+4)/2,{n,3000}],PrimeQ] (* Vincenzo Librandi, Jul 14 2012 *)
    Select[Accumulate[Range[0,300]]+2,PrimeQ] (* Harvey P. Dale, Feb 05 2019 *)
  • Python
    import sympy
    [n*(n+1)/2+2 for n in range(10**6) if sympy.ntheory.primetest.isprime(n*(n+1)/2+2)] # Chai Wah Wu, Jul 14 2014

A279967 Square array read by antidiagonals upwards in which each term is the sum of prior elements in the same row, column, diagonal, or antidiagonal that divide n; the array is seeded with an initial value a(1)=1.

Original entry on oeis.org

1, 1, 2, 2, 2, 7, 2, 9, 10, 15, 2, 10, 1, 13, 17, 8, 0, 13, 1, 14, 9, 8, 0, 13, 3, 30, 13, 10, 2, 16, 1, 23, 5, 7, 14, 15, 2, 8, 28, 32, 2, 23, 2, 9, 49, 12, 0, 48, 2, 11, 1, 20, 3, 18, 13, 28, 0, 4, 1, 56, 5, 8, 16, 35, 46, 4, 2, 6, 2, 10
Offset: 1

Author

Alec Jones, Dec 24 2016

Keywords

Comments

From Hartmut F. W. Hoft, Jan 23 2017: (Start)
Shown by induction and direct (modular) computations for
column 1: Every number is even, except for the first two 1's; in addition to row 3, value 2 occurs in rows 4*k and 4*k+1, and every value in rows 4*k+2 and 4*k+3 is divisible by 4, for all k>=1.
column 2: The first four entries, 2, 2, 9 and 10, contain the only odd number; no nonzero entry in row k>3 has 9 as a factor, and value 0 occurs in rows 4*k+1 and 4*k+2, for all k>=1.
Conjecture:
a({1, 6, 8, 9, 10, 15, 26, 45, 48, 84, 96, 112, 115, 252, 336, 343}) =
{1, 7, 9,10, 15, 17, 30, 49, 48,104,117, 115, 122, 257, 343, 395} are the only numbers in the sequence with the property a(n) >= n (verified through n=500500, i.e., the triangle with 1000 antidiagonals).
This conjecture together with Bouniakowsky's conjecture that certain quadratic integer polynomials generate infinitely many primes (e.g. see A002496 for n^2+1 and A188382 for 2*n^2+n+1) implies that in every column in the triangle infinitely many prime sequence indices occur and therefore infinitely many 0's whenever the column contains no 1's. The proof is based on the fact that for a large enough prime sequence index p in whose prior column no 1 occurs then a(p)=0; therefore infinitely many 0's occur in that column. Obviously, once value 1 occurs in a column no 0 value can occur in a subsequent row.
Conjecture:
Every row in the triangle contains exactly two 1's.
(End)

Examples

			After 6 terms, the array looks like:
.
1   2   7
1   2
2
We have a(6) = 7 because a(1) = 1, a(3) = 2, a(4) = 2, and a(5) = 2 divide 6; 1 + 2 + 2 + 2 = 7.
From _Hartmut F. W. Hoft_, Jan 23 2017: (Start)
1   2   7  15  17   9  10  15  49  13   4  31  22
1   2  10  13  14  13  14   9  18  46  12  66
2   9   1   1  30   7   2   3  35  12   3
2  10  13   3   5  23  20  16  14  17
2   0  13  23   2   1   8  11   2
8   0   1  32  11   5   3   6
8  16  28   2  56  42   8
2   8  48   1   2 104
2   0   4  10   1
12   0   2  10
28   6   2
2  42
2
.
Expanded the triangle to the first 13 antidiagonals of the array, i.e. a(1) ... a(91), to show the start of the 2- and 0-value patterns in columns 1 and 2. The first 0 beyond column 2 is a(677) in row 27, column 11 of the triangle.
A188382(n)=2*n^2+n+1 for n>=0 are the alternate sequence indices for column 1 starting in row 1, 2*n^2+n+2 for n>=1 are the alternate sequence indices for column 2 starting in row 2, and 2*n^2+n+11 for n>=5 are the alternate sequence indices for column 11 starting in row 1.
The sequence indices in the triangle for row positions k>=1 in columns 1,..., 5 are given in sequences A000124(k), A152948(k+3), A152950(k+3), A145018(k+4) and A167499(k+4).
(End)
		

Crossrefs

Cf. A279966 for the related sequence which counts prior terms.
Cf. A269347 for a one-dimensional version of this sequence.
Cf. also A279211, A279212.

Programs

  • Mathematica
    (*  printing of the triangle is commented out of function a279967[]  *)
    pCol[{i_, j_}] := Map[{#, j}&, Range[1, i-1]]
    pDiag[{i_, j_}] := If[j>=i, Map[{#, j-i+#}&, Range[1, i-1]], Map[{i-j+#, #}&, Range[1, j-1]]]
    pRow[{i_, j_}] := Map[{i, #}&, Range[1, j-1]]
    pAdiag[{i_, j_}] := Map[{i+j-#, #}&, Range[1, j-1]]
    priorPos[{i_, j_}] := Join[pCol[{i, j}], pDiag[{i, j}], pRow[{i, j}], pAdiag[{i, j}]]
    seqPos[{i_, j_}] := (i+j-2)(i+j-1)/2+j
    antiDiag[k_] := Map[{k+1-#, #}&, Range[1, k]]
    upperTriangle[k_] := Flatten[Map[antiDiag, Range[1, k]], 1]
    a279967[k_] := Module[{ut=upperTriangle[k], ms=Table[" ", {i, 1, k}, {j, 1, k}], h, pos, val, seqL={1}}, ms[[1, 1]]=1; For[h=2, h<=Length[ut], h++, pos=ut[[h]]; val=Apply[Plus, Select[Map[ms[[Apply[Sequence, #]]]&, priorPos[pos]], #!=0 && Mod[seqPos[pos], #]==0&]]; AppendTo[seqL, val]; ms[[Apply[Sequence, pos]]]=val]; (* Print[TableForm[ms]]; *) seqL]
    a279967[13] (* values in first 13 antidiagonals *)
    (* Hartmut F. W. Hoft, Jan 23 2017 *)

A209293 Inverse permutation of A185180.

Original entry on oeis.org

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

Author

Boris Putievskiy, Jan 16 2013

Keywords

Comments

Permutation of the natural numbers. a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Enumeration table T(n,k) by diagonals. The order of the list
if n is odd - T(n-1,2),T(n-3,4),...,T(2,n-1),T(1,n),T(3,n-2),...T(n,1).
if n is even - T(n-1,2),T(n-3,4),...,T(3,n-2),T(1,n),T(2,n-1),...T(n,1).
Table T(n,k) contains:
Column number 1 A000217,
column number 2 A000124,
column number 3 A000096,
column number 4 A152948,
column number 5 A034856,
column number 6 A152950,
column number 7 A055998.
Row number 1 A000982,
row number 2 A097063.

Examples

			The start of the sequence as table:
  1....2...5...8..13..18...25...32...41...
  3....4...9..12..19..24...33...40...51...
  6....7..14..17..26..31...42...49...62...
  10..11..20..23..34..39...52...59...74...
  15..16..27..30..43..48...63...70...87...
  21..22..35..38..53..58...75...82..101...
  28..29..44..47..64..69...88...95..116...
  36..37..54..57..76..81..102..109..132...
  45..46..65..68..89..94..117..124..149...
  . . .
The start of the sequence as triangle array read by rows:
  1;
  2,3;
  5,4,6;
  8,9,7,10;
  13,12,14,11,15;
  18,19,17,20,16,21;
  25,24,26,23,27,22,28;
  32,33,31,34,30,35,29,36;
  41,40,42,39,43,38,44,37,45;
  . . .
Row number r contains permutation from r numbers:
if r is odd  ceiling(r^2/2), ceiling(r^2/2)+1, ceiling(r^2/2)-1, ceiling(r^2/2)+2, ceiling(r^2/2)-2,...r*(r+1)/2;
if r is even ceiling(r^2/2), ceiling(r^2/2)-1, ceiling(r^2/2)+1, ceiling(r^2/2)-2, ceiling(r^2/2)+2,...r*(r+1)/2;
		

Programs

  • Mathematica
    max = 10; row[n_] := Table[Ceiling[(n + k - 1)^2/2] + If[OddQ[k], 1, -1]*Floor[n/2], {k, 1, max}]; t = Table[row[n], {n, 1, max}]; Table[t[[n - k + 1, k]], {n, 1, max}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Jan 17 2013 *)
  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    m1=int((i+j)/2)+int(i/2)*(-1)**(i+t+1)
    m2=int((i+j+1)/2)+int(i/2)*(-1)**(i+t)
    m=(m1+m2-1)*(m1+m2-2)/2+m1

Formula

As table T(n,k) read by antidiagonals
T(n,k) = n*n/2+4*(floor((k-1)/2)+1)*n+ceiling((k-1)^2/2), n,k > 0.
As linear sequence
a(n) = (m1+m2-1)*(m1+m2-2)/2+m1, where
m1 = int((i+j)/2)+int(i/2)*(-1)^(i+t+1),
m2 = int((i+j+1)/2)+int(i/2)*(-1)^(i+t),
t = int((math.sqrt(8*n-7) - 1)/ 2),
i = n-t*(t+1)/2,
j = (t*t+3*t+4)/2-n.
Showing 1-10 of 26 results. Next