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

A014206 a(n) = n^2 + n + 2.

Original entry on oeis.org

2, 4, 8, 14, 22, 32, 44, 58, 74, 92, 112, 134, 158, 184, 212, 242, 274, 308, 344, 382, 422, 464, 508, 554, 602, 652, 704, 758, 814, 872, 932, 994, 1058, 1124, 1192, 1262, 1334, 1408, 1484, 1562, 1642, 1724, 1808, 1894, 1982, 2072, 2164, 2258, 2354, 2452, 2552
Offset: 0

Views

Author

Keywords

Comments

Draw n + 1 circles in the plane; sequence gives maximal number of regions into which the plane is divided. Cf. A051890, A386480.
Number of binary (zero-one) bitonic sequences of length n + 1. - Johan Gade (jgade(AT)diku.dk), Oct 15 2003
Also the number of permutations of n + 1 which avoid the patterns 213, 312, 13452 and 34521. Example: the permutations of 4 which avoid 213, 312 (and implicitly 13452 and 34521) are 1234, 1243, 1342, 1432, 2341, 2431, 3421, 4321. - Mike Zabrocki, Jul 09 2007
If Y is a 2-subset of an n-set X then, for n >= 3, a(n-3) is equal to the number of (n-3)-subsets and (n-1)-subsets of X having exactly one element in common with Y. - Milan Janjic, Dec 28 2007
With a different offset, competition number of the complete tripartite graph K_{n, n, n}. [Kim, Sano] - Jonathan Vos Post, May 14 2009. Cf. A160450, A160457.
A related sequence is A241119. - Avi Friedlich, Apr 28 2015
From Avi Friedlich, Apr 28 2015: (Start)
This sequence, which also represents the number of Hamiltonian paths in K_2 X P_n (A200182), may be represented by interlacing recursive polynomials in arithmetic progression (discriminant =-63). For example:
a(3*k-3) = 9*k^2 - 15*k + 8,
a(3*k-2) = 9*k^2 - 9*k + 4,
a(3*k-1) = 9*k^2 - 3*k + 2,
a(3*k) = 3*(k+1)^2 - 1. (End)
a(n+1) is the area of a triangle with vertices at (n+3, n+4), ((n-1)*n/2, n*(n+1)/2),((n+1)^2, (n+2)^2) with n >= -1. - J. M. Bergot, Feb 02 2018
For prime p and any integer k, k^a(p-1) == k^2 (mod p^2). - Jianing Song, Apr 20 2019
From Bernard Schott, Jan 01 2021: (Start)
For n >= 1, a(n-1) is the number of solutions x in the interval 0 <= x <= n of the equation x^2 - [x^2] = (x - [x])^2, where [x] = floor(x). For n = 3, the a(2) = 8 solutions in the interval [0, 3] are 0, 1, 3/2, 2, 9/4, 5/2, 11/4 and 3.
This is a variant of the 4th problem proposed during the 20th British Mathematical Olympiad in 1984 (see A002061). The interval [1, n] of the Olympiad problem becomes here [0, n], and only the new solution x = 0 is added. (End)
See A386480 for the almost identical sequence 1, 2, 4, 8, 14, 22, 32, 44, 58, 74, 92, 112, 134, ... which is the maximum number of regions that can be formed in the plane by drawing n circles, and the maximum number of regions that can be formed on the sphere by drawing n great circles. - N. J. A. Sloane, Aug 01 2025

Examples

			a(0) = 0^2 + 0 + 2 = 2.
a(1) = 1^2 + 1 + 2 = 4.
a(2) = 2^2 + 2 + 2 = 8.
a(6) = 4*5/5 + 5*6/5 + 6*7/5 + 7*8/5 + 8*9/5 = 44. - _Bruno Berselli_, Oct 20 2016
		

References

  • K. E. Batcher, Sorting Networks and their Applications. Proc. AFIPS Spring Joint Comput. Conf., Vol. 32, pp. 307-314 (1968). [for bitonic sequences]
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 73, Problem 3.
  • T. H. Cormen, C. E. Leiserson and R. L. Rivest, Introduction to Algorithms. MIT Press / McGraw-Hill (1990) [for bitonic sequences]
  • Indiana School Mathematics Journal, vol. 14, no. 4, 1979, p. 4.
  • D. E. Knuth, The Art of Computer Programming, vol3: Sorting and Searching, Addison-Wesley (1973) [for bitonic sequences]
  • J. D. E. Konhauser et al., Which Way Did the Bicycle Go?, MAA 1996, p. 177.
  • Derrick Niederman, Number Freak, From 1 to 200 The Hidden Language of Numbers Revealed, A Perigee Book, NY, 2009, p. 83.
  • A. M. Yaglom and I. 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. A014206 (dim 2), A046127 (dim 3), A059173 (dim 4), A059174 (dim 5).
A row of A059250.
Cf. A000124, A051890, A002522, A241119, A033547 (partial sums).
Cf. A002061 (central polygonal numbers).
Column 4 of A347570.

Programs

Formula

G.f.: 2*(x^2 - x + 1)/(1 - x)^3.
n hyperspheres divide R^k into at most C(n-1, k) + Sum_{i = 0..k} C(n, i) regions.
a(n) = A002061(n+1) + 1 for n >= 0. - Rick L. Shepherd, May 30 2005
Equals binomial transform of [2, 2, 2, 0, 0, 0, ...]. - Gary W. Adamson, Jun 18 2008
a(n) = A003682(n+1), n > 0. - R. J. Mathar, Oct 28 2008
a(n) = a(n-1) + 2*n (with a(0) = 2). - Vincenzo Librandi, Nov 20 2010
a(0) = 2, a(1) = 4, a(2) = 8, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n >= 3. - Harvey P. Dale, May 14 2011
a(n + 1) = n^2 + 3*n + 4. - Alonso del Arte, Apr 12 2015
a(n) = Sum_{i=n-2..n+2} i*(i + 1)/5. - Bruno Berselli, Oct 20 2016
Sum_{n>=0} 1/a(n) = Pi*tanh(Pi*sqrt(7)/2)/sqrt(7). - Amiram Eldar, Jan 09 2021
From Amiram Eldar, Jan 29 2021: (Start)
Product_{n>=0} (1 + 1/a(n)) = cosh(sqrt(11)*Pi/2)*sech(sqrt(7)*Pi/2).
Product_{n>=0} (1 - 1/a(n)) = cosh(sqrt(3)*Pi/2)*sech(sqrt(7)*Pi/2). (End)
a(n) = 2*A000124(n). - R. J. Mathar, Mar 14 2021
E.g.f.: exp(x)*(2 + 2*x + x^2). - Stefano Spezia, Apr 30 2022

Extensions

More terms from Stefan Steinerberger, Apr 08 2006

A332307 Array read by antidiagonals: T(m,n) is the number of (undirected) Hamiltonian paths in the m X n grid graph.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 8, 8, 1, 1, 14, 20, 14, 1, 1, 22, 62, 62, 22, 1, 1, 32, 132, 276, 132, 32, 1, 1, 44, 336, 1006, 1006, 336, 44, 1, 1, 58, 688, 3610, 4324, 3610, 688, 58, 1, 1, 74, 1578, 12010, 26996, 26996, 12010, 1578, 74, 1, 1, 92, 3190, 38984, 109722, 229348, 109722, 38984, 3190, 92, 1
Offset: 1

Views

Author

Andrew Howroyd, Feb 09 2020

Keywords

Examples

			Array begins:
================================================
m\n | 1  2   3     4      5       6        7
----+-------------------------------------------
  1 | 1  1   1     1      1       1        1 ...
  2 | 1  4   8    14     22      32       44 ...
  3 | 1  8  20    62    132     336      688 ...
  4 | 1 14  62   276   1006    3610    12010 ...
  5 | 1 22 132  1006   4324   26996   109722 ...
  6 | 1 32 336  3610  26996  229348  1620034 ...
  7 | 1 44 688 12010 109722 1620034 13535280 ...
  ...
		

Crossrefs

Formula

T(n,m) = T(m,n).

A137882 Number of (directed) Hamiltonian paths in the n-ladder graph.

Original entry on oeis.org

2, 8, 16, 28, 44, 64, 88, 116, 148, 184, 224, 268, 316, 368, 424, 484, 548, 616, 688, 764, 844, 928, 1016, 1108, 1204, 1304, 1408, 1516, 1628, 1744, 1864, 1988, 2116, 2248, 2384, 2524, 2668, 2816, 2968, 3124, 3284, 3448, 3616, 3788, 3964, 4144, 4328, 4516, 4708, 4904, 5104, 5308, 5516, 5728, 5944, 6164, 6388, 6616, 6848, 7084, 7324, 7568, 7816
Offset: 1

Views

Author

Eric W. Weisstein, Feb 20 2008

Keywords

Crossrefs

Programs

  • Maple
    A137882:=n->2*(n^2-n+2): 2,seq(A137882(n), n=2..100); # Wesley Ivan Hurt, Apr 25 2017
  • Mathematica
    CoefficientList[Series[2*x*(1 + x - x^2 + x^3)/(1 - x)^3, {x,0,50}], x] (* G. C. Greubel, Apr 25 2017 *)
    LinearRecurrence[{3,-3,1},{2,8,16,28},70] (* Harvey P. Dale, Nov 15 2018 *)
  • PARI
    my(x='x+O('x^50)); Vec(2*x*(1 + x - x^2 + x^3)/(1 - x)^3) \\ G. C. Greubel, Apr 25 2017

Formula

For n>2, m = p^3*q (p,q = primes), a(n) = Sum_{d|m} (n-1)^(bigomega(d) - omega(d)) = Sum_{d|m} (n-1)^(A001222(d) - A001221(d)). - Jaroslav Krizek, Sep 24 2009
For n>1, a(n) = 2*(n^2 - n + 2); first diagonal of A154685. - Vincenzo Librandi, Nov 24 2010
G.f.: 2*x*(1+x-x^2+x^3)/(1-x)^3. - Colin Barker, Jan 20 2012
Sum_{n>=1} 1/a(n) = 1/4 + Pi*tanh(sqrt(7)*Pi/2)/(2*sqrt(7)). - Amiram Eldar, Dec 23 2022
From Elmo R. Oliveira, Jun 06 2025: (Start)
E.g.f.: 2*(exp(x)*(2 + x^2) - (2 + x)).
a(n) = 2*A003682(n).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 4. (End)

Extensions

Extended and formula corrected by Max Alekseyev, Apr 11 2009
Corrected the formula which was confusing offsets - R. J. Mathar, Jun 04 2010

A219686 T(n,k)=Number of nXk arrays of the minimum value of corresponding elements and their horizontal, vertical or antidiagonal neighbors in a random, but sorted with lexicographically nondecreasing rows and nonincreasing columns, 0..2 nXk array.

Original entry on oeis.org

3, 3, 3, 6, 4, 6, 10, 8, 9, 10, 15, 14, 31, 19, 15, 21, 22, 87, 99, 35, 21, 28, 32, 208, 427, 269, 60, 28, 36, 44, 452, 1531, 1688, 655, 98, 36, 45, 58, 922, 5031, 8964, 5726, 1506, 154, 45, 55, 74, 1799, 15763, 44736, 44816, 18486, 3356, 234, 55, 66, 92, 3394, 47784
Offset: 1

Views

Author

R. H. Hardin Nov 25 2012

Keywords

Comments

Table starts
..3...3.....6......10........15.........21.........28..........36.........45
..3...4.....8......14........22.........32.........44..........58.........74
..6...9....31......87.......208........452........922........1799.......3394
.10..19....99.....427......1531.......5031......15763.......47784.....140586
.15..35...269....1688......8964......44736.....219216.....1062133....5046678
.21..60...655....5726.....44816.....344926....2709320....21474269..167685059
.28..98..1506...18486....220182....2706117...35011623...461414270.5979059010
.36.154..3356...59458...1116208...22404783..479633094.10451333258
.45.234..7278..189516...5697556..187497531.6609458081
.55.345.15335..589078..28354294.1518906665
.66.495.31362.1771979.135630422
.78.693.62286.5155016

Examples

			Some solutions for n=3 k=4
..1..1..1..1....0..0..0..0....1..1..0..0....1..1..0..0....1..1..1..0
..1..1..1..1....0..0..0..0....1..1..0..0....1..0..0..0....1..1..0..0
..2..1..1..1....1..1..0..0....2..2..0..0....2..0..0..0....2..2..0..0
		

Crossrefs

Column 1 and row 1 are A000217 for n>1
Row 2 is A003682 for n>1

A221542 T(n,k) = Number of 0..k arrays of length n with each element differing from at least one neighbor by something other than 1, starting with 0.

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 0, 3, 4, 2, 0, 4, 8, 10, 3, 0, 5, 14, 30, 22, 5, 0, 6, 22, 68, 103, 54, 8, 0, 7, 32, 130, 303, 364, 134, 13, 0, 8, 44, 222, 716, 1386, 1276, 334, 21, 0, 9, 58, 350, 1455, 4018, 6311, 4483, 822, 34, 0, 10, 74, 520, 2658, 9665, 22466, 28762, 15740, 2014, 55, 0, 11
Offset: 1

Views

Author

R. H. Hardin, Jan 19 2013

Keywords

Comments

Table starts
..0.....0......0........0.........0.........0..........0...........0
..1.....2......3........4.........5.........6..........7...........8
..1.....4......8.......14........22........32.........44..........58
..2....10.....30.......68.......130.......222........350.........520
..3....22....103......303.......716......1455.......2658........4487
..5....54....364.....1386......4018......9665......20386.......39007
..8...134...1276.....6311.....22466.....64047.....156098......338711
.13...334...4483....28762....125701....424593....1195561.....2941622
.21...822..15740...131012....703193...2814515....9156379....25546512
.34..2014..55274...596784...3933916..18656979...70126074...221859676
.55..4934.194095..2718469..22007609.123673887..537074685..1926747595
.89.12110.681576.12383368.123117952.819813575.4113296146.16732904887

Examples

			Some solutions for n=6 k=4
..0....0....0....0....0....0....0....0....0....0....0....0....0....0....0....0
..4....2....2....3....2....0....4....0....4....4....3....4....0....4....4....4
..0....4....4....4....0....2....3....2....3....0....0....4....2....1....4....4
..0....0....0....4....4....4....1....3....1....4....2....2....0....1....2....0
..3....2....4....4....4....0....0....3....1....1....4....4....4....2....0....0
..0....2....1....2....0....2....2....3....3....1....4....2....0....0....0....3
		

Crossrefs

Column 1 is A000045(n-1).
Row 2 is A000027.
Row 3 is A003682.
Row 4 is A034262.

Formula

Empirical for column k:
k=1: a(n) = a(n-1) +a(n-2)
k=2: a(n) = 3*a(n-1) -2*a(n-2) +4*a(n-4)
k=3: a(n) = 3*a(n-1) +2*a(n-2) -a(n-3) +a(n-4)
k=4: a(n) = 5*a(n-1) -3*a(n-2) +a(n-3) +15*a(n-4) +3*a(n-5) for n>6
k=5: a(n) = 5*a(n-1) +3*a(n-2) +9*a(n-4) +6*a(n-5) +3*a(n-6)
k=6: a(n) = 7*a(n-1) -4*a(n-2) +6*a(n-3) +26*a(n-4) +10*a(n-5) +16*a(n-6) +12*a(n-8)
k=7: a(n) = 7*a(n-1) +4*a(n-2) +5*a(n-3) +20*a(n-4) +20*a(n-5) +23*a(n-6) -6*a(n-7) +3*a(n-8)
Empirical for row n:
n=2: a(n) = 1*n for n>1
n=3: a(n) = 1*n^2 - 1*n + 2 for n>1
n=4: a(n) = 1*n^3 + 1*n
n=5: a(n) = 1*n^4 + 1*n^3 - 3*n^2 + 10*n - 9 for n>3
n=6: a(n) = 1*n^5 + 2*n^4 - 6*n^3 + 21*n^2 - 31*n + 23 for n>4
n=7: a(n) = 1*n^6 + 3*n^5 - 8*n^4 + 25*n^3 - 30*n^2 + 20*n - 9 for n>3

A201375 T(n,k)=Number of nXk 0..1 arrays with rows and columns lexicographically nondecreasing read forwards, and nonincreasing read backwards.

Original entry on oeis.org

2, 2, 2, 2, 3, 2, 2, 4, 4, 2, 2, 5, 8, 5, 2, 2, 6, 14, 14, 6, 2, 2, 7, 22, 36, 22, 7, 2, 2, 8, 32, 80, 80, 32, 8, 2, 2, 9, 44, 157, 268, 157, 44, 9, 2, 2, 10, 58, 280, 786, 786, 280, 58, 10, 2, 2, 11, 74, 464, 2016, 3739, 2016, 464, 74, 11, 2, 2, 12, 92, 726, 4608, 15574, 15574, 4608
Offset: 1

Views

Author

R. H. Hardin Nov 30 2011

Keywords

Comments

Table starts
.2..2..2....2.....2......2........2.........2...........2............2
.2..3..4....5.....6......7........8.........9..........10...........11
.2..4..8...14....22.....32.......44........58..........74...........92
.2..5.14...36....80....157......280.......464.........726.........1085
.2..6.22...80...268....786.....2016......4608........9582........18446
.2..7.32..157...786...3739....15574.....55410......170616.......465037
.2..8.44..280..2016..15574...115168....728078.....3793342.....16517460
.2..9.58..464..4608..55410...728078...8866257....88486476....701948916
.2.10.74..726..9582.170616..3793342..88486476..1799674094..28852930912
.2.11.92.1085.18446.465037.16517460.701948916.28852930912.976134459840

Examples

			Some solutions for n=7 k=5
..0..0..0..1..1....0..0..0..1..1....0..0..1..1..1....0..0..0..1..1
..0..0..0..1..1....0..0..0..1..1....0..1..0..1..1....0..0..0..1..1
..0..0..0..1..1....1..1..1..0..1....0..1..1..0..1....0..1..1..0..1
..0..0..1..0..1....1..1..1..0..1....0..1..1..0..1....1..0..1..0..1
..0..1..0..0..1....1..1..1..1..0....0..1..1..1..0....1..0..1..1..0
..1..0..0..0..1....1..1..1..1..0....0..1..1..1..0....1..1..0..0..0
..1..1..1..1..0....1..1..1..1..0....1..0..0..0..0....1..1..0..0..0
		

Crossrefs

Column 3 is A003682

A386480 a(0) = 1; thereafter a(n) = n^2 - n + 2.

Original entry on oeis.org

1, 2, 4, 8, 14, 22, 32, 44, 58, 74, 92, 112, 134, 158, 184, 212, 242, 274, 308, 344, 382, 422, 464, 508, 554, 602, 652, 704, 758, 814, 872, 932, 994, 1058, 1124, 1192, 1262, 1334, 1408, 1484, 1562, 1642, 1724, 1808, 1894, 1982, 2072, 2164, 2258, 2354, 2452, 2552, 2654, 2758, 2864, 2972, 3082, 3194, 3308, 3424, 3542, 3662, 3784
Offset: 0

Views

Author

N. J. A. Sloane, Aug 01 2025

Keywords

Comments

Maximum number of regions that can be formed in the plane by drawing n circles (of any size), also maximum number of regions that can be formed on the sphere by drawing n great circles.
It is unfortunate that A014206 (which should have been this sequence) starts 2, 4, 8, 14, 22, 32, 44, 58, 74, 92, ... and has offset 0, but it is much too late to change it now. A014206 is, however, the main entry for this problem and the present sequence has been created to serve as a pointer to it.

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 73, Problem 3.

Crossrefs

See A014206 for further information (including additional references).

Programs

Formula

From Stefano Spezia, Aug 01 2025: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 3.
G.f.: (1 - x + x^2 + x^3)/(1 - x)^3.
E.g.f.: exp(x)*(2 + x^2) - 1. (End)
a(n) = A003682(n) = A002061(n)+1, n>=2. - R. J. Mathar, Aug 03 2025

A144336 Triangle read by rows, 2*A144328 - A007318^(-1).

Original entry on oeis.org

1, 3, 1, 1, 4, 3, 3, -1, 7, 5, 1, 6, -2, 10, 7, 3, -3, 14, -4, 13, 9, 1, 8, -11, 26, -7, 16, 11, 3, -5, 25, -29, 43, -11, 19, 13, 1, 10, -24, 62, -62, 66, -16, 22, 15, 3, -7, 40, -78, 134, -116, 96, -22, 25, 17
Offset: 1

Views

Author

Gary W. Adamson & Roger L. Bagula, Sep 18 2008

Keywords

Comments

Row sums = A003682: (1, 4, 8, 14, 22, 32, 44,...).

Examples

			First few rows of the triangle =
1;
3, 1;
1, 4, 3
3, -1, 7, 5;
1, 6, -2, 10, 7;
3, -3, 14, -4, 13, 9;
1, 8, -11, 26, -7, 16, 11;
3, -5, 25, -29, 43, -11, 19, 13;
...
		

Crossrefs

Formula

Twice triangle A144328 minus the inverse of Pascal's triangle.

A135443 Number of maximal directed trails in the labeled n-ladder graph P_2 X P_n.

Original entry on oeis.org

2, 8, 12, 40, 84, 144, 220, 312, 420, 544, 684, 840, 1012, 1200, 1404, 1624, 1860, 2112, 2380, 2664, 2964, 3280, 3612, 3960, 4324, 4704, 5100, 5512, 5940, 6384, 6844, 7320, 7812, 8320, 8844, 9384, 9940, 10512, 11100, 11704, 12324, 12960, 13612, 14280
Offset: 1

Views

Author

Yasutoshi Kohmoto, Feb 18 2008

Keywords

Examples

			For n = 4 the graph is
  .__.__.__.
  |__|__|__|
Names of nodes:
  1 2 3 4
  a b c d
Maximal directed paths which start from node 3:
  34dcba123c
  34dc32ba12
  34dc321ab2
  34dc321abc
  3cd432ba12
  3cd4321ab2
  3cd4321abc
  3cba1234dc
  321abc34dc
  321abcd43c
There are also paths from nodes c,b,2. So a(4) = 4*10 = 40.
		

Crossrefs

Apart from initial terms sequence is the same as A033586.

Formula

For n > 2, a(n) = 4 * (n-2) * (2*n - 3) = A033586(n-2). - Max Alekseyev, May 04 2023

Extensions

Edited and extended by Max Alekseyev, May 04 2023
Showing 1-9 of 9 results.