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

A028872 a(n) = n^2 - 3.

Original entry on oeis.org

1, 6, 13, 22, 33, 46, 61, 78, 97, 118, 141, 166, 193, 222, 253, 286, 321, 358, 397, 438, 481, 526, 573, 622, 673, 726, 781, 838, 897, 958, 1021, 1086, 1153, 1222, 1293, 1366, 1441, 1518, 1597, 1678, 1761, 1846, 1933, 2022, 2113, 2206, 2301
Offset: 2

Views

Author

Keywords

Comments

Number of edges in the join of two star graphs, each of order n, S_n * S_n. - Roberto E. Martinez II, Jan 07 2002
Number of vertices in the hexagonal triangle T(n-2) (see the He et al. reference). - Emeric Deutsch, Nov 14 2014
Positive X values of solutions to the equation X^3 + (X - 3)^2 + X - 6 = Y^2. To prove that X = n^2 + 4n + 1: Y^2 = X^3 + (X - 3)^2 + X - 6 = X^3 + X^2 - 5X + 3 = (X + 3)(X^2 - 2X + 1) = (X + 3)*(X - 1)^2 it means: X = 1 or (X + 3) must be a perfect square, so X = k^2 - 3 with k >= 2. we can put: k = n + 2, which gives: X = n^2 + 4n + 1 and Y = (n + 2)(n^2 + 4n). - Mohamed Bouhamida, Nov 29 2007
Equals binomial transform of [1, 5, 2, 0, 0, 0, ...]. - Gary W. Adamson, Apr 30 2008
Let C = 2 + sqrt(3) = 3.732...; and 1/C = 0.267...; then a(n) = (n - 2 + C) * (n - 2 + 1/C). Example: a(5) = 46 = (5 + 3.732...)*(5 + 0.267...). - Gary W. Adamson, Jul 29 2009
a(n), n >= 0, with a(0) = -3 and a(1) = -2, gives the values for a*c of indefinite binary quadratic forms [a, b, c] of discriminant D = 12 for b = 2*n. In general D = b^2 - 4*a*c > 0 and the form [a, b, c] is a*x^2 + b*x*y + c*y^2. - Wolfdieter Lang, Aug 15 2013
If A(n) is a 3 X 3 Khovanski matrix having 1 below the main diagonal, n on the main diagonal, and n^3 above the main diagonal, then (Det(A(n)) - 2*n^3) / n^4 = a(n). - Gary Detlefs, Nov 12 2013
Imagine a large square containing four smaller square "holes" of equal size: Let x = large square side and y = smaller square side; considering instances where the area of this shape [x^2 - 4*y^2] equals the length of its perimeter, [4*(x + 4*y)]. When y is an integer n, the above equation is satisfied by x = 2 + 2*sqrt(a(n)). - Peter M. Chema, Apr 10 2016
a(n+1) is the number of distinct linear partitions of 2 X n grid points. A linear partition is a way to partition given points by a line into two nonempty subsets. Details can be found in Pan's link. - Ran Pan, Jun 06 2016
Numbers represented as 141 in number base B: 141(5) = 46, 141(6) = 61 and, if 'digits' larger than (B-1) are allowed, 141(2) = 13, 141(3) = 22, 141(4) = 33. - Ron Knott, Nov 14 2017

Crossrefs

Essentially the same: A123968, A267874.

Programs

Formula

From R. J. Mathar, Apr 28 2008: (Start)
O.g.f.: x^2*(1 + 3*x - 2*x^2)/(1 - x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). (End)
a(n+1) = floor((n^4 + 2*n^3)/(n^2 + 1)). - Gary Detlefs, Feb 20 2010, corrected by Charles R Greathouse IV, Mar 18 2022
a(n) = a(n-1) + 2*n-1 (with a(2)=1). - Vincenzo Librandi, Nov 18 2010
a(n)*a(n-1) + 3 = (a(n) - n)^2 = A014209(n-2)^2. - Bruno Berselli, Dec 07 2011
a(n) = A000290(n) - 3. - Michel Marcus, Nov 13 2013
Sum_{n>=2} 1/a(n) = 2/3 - Pi*cot(sqrt(3)*Pi)/(2*sqrt(3)) = 1.476650189986093617... . - Vaclav Kotesovec, Apr 10 2016
E.g.f.: (x^2 + x - 3)*exp(x) + 2*x + 3. - G. C. Greubel, Jul 19 2017
Sum_{n>=2} (-1)^n/a(n) = -(2 + sqrt(3)*Pi*cosec(sqrt(3)*Pi))/6 = 0.8826191087... - Amiram Eldar, Nov 04 2020
From Amiram Eldar, Jan 29 2021: (Start)
Product_{n>=2} (1 + 1/a(n)) = sqrt(6)*csc(sqrt(3)*Pi)*sin(sqrt(2)*Pi).
Product_{n>=3} (1 - 1/a(n)) = -Pi*csc(sqrt(3)*Pi)/(4*sqrt(3)). (End)

A165900 a(n) = n^2 - n - 1.

Original entry on oeis.org

-1, -1, 1, 5, 11, 19, 29, 41, 55, 71, 89, 109, 131, 155, 181, 209, 239, 271, 305, 341, 379, 419, 461, 505, 551, 599, 649, 701, 755, 811, 869, 929, 991, 1055, 1121, 1189, 1259, 1331, 1405, 1481, 1559, 1639, 1721, 1805, 1891, 1979, 2069, 2161, 2255
Offset: 0

Views

Author

Philippe Deléham, Sep 29 2009

Keywords

Comments

Previous name was: Values of Fibonacci polynomial n^2 - n - 1.
Shifted version of the array denoted rB(0,2) in A132382, whose e.g.f. is exp(x)(1-x)^2. Taking the derivative gives the e.g.f. of this sequence. - Tom Copeland, Dec 02 2013
The Fibonacci numbers are generated by the series x/(1 - x - x^2). - T. D. Noe, Dec 04 2013
Absolute value of expression f(k)*f(k+1) - f(k-1)*f(k+2) where f(1)=1, f(2)=n. Sign is alternately +1 and -1. - Carmine Suriano, Jan 28 2014 [Can anybody clarify what is meant here? - Joerg Arndt, Nov 24 2014]
Carmine's formula is a special case related to 4 consecutive terms of a Fibonacci sequence. A generalization of this formula is |a(n)| = |f(k+i)*f(k+j) - f(k)*f(k+i+j)|/F(i)*F(j), where f denotes a Fibonacci sequence with the initial values 1 and n, and F denotes the original Fibonacci sequence A000045. The same results can be obtained with the simpler formula |a(n)| = |f(k+1)^2 - f(k)^2 - f(k+1)*f(k)|. Everything said so far is also valid for Fibonacci sequences f with the initial values f(1) = n - 2, f(2) = 2*n - 3. - Klaus Purath, Jun 27 2022
a(n) is the total number of dollars won when using the Martingale method (bet $1, if win then continue to bet $1, if lose then double next bet) for n trials of a wager with exactly one loss, n-1 wins. For the case with exactly one win, n-1 losses, see A070313. - Max Winnick, Jun 28 2022
Numbers m such that 4*m+5 is a square b^2, where b = 2*n -1, for m = a(n). - Klaus Purath, Jul 23 2022

Examples

			G.f. = -1 - x + x^2 + 5*x^3 + 11*x^4 + 19*x^5 + 29*x^6 + 41*x^7 + ... - _Michael Somos_, Mar 23 2023
		

Crossrefs

A028387 and A110331 are very similar sequences.

Programs

Formula

a(n+2) = (n+1)*a(n+1) - (n+2)*a(n).
G.f.: (x^2+2*x-1)/(1-x)^3.
E.g.f.: exp(x)*(x^2-1).
a(n) = - A188652(2*n) for n > 0. - Reinhard Zumkeller, Apr 13 2011
a(n) = A214803(A015614(n+1)) for n > 0. - Reinhard Zumkeller, Jul 29 2012
a(n+1) = a(n) + A005843(n) = A002378(n) - 1. - Ivan N. Ianakiev, Feb 18 2013
a(n+2) = A028387(n). - Michael B. Porter, Sep 26 2018
From Klaus Purath, Aug 25 2022: (Start)
a(2*n) = n*(a(n+1) - a(n-1)) -1.
a(2*n+1) = (2*n+1)*(a(n+1) - a(n)) - 1.
a(n+2) = a(n) + 4*n + 2.
a(n) = A014206(n-1) - 3 = A002061(n-1) - 2.
a(n) = A028552(n-2) + 1 = A014209(n-2) + 2 = 2* A034856(n-2) + 3.
a(n) = A008865(n-1) + n = A005563(n-1) - n.
a(n) = A014209(n-3) + 2*n = A028387(n-1) - 2*n.
a(n) = A152015(n)/n, n != 0.
(a(n+k) - a(n-k))/(2*k) = 2*n-1, for any k.
(End)
For n > 1, 1/a(n) = Sum_{k>=1} F(k)/n^(k+1), where F(n) = A000045(n). - Diego Rattaggi, Nov 01 2022
a(n) = a(1-n) for all n in Z. - Michael Somos, Mar 23 2023
For n > 1, 1/a(n) = Sum_{k>=1} F(2k)/((n+1)^(k+1)), where F(2n) = A001906(n). - Diego Rattaggi, Jan 20 2025
From Amiram Eldar, May 11 2025: (Start)
Sum_{n>=1} 1/a(n) = tan(sqrt(5)*Pi/2)*Pi/sqrt(5).
Product_{n>=3} 1 - 1/a(n) = -sec(sqrt(5)*Pi/2)*Pi/6.
Product_{n>=2} 1 + 1/a(n) = -sec(sqrt(5)*Pi/2)*Pi. (End)

Extensions

a(22) corrected by Reinhard Zumkeller, Apr 13 2011
Better name from Joerg Arndt, Oct 26 2024

A176271 The odd numbers as a triangle read by rows.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 13 2010

Keywords

Comments

A108309(n) = number of primes in n-th row.

Examples

			From _Philippe Deléham_, Oct 03 2011: (Start)
Triangle begins:
   1;
   3,  5;
   7,  9, 11;
  13, 15, 17, 19;
  21, 23, 25, 27, 29;
  31, 33, 35, 37, 39, 41;
  43, 45, 47, 49, 51, 53, 55;
  57, 59, 61, 63, 65, 67, 69, 71;
  73, 75, 77, 79, 81, 83, 85, 87, 89; (End)
		

Crossrefs

Programs

  • Haskell
    a176271 n k = a176271_tabl !! (n-1) !! (k-1)
    a176271_row n = a176271_tabl !! (n-1)
    a176271_tabl = f 1 a005408_list where
       f x ws = us : f (x + 1) vs where (us, vs) = splitAt x ws
    -- Reinhard Zumkeller, May 24 2012
    
  • Magma
    [n^2-n+2*k-1: k in [1..n], n in [1..15]]; // G. C. Greubel, Mar 10 2024
    
  • Maple
    A176271 := proc(n,k)
        n^2-n+2*k-1 ;
    end proc: # R. J. Mathar, Jun 28 2013
  • Mathematica
    Table[n^2-n+2*k-1, {n,15}, {k,n}]//Flatten (* G. C. Greubel, Mar 10 2024 *)
  • SageMath
    flatten([[n^2-n+2*k-1 for k in range(1,n+1)] for n in range(1,16)]) # G. C. Greubel, Mar 10 2024

Formula

T(n, k) = n^2 - n + 2*k - 1 for 1 <= k <= n.
T(n, k) = A005408(n*(n-1)/2 + k - 1).
T(2*n-1, n) = A016754(n-1) (main diagonal).
T(2*n, n) = A000466(n).
T(2*n, n+1) = A053755(n).
T(n, k) + T(n, n-k+1) = A001105(n), 1 <= k <= n.
T(n, 1) = A002061(n), central polygonal numbers.
T(n, 2) = A027688(n-1) for n > 1.
T(n, 3) = A027690(n-1) for n > 2.
T(n, 4) = A027692(n-1) for n > 3.
T(n, 5) = A027694(n-1) for n > 4.
T(n, 6) = A048058(n-1) for n > 5.
T(n, n-3) = A108195(n-2) for n > 3.
T(n, n-2) = A082111(n-2) for n > 2.
T(n, n-1) = A014209(n-1) for n > 1.
T(n, n) = A028387(n-1).
Sum_{k=1..n} T(n, k) = A000578(n) (Nicomachus's theorem).
Sum_{k=1..n} (-1)^(k-1)*T(n, k) = (-1)^(n-1)*A065599(n) (alternating sign row sums).
Sum_{j=1..n} (Sum_{k=1..n} T(j, k)) = A000537(n) (sum of first n rows).

A082111 a(n) = n^2 + 5*n + 1.

Original entry on oeis.org

1, 7, 15, 25, 37, 51, 67, 85, 105, 127, 151, 177, 205, 235, 267, 301, 337, 375, 415, 457, 501, 547, 595, 645, 697, 751, 807, 865, 925, 987, 1051, 1117, 1185, 1255, 1327, 1401, 1477, 1555, 1635, 1717, 1801, 1887, 1975, 2065, 2157, 2251, 2347, 2445, 2545, 2647
Offset: 0

Views

Author

Paul Barry, Apr 04 2003

Keywords

Comments

From Gary W. Adamson, Jul 29 2009: (Start)
Let (a,b) = roots to x^2 - 5*x + 1 = 0 = 4.79128... and 0.208712...
Then a(n) = (n + a) * (n + b). Example: a(5) = 51 = (5 + 4.79128...) * (5 + 0.208712...) (End)
For n > 0: a(n) = A176271(n+2,n). - Reinhard Zumkeller, Apr 13 2010
a(n-2) = n*(n+1) - 5, n >= 0, with a(-2) = -5 and a(-1) = -3, gives the values for a*c of indefinite binary quadratic forms [a, b, c] of discriminant D = 21 for b = 2*n + 1. In general D = b^2 - 4*a*c > 0 and the form [a, b, c] is a*x^2 + b*x*y + c*y^2. - Wolfdieter Lang, Aug 15 2013
Numbers m > 0 such that 4m+21 is a square. - Bruce J. Nicholson, Jul 19 2017
Numbers represented as 151 in number base B. If 'digits' from B upwards are allowed then 151(2)=15, 151(3)=25, 151(4)=37, 151(5)=51 also. - Ron Knott, Nov 14 2017
If A and B are sequences satisfying the recurrence t(n) = 5*t(n-1) - t(n-2) with initial values A(0) = 1, A(1) = n+5 and B(0) = -1, B(1) = n, then a(n) = A(i)^2 - A(i-1)*A(i+1) = B(j)^2 - B(j-1)*B(j+1) for i, j > 0. - Klaus Purath, Oct 18 2020
The prime terms in this sequence are listed in A089376. The prime factors are given in A038893. With the exception of 3 and 7, each prime factor p divides exactly 2 out of any p consecutive terms. If a(i) and a(k) form such a pair that are divisible by p, then i + k == -5 (mod p). - Klaus Purath, Nov 24 2020

Crossrefs

First row of A082110.

Programs

Formula

a(n) = 2*n + a(n-1) + 4 (with a(0)=1). - Vincenzo Librandi, Aug 08 2010
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3); a(0)=1, a(1)=7, a(2)=15. - Harvey P. Dale, Apr 22 2012
Sum_{n>=0} 1/a(n) = 8/15 + Pi*tan(sqrt(21)*Pi/2)/sqrt(21) = 1.424563592286456286... . - Vaclav Kotesovec, Apr 10 2016
From G. C. Greubel, Jul 19 2017: (Start)
G.f.: (1 + 4*x - 3*x^2)/(1 - x)^3.
E.g.f.: (x^2 + 6*x + 1)*exp(x). (End)
a(n) = A014209(n+1) - 2 = A338041(2*n+1). - Hugo Pfoertner, Oct 08 2020
a(n) = A249547(n+1) - A024206(n-4), n >= 5. - Klaus Purath, Nov 24 2020

Extensions

New title (using given formula) from Hugo Pfoertner, Oct 08 2020

A159016 Square array A, read by antidiagonals, with entry n in row k given by A(k,0) = A028387(k) and A(k,n) = A(k,n-1) + floor(sqrt(A(k,n-1))), n>0, k>=0.

Original entry on oeis.org

1, 2, 5, 3, 7, 11, 4, 9, 14, 19, 6, 12, 17, 23, 29, 8, 15, 21, 27, 34, 41, 10, 18, 25, 32, 39, 47, 55, 13, 22, 30, 37, 45, 53, 62, 71, 16, 26, 35, 43, 51, 60, 69, 79, 89, 20, 31, 40, 49, 58, 67, 77, 87, 98, 109, 24, 36, 46, 56, 65, 75, 85, 96, 107, 119, 131
Offset: 0

Views

Author

Philippe Deléham, Apr 02 2009

Keywords

Comments

Permutation of positive integers.

Examples

			Array begins:
...1....2....3....4....6....8...10...13...16...20..
...5....7....9...12...15...18...22...26...31...36..
..11...14...17...21...25...30...35...40...46...52..
..19...23...27...32...37...43...49...56...63...70..
..29...34...39...45...51...58...65...73...81...90..
..41...47...53...60...67...75...83...92..101..111..
..55...62...69...77...85...94..103..113..123..134..
..71...79...87...96..105..115..125..136..147..159..
..89...98..107..117..127..138..149..161..173..186..
.109..119..129..140..151..163..175..188..201..215..
		

Crossrefs

Extensions

Definition corrected by Philippe Deléham, Apr 04 2009
Edited by L. Edson Jeffery, May 28 2013

A084917 Positive numbers of the form 3*y^2 - x^2.

Original entry on oeis.org

2, 3, 8, 11, 12, 18, 23, 26, 27, 32, 39, 44, 47, 48, 50, 59, 66, 71, 72, 74, 75, 83, 92, 98, 99, 104, 107, 108, 111, 122, 128, 131, 138, 143, 146, 147, 156, 162, 167, 176, 179, 183, 188, 191, 192, 194, 200, 207, 218, 219, 227, 234, 236, 239, 242, 243, 251, 263, 264, 275, 282, 284
Offset: 1

Views

Author

Roger Cuculière, Jul 14 2003

Keywords

Comments

Positive integers k such that x^2 - 4xy + y^2 + k = 0 has integer solutions. (See the CROSSREFS section for sequences relating to solutions for particular k.)
Comments on method used, from Colin Barker, Jun 06 2014: (Start)
In general, we want to find the values of f, from 1 to 400 say, for which x^2 + bxy + y^2 + f = 0 has integer solutions for a given b.
In order to solve x^2 + bxy + y^2 + f = 0 we can solve the Pellian equation x^2 - Dy^2 = N, where D = b*b - 4 and N = 4*(b*b - 4)*f.
But since sqrt(D) < N, the classical method of solving x^2 - Dy^2 = N does not work. So I implemented the method described in the 1998 sci.math reference, which says:
"There are several methods for solving the Pellian equation when |N| > sqrt(d). One is to use a brute-force search. If N < 0 then search on y = sqrt(abs(n/d)) to sqrt((abs(n)(x1 + 1))/(2d)) and if N > 0 search on y = 0 to sqrt((n(x1 - 1))/(2d)) where (x1, y1) is the minimum positive solution (x, y) to x^2 - dy^2 = 1. If N < 0, for each positive (x, y) found by the search, also take (-x, y). If N > 0, also take (x, -y). In either case, all positive solutions are generated from these using (x1, y1) in the standard way."
Incidentally all my Pell code is written in B-Prolog, and is somewhat voluminous. (End)
Also, positive integers of the form -x^2 + 2xy + 2y^2 of discriminant 12. - N. J. A. Sloane, May 31 2014 [Corrected by Klaus Purath, May 07 2023]
The equivalent sequence for x^2 - 3xy + y^2 + k = 0 is A031363.
The equivalent sequence for x^2 - 5xy + y^2 + k = 0 is A237351.
A positive k does not appear in this sequence if and only if there is no integer solution of x^2 - 3*y^2 = -k with (i) 0 < y^2 <= k/2 and (ii) 0 <= x^2 <= k/2. See the Nagell reference Theorems 108 a and 109, pp. 206-7, with D = 3, N = k and (x_1,y_1) = (2,1). - Wolfdieter Lang, Jan 09 2015
From Klaus Purath, May 07 2023: (Start)
There are no squares in this sequence. Products of an odd number of terms as well as products of an odd number of terms and any terms of A014209 belong to the sequence.
Products of an even number of terms are terms of A014209. The union of this sequence and A014209 is closed under multiplication.
A positive number belongs to this sequence if and only if it contains an odd number of prime factors congruent to {2, 3, 11} modulo 12. If it contains prime factors congruent to {5, 7} modulo 12, these occur only with even exponents. (End)
From Klaus Purath, Jul 09 2023: (Start)
Any term of the sequence raised to an odd power also belongs to the sequence. Proof: t^(2n+1) = t*t^2n = (3*x^2 - y^2)*t^2n = 3*(x*t^n)^2 - (y*t^n)^2. It seems that t^(2n+1) occurs only if t also is in the sequence.
Joerg Arndt has proved that there are no squares in this sequence: Assume s^2 = 3*y^2 - x^2, then s^2 + x^2 = 3 * y^2, but the sum of two squares cannot be 3 * y^2, qed. (End)
That products of any 3 terms belong to the sequence can be proved by the following identity: (na^2 - b^2) (nc^2 - d^2) (ne^2 - f^2) = n[a(nce + df) + b(cf + de)]^2 - [na(cf + de) + b(nce + df)]^2. This can be verified by expanding both sides of the equation. - Klaus Purath, Jul 14 2023

Examples

			11 is in the sequence because 3 * 3^2 - 4^2 = 27 - 16 = 11.
12 is in the sequence because 3 * 4^2 - 6^2 = 48 - 36 = 12.
13 is not in the sequence because there is no solution in integers to 3y^2 - x^2 = 13.
From _Wolfdieter Lang_, Jan 09 2015: (Start)
Referring to the Jan 09 2015 comment above.
k = 1 is out because there is no integer solution of (i) 0 < y^2 <= 1/2.
For k = 4, 5, 6, and 7 one has y = 1, x = 0, 1 (and the negative of this). But x^2 - 3 is not -k for these k and x values. Therefore, these k values are missing.
For k = 8 .. 16 one has y = 1, 2 and x = 0, 1, 2. Only y = 2 has a chance and only for k = 8, 11 and 12 the x value 2, 1 and 0, respectively, solves x^2 - 12 = -k. Therefore 9, 10, 13, 14, 15, 16 are missing.
... (End)
		

References

  • T. Nagell, Introduction to Number Theory, Chelsea Publishing Company, New York, 1964.

Crossrefs

With respect to solutions of the equation in the early comment, see comments etc. in: A001835 (k = 2), A001075 (k = 3), A237250 (k = 11), A003500 (k = 12), A082841 (k = 18), A077238 (k = 39).
A141123 gives the primes.
For a list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.

Programs

  • Mathematica
    r[n_] := Reduce[n == 3*y^2 - x^2 && x > 0 && y > 0, {x, y}, Integers]; Reap[For[n = 1, n <= 1000, n++, rn = r[n]; If[rn =!= False, Print["n = ", n, ", ", rn /. C[1] -> 1 // Simplify]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Jan 21 2016 *)
    Select[Range[300],Length[FindInstance[3y^2-x^2==#,{x,y},Integers]]>0&] (* Harvey P. Dale, Apr 23 2023 *)

Extensions

Terms 26 and beyond from Colin Barker, Feb 06 2014

A086113 Number of 3 X n (0,1) matrices such that each row and each column is nondecreasing or nonincreasing.

Original entry on oeis.org

6, 36, 102, 216, 390, 636, 966, 1392, 1926, 2580, 3366, 4296, 5382, 6636, 8070, 9696, 11526, 13572, 15846, 18360, 21126, 24156, 27462, 31056, 34950, 39156, 43686, 48552, 53766, 59340, 65286, 71616, 78342, 85476, 93030, 101016, 109446, 118332
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    I:=[6, 36, 102, 216]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jun 24 2012
  • Mathematica
    CoefficientList[Series[6*(1+2x-x^2)/(1-x)^4,{x,0,40}],x] (* Vincenzo Librandi, Jun 24 2012 *)

Formula

a(n) = 2*n*(n^2 + 3*n - 1) = 2*n*A014209(n). More generally, number of m X n (0, 1) matrices such that each row and each column is increasing or decreasing is 2*n*(2*binomial(n+m-1, n)-m) = 2*m*(2*binomial(m+n-1, m)-n).
G.f.: 6*x*(1 + 2*x - x^2)/(1-x)^4. - Vincenzo Librandi, Jun 24 2012
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Vincenzo Librandi, Jun 24 2012

A064801 Take 1, skip 2, take 2, skip 3, take 3, etc.

Original entry on oeis.org

1, 4, 5, 9, 10, 11, 16, 17, 18, 19, 25, 26, 27, 28, 29, 36, 37, 38, 39, 40, 41, 49, 50, 51, 52, 53, 54, 55, 64, 65, 66, 67, 68, 69, 70, 71, 81, 82, 83, 84, 85, 86, 87, 88, 89, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 121, 122, 123, 124, 125, 126, 127, 128
Offset: 1

Views

Author

Robert G. Wilson v, Oct 21 2001

Keywords

Comments

A253607(a(n)) < 0. - Reinhard Zumkeller, Jan 05 2015
Integers m such that A000196(m) = A079643(m). - Firas Melaih, Dec 10 2020
Also possible values of floor(x*floor(x)) for real x >= 1. - Jianing Song, Feb 16 2021

Crossrefs

Cf. A061885 (complement), A253607.
Cf. A136272.

Programs

  • Haskell
    a064801 n = a064801_list !! (n-1)
    a064801_list = f 1 [1..] where
       f k xs = us ++ f (k + 1) (drop (k + 1) vs)
                where (us, vs) = splitAt k xs
    -- Reinhard Zumkeller, May 16 2014
    
  • Maple
    seq(`if`(floor(sqrt(k)) * (floor(sqrt(k)) + 1) > k, k, NULL), k = 0..2034); # a(1)..a(1000), Rainer Rosenthal, Jul 19 2024
  • Mathematica
    a = Table[n, {n, 0, 200} ]; b = {}; Do[a = Drop[a, {1, n} ]; b = Append[b, Take[a, {1, n} ]]; a = Drop[a, {1, n} ], {n, 1, 14} ]; Flatten[b]
    Flatten[Table[Range[n^2,n^2+n-1],{n,12}]] (* Harvey P. Dale, Dec 18 2015 *)
  • PARI
    { n=0; for (m=1, 10^9, s=m^2; a=0; for (k=0, m - 1, a=s+k; write("b064801.txt", n++, " ", a); if (n==1000, return)) ) } \\ Harry J. Smith, Sep 26 2009
    
  • Python
    from math import isqrt  # after Rainer Rosenthal
    def isA(k: int): return k < ((s:=isqrt(k)) * (s + 1))
    print([k for k in range(129) if isA(k)]) # Peter Luschny, Jul 19 2024

Formula

a(n) = A004202(n) - 1.
Can be interpreted as a table read by rows: T(n,k) = n^2 + k, 0 <= k < n. T(n,k) = 0 iff k > A000196(n); T(n,0) = A000290(n); T(n,1) = A002522(n) for n > 1; T(n,2) = A010000(n) = A059100(n) for n > 2; T(n, n-3) = A014209(n-1) for n > 2; T(n, n-2) = A028552(n) for n > 1; T(n, n-1) = A028387(n-1); T(2*n+1, n) = A001107(n+1). - Reinhard Zumkeller, Nov 18 2003
Numbers k such that floor(sqrt(k)) * (floor(sqrt(k)) + 1) > k. - Rainer Rosenthal, Jul 19 2024

A181510 Number of permutations of the multiset {1,1,2,2,3,3,...,n+1,n+1} avoiding the permutation patterns {132, 231, 2134}.

Original entry on oeis.org

6, 18, 34, 54, 78, 106, 138, 174, 214, 258, 306, 358, 414, 474, 538, 606, 678, 754, 834, 918, 1006, 1098, 1194, 1294, 1398, 1506, 1618, 1734, 1854, 1978, 2106, 2238, 2374, 2514, 2658, 2806, 2958, 3114, 3274, 3438, 3606, 3778, 3954, 4134, 4318, 4506, 4698, 4894
Offset: 1

Views

Author

Lara Pudwell, Oct 25 2010

Keywords

Comments

a(n) is also the surface ares of the n-th solid in the following recursive construction:
The first solid is a unit cube (hence a(1)=6).
To form the n-th solid from the (n-1)st solid, construct a row of 2n-1 cubes, then center the (n-1)st solid on top of this row. (For example, the second solid is a row of 3 unit cubes, with a single unit cube centered on top of the middle cube. This construction has surface area a(2)=18.)
The sequence provides all nonnegative integers m such that 2*m + 13 is a square. - Bruno Berselli, Mar 01 2013

Examples

			For n=1, the permutations of {1,1,2,2} avoiding the patterns {132, 231, 2134} are {1122, 1212, 1221, 2112, 2121, 2211}.
For n=2, the permutations of {1,1,2,2,3,3} avoiding the patterns {132, 231, 2134} are {112233, 121233, 122133, 211233, 212133, 221133, 311223, 312123, 312213, 321123, 321213, 322113, 331122, 331212, 331221, 332112, 332121, 332211}.
		

Crossrefs

Programs

Formula

a(n) = 2*n^2 + 6*n - 2.
From Bruno Berselli, Oct 29 2010: (Start)
G.f.: 2*x*(3-x^2)/(1-x)^3.
a(n) - 3*a(n-1) + 3*a(n-2) - a(n-3) = 0 for n > 3.
a(n) = 2*A014209(n) = 2*A082111(n-1) + 4 = A051936(2*n+2) + n + 4. (End)
Sum_{n>=1} 1/a(n) = 2/3 + Pi*tan(sqrt(13)*Pi/2)/(2*sqrt(13)). - Amiram Eldar, Dec 23 2022
E.g.f.: 2*(exp(x)*(x^2 + 4*x - 1) + 1). - Elmo R. Oliveira, Nov 17 2024

A093445 The triangular triangle.

Original entry on oeis.org

1, 3, 3, 6, 9, 6, 10, 18, 17, 10, 15, 30, 33, 27, 15, 21, 45, 54, 51, 39, 21, 28, 63, 80, 82, 72, 53, 28, 36, 84, 111, 120, 114, 96, 69, 36, 45, 108, 147, 165, 165, 150, 123, 87, 45, 55, 135, 188, 217, 225, 215, 190, 153, 107, 55, 66, 165, 234, 276, 294, 291, 270, 234
Offset: 1

Views

Author

Amarnath Murthy, Apr 02 2004

Keywords

Comments

The n-th row of the triangular table begins by considering n triangular numbers (A000217) in order. Now segregate them into n groups beginning with n members in the first group, n-1 members in the second group, etc. Now sum each group. Thus the first term is the sum of first n numbers = n(n+1)/2, the second term is the sum of the next n-1 terms (from n+1 to 2n-1), the third term is the sum of the next n-2 terms (2n to 3n-3), etc. and the last term is simply n(n+1)/2. This triangle can be called a triangular triangle. The sequence contains the triangle by rows.

Examples

			Triangle begins:
   1
   3,  3
   6,  9,   6
  10, 18,  17,  10
  15, 30,  33,  27,  15
  21, 45,  54,  51,  39, 21
  28, 63,  80,  82,  72, 53, 28
  36, 84, 111, 120, 114, 96, 69, 36
The row for n = 4 is (1+2+3+4), (5+6+7), (8+9), 10 => 10 18 17 10.
		

Crossrefs

Cf. A000217, A093446. TT(n, 2) = A045943. TT(n, n-1) = A014209. TT(0, k) = A027480.
Cf. A005920 (central terms), A002817 (row sums).

Programs

  • Haskell
    a093445 n k = a093445_row n !! (k-1)
    a093445_row n = f [n, n - 1 .. 1] [1 ..] where
       f [] _      = []
       f (x:xs) ys = sum us : f xs vs where (us,vs) = splitAt x ys
    a093445_tabl = map a093445_row [1 ..]
    -- Reinhard Zumkeller, Oct 03 2012
  • Maple
    A093445 := proc(n,k)
        A000217(k*n-A000217(k-1))-A000217((k-1)*n-A000217(k-2)) ;
    end proc:
    seq(seq(A093445(n,k),k=1..n),n=1..10) ; # R. J. Mathar, Dec 09 2015
  • Mathematica
    T[n_] := n(n + 1)/2; TT[n_, k_] := T[k*n - T[k - 1]] - T[(k - 1)*n - T[k - 2]]; Flatten[ Table[ TT[n, k], {n, 1, 11}, {k, 1, n}]] (* Robert G. Wilson v, Apr 24 2004 *)
    Table[Total/@TakeList[Range[(n(n+1))/2],Range[n,1,-1]],{n,20}]//Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 15 2019 *)

Formula

T(n) = A000217(n) is the n-th Triangular number. TT(n, k) is the k-th term of the n-th row, 0 < k <= n.
TT(n, k) = T(k*n - T(k - 1)) - T((k - 1)*n - T(k - 2)).
TT(n, 1) = TT(n, n) = T(n) = A000217(n).

Extensions

Edited, corrected and extended by Robert G. Wilson v, Apr 24 2004
Showing 1-10 of 25 results. Next