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-5 of 5 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

A271624 a(n) = 2*n^2 - 4*n + 4.

Original entry on oeis.org

2, 4, 10, 20, 34, 52, 74, 100, 130, 164, 202, 244, 290, 340, 394, 452, 514, 580, 650, 724, 802, 884, 970, 1060, 1154, 1252, 1354, 1460, 1570, 1684, 1802, 1924, 2050, 2180, 2314, 2452, 2594, 2740, 2890, 3044, 3202, 3364, 3530, 3700, 3874, 4052, 4234, 4420, 4610, 4804, 5002, 5204, 5410, 5620
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 11 2016

Keywords

Comments

Numbers n such that 2*n - 4 is a perfect square.
For n > 2, the number of square a(n)-gonal numbers is finite. - Muniru A Asiru, Oct 16 2016

Examples

			a(1) = 2*1^2 - 4*1 + 4 = 2.
		

Crossrefs

Cf. A002522, numbers n such that 2*n + k is a perfect square: no sequence (k = -9), A255843 (k = -8), A271649 (k = -7), A093328 (k = -6), A097080 (k = -5), this sequence (k = -4), A051890 (k = -3), A058331 (k = -2), A001844 (k = -1), A001105 (k = 0), A046092 (k = 1), A056222 (k = 2), A142463 (k = 3), A054000 (k = 4), A090288 (k = 5), A268581 (k = 6), A059993 (k = 7), (-1)*A147973 (k = 8), A139570 (k = 9), A271625 (k = 10), A222182 (k = 11), A152811 (k = 12), A181510 (k = 13), A161532 (k = 14), no sequence (k = 15).

Programs

  • Magma
    [ 2*n^2 - 4*n + 4: n in [1..60]];
    
  • Magma
    [ n: n in [1..6000] | IsSquare(2*n-4)];
    
  • Mathematica
    Table[2 n^2 - 4 n + 4, {n, 54}] (* Michael De Vlieger, Apr 11 2016 *)
    LinearRecurrence[{3,-3,1},{2,4,10},60] (* Harvey P. Dale, Jul 18 2023 *)
  • PARI
    x='x+O('x^99); Vec(2*x*(1-x+2*x^2)/(1-x)^3) \\ Altug Alkan, Apr 11 2016
    
  • PARI
    a(n)=2*n^2-4*n+4 \\ Charles R Greathouse IV, Apr 11 2016

Formula

a(n) = 2*A002522(n-1).
G.f.: 2*x*(1 - x + 2*x^2)/(1 - x)^3. - Ilya Gutkovskiy, Apr 11 2016
Sum_{n>=1} 1/a(n) = (1 + Pi*coth(Pi))/4 = 1.038337023734290587067... . - Vaclav Kotesovec, Apr 11 2016
a(n) = A005893(n-1), n > 1. - R. J. Mathar, Apr 12 2016
a(n) = 2 + 2*(n-1)^2. - Tyler Skywalker, Jul 21 2016
From Elmo R. Oliveira, Nov 17 2024: (Start)
E.g.f.: 2*(exp(x)*(x^2 - x + 2) - 2).
a(n) = 2*A160457(n).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 3. (End)

A361781 A(n,k) is the n-th term of the k-th inverse binomial transform of the Bell numbers (A000110); square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 0, 2, 1, -1, 1, 5, 1, -2, 2, 1, 15, 1, -3, 5, -3, 4, 52, 1, -4, 10, -13, 7, 11, 203, 1, -5, 17, -35, 36, -10, 41, 877, 1, -6, 26, -75, 127, -101, 31, 162, 4140, 1, -7, 37, -139, 340, -472, 293, -21, 715, 21147, 1, -8, 50, -233, 759, -1573, 1787, -848, 204, 3425, 115975
Offset: 0

Views

Author

Alois P. Heinz, Mar 23 2023

Keywords

Examples

			Square array A(n,k) begins:
    1,   1,   1,    1,     1,      1,       1,       1, ...
    1,   0,  -1,   -2,    -3,     -4,      -5,      -6, ...
    2,   1,   2,    5,    10,     17,      26,      37, ...
    5,   1,  -3,  -13,   -35,    -75,    -139,    -233, ...
   15,   4,   7,   36,   127,    340,     759,    1492, ...
   52,  11, -10, -101,  -472,  -1573,   -4214,   -9685, ...
  203,  41,  31,  293,  1787,   7393,   23711,   63581, ...
  877, 162, -21, -848, -6855, -35178, -134873, -421356, ...
		

Crossrefs

Columns k=0-5 give: A000110, A000296, A126617, A346738, A346739, A346740.
Rows n=0-2 give: A000012, A024000, A160457.
Main diagonal gives A290219.
Antidiagonal sums give A361380.
Cf. A108087.

Programs

  • Magma
    T:= func< n,k | (&+[(-k)^j*Binomial(n,j)*Bell(n-j): j in [0..n]]) >;
    A361781:= func< n,k | T(k, n-k) >;
    [A361781(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jun 12 2024
    
  • Maple
    A:= proc(n, k) option remember; uses combinat;
          add(binomial(n, j)*(-k)^j*bell(n-j), j=0..n)
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..10);
    # second Maple program:
    b:= proc(n, m) option remember;
         `if`(n=0, 1, b(n-1, m+1)+m*b(n-1, m))
        end:
    A:= (n, k)-> b(n, -k):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==0, BellB[n], Sum[(-k)^j*Binomial[n,j]*BellB[n-j], {j,0,n}]];
    A361781[n_, k_]= T[k, n-k];
    Table[A361781[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Jun 12 2024 *)
  • SageMath
    def T(n,k): return sum( (-k)^j*binomial(n,j)*bell_number(n-j) for j in range(n+1))
    def A361781(n, k): return T(k, n-k)
    flatten([[A361781(n, k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jun 12 2024

Formula

E.g.f. of column k: exp(exp(x) - k*x - 1).
A(n,k) = Sum_{j=0..n} (-k)^j*binomial(n,j)*Bell(n-j).

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.

A348621 The number of additions required to compute the permanent of general n X n matrices using Ryser's formula without Gray code ordering.

Original entry on oeis.org

0, 4, 21, 82, 275, 836, 2373, 6406, 16647, 41992, 103433, 249866, 593931, 1392652, 3227661, 7405582, 16842767, 38010896, 85196817, 189792274, 420478995, 926941204, 2034237461, 4445962262, 9680453655, 21005074456, 45432700953, 97978941466, 210721832987, 452045307932
Offset: 1

Views

Author

Stefano Spezia, Oct 25 2021

Keywords

References

  • Herbert John Ryser, Combinatorial Mathematics, volume 14 of Carus Mathematical Monographs. American Mathematical Soc., (1963), pp. 24-28.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{8,-25,38,-28,8},{0,4,21,82,275},30]

Formula

a(n) = (n^2 - 2*n + 2)*2^(n-1) + n - 2.
a(n) = n*A000337(n-1) + A000079(n) - 2.
a(n) = 8*a(n-1) - 25*a(n-2) + 38*a(n-3) - 28*a(n-4) + 8*a(n-5) for n > 5.
O.g.f.: x^2*(4 - 11*x + 14*x^2 - 8*x^3)/((1 - x)^2*(1 - 2*x)^3).
E.g.f.: 1 + exp(x)*(x - 2) + exp(2*x)*(2*x^2 - x + 1).
Showing 1-5 of 5 results.