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

A034856 a(n) = binomial(n+1, 2) + n - 1 = n*(n+3)/2 - 1.

Original entry on oeis.org

1, 4, 8, 13, 19, 26, 34, 43, 53, 64, 76, 89, 103, 118, 134, 151, 169, 188, 208, 229, 251, 274, 298, 323, 349, 376, 404, 433, 463, 494, 526, 559, 593, 628, 664, 701, 739, 778, 818, 859, 901, 944, 988, 1033, 1079, 1126, 1174, 1223, 1273, 1324, 1376, 1429, 1483
Offset: 1

Views

Author

Keywords

Comments

Number of 1's in the n X n lower Hessenberg (0,1)-matrix (i.e., the matrix having 1's on or below the superdiagonal and 0's above the superdiagonal).
If a 2-set Y and 2-set Z, having one element in common, are subsets of an n-set X then a(n-2) is the number of 3-subsets of X intersecting both Y and Z. - Milan Janjic, Oct 03 2007
Number of binary operations which have to be added to Moisil's algebras to obtain algebraic counterparts of n-valued Łukasiewicz logics. See the Wójcicki and Malinowski book, page 31. - Artur Jasinski, Feb 25 2010
Also (n + 1)!(-1)^(n + 1) times the determinant of the n X n matrix given by m(i,j) = i/(i+1) if i=j and otherwise 1. For example, (5+1)! * ((-1)^(5+1)) * Det[{{1/2, 1, 1, 1, 1}, {1, 2/3, 1, 1, 1}, {1, 1, 3/4, 1, 1}, {1, 1, 1, 4/5, 1}, {1, 1, 1, 1, 5/6}}] = 19 = a(5), and (6+1)! * ((-1)^(6+1)) * Det[{{1/2, 1, 1, 1, 1, 1}, {1, 2/3, 1, 1, 1, 1}, {1, 1, 3/4, 1, 1, 1}, {1, 1, 1, 4/5, 1, 1}, {1, 1, 1, 1, 5/6, 1}, {1, 1, 1, 1, 1, 6/7}}] = 26 = a(6). - John M. Campbell, May 20 2011
2*a(n-1) = n*(n+1) - 4, n>=0, with a(-1) = -2 and a(0) = -1, gives the values for a*c of indefinite binary quadratic forms [a, b, c] of discriminant D = 17 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
a(n) is not divisible by 3, 5, 7, or 11. - Vladimir Shevelev, Feb 03 2014
With a(0) = 1 and a(1) = 2, a(n-1) is the number of distinct values of 1 +- 2 +- 3 +- ... +- n, for n > 0. - Derek Orr, Mar 11 2015
Also, numbers m such that 8*m+17 is a square. - Bruno Berselli, Sep 16 2015
Omar E. Pol's formula from Apr 23 2008 can be interpreted as the position of an element located on the third diagonal of an triangular array (read by rows) provided n > 1. - Enrique Pérez Herrero, Aug 29 2016
a(n) is the sum of the numerator and denominator of the fraction that is the sum of 2/(n-1) + 2/n; all fractions are reduced and n > 2. - J. M. Bergot, Jun 14 2017
a(n) is also the number of maximal irredundant sets in the (n+2)-path complement graph for n > 1. - Eric W. Weisstein, Apr 12 2018
From Klaus Purath, Dec 07 2020: (Start)
a(n) is not divisible by primes listed in A038890. The prime factors are given in A038889 and the prime terms of the sequence are listed in A124199.
Each odd prime factor p divides exactly 2 out of any p consecutive terms with the exception of 17, which appears only once in such an interval of terms. If a(i) and a(k) form such a pair that are divisible by p, then i + k == -3 (mod p), see examples.
If A is a sequence satisfying the recurrence t(n) = 5*t(n-1) - 2*t(n-2) with the initial values either A(0) = 1, A(1) = n + 4 or A(0) = -1, A(1) = n-1, then a(n) = (A(i)^2 - A(i-1)*A(i+1))/2^i for i>0. (End)
Mark each point on a 4^n grid with the number of points that are visible from the point; for n > 1, a(n) is the number of distinct values in the grid. - Torlach Rush, Mar 23 2021
The sequence gives the number of "ON" cells in the cellular automaton on a quadrant of a square grid after the n-th stage, where the "ON" cells lie only on the external perimeter and the perimeter of inscribed squares having the cell (1,1) as a unique common vertex. See Spezia link. - Stefano Spezia, May 28 2025

Examples

			From _Bruno Berselli_, Mar 09 2015: (Start)
By the definition (first formula):
----------------------------------------------------------------------
  1       4         8           13            19              26
----------------------------------------------------------------------
                                                              X
                                              X              X X
                                X            X X            X X X
                    X          X X          X X X          X X X X
          X        X X        X X X        X X X X        X X X X X
  X      X X      X X X      X X X X      X X X X X      X X X X X X
          X        X X        X X X        X X X X        X X X X X
----------------------------------------------------------------------
(End)
From _Klaus Purath_, Dec 07 2020: (Start)
Assuming a(i) is divisible by p with 0 < i < p and a(k) is the next term divisible by p, then from i + k == -3 (mod p) follows that k = min(p*m - i - 3) != i for any integer m.
(1) 17|a(7) => k = min(17*m - 10) != 7 => m = 2, k = 24 == 7 (mod 17). Thus every a(17*m + 7) is divisible by 17.
(2) a(9) = 53 => k = min(53*m - 12) != 9 => m = 1, k = 41. Thus every a(53*m + 9) and a(53*m + 41) is divisible by 53.
(3) 101|a(273) => 229 == 71 (mod 101) => k = min(101*m - 74) != 71 => m = 1, k = 27. Thus every a(101*m + 27) and a(101*m + 71) is divisible by 101. (End)
From _Omar E. Pol_, Aug 08 2021: (Start)
Illustration of initial terms:                             _ _
.                                           _ _           |_|_|_
.                              _ _         |_|_|_         |_|_|_|_
.                   _ _       |_|_|_       |_|_|_|_       |_|_|_|_|_
.          _ _     |_|_|_     |_|_|_|_     |_|_|_|_|_     |_|_|_|_|_|_
.   _     |_|_|    |_|_|_|    |_|_|_|_|    |_|_|_|_|_|    |_|_|_|_|_|_|
.  |_|    |_|_|    |_|_|_|    |_|_|_|_|    |_|_|_|_|_|    |_|_|_|_|_|_|
.
.   1       4         8          13            19              26
------------------------------------------------------------------------ (End)
		

References

  • A. S. Karpenko, Łukasiewicz's Logics and Prime Numbers, 2006 (English translation).
  • G. C. Moisil, Essais sur les logiques non-chrysippiennes, Ed. Academiei, Bucharest, 1972.
  • Wójcicki and Malinowski, eds., Łukasiewicz Sentential Calculi, Wrocław: Ossolineum, 1977.

Crossrefs

Subsequence of A165157.
Triangular numbers (A000217) minus two.
Third diagonal of triangle in A059317.

Programs

  • Haskell
    a034856 = subtract 1 . a000096 -- Reinhard Zumkeller, Feb 20 2015
    
  • Magma
    [Binomial(n + 1, 2) + n - 1: n in [1..60]]; // Vincenzo Librandi, May 21 2011
    
  • Maple
    a := n -> hypergeom([-2, n-1], [1], -1);
    seq(simplify(a(n)), n=1..53); # Peter Luschny, Aug 02 2014
  • Mathematica
    f[n_] := n (n + 3)/2 - 1; Array[f, 55] (* or *) k = 2; NestList[(k++; # + k) &, 1, 55] (* Robert G. Wilson v, Jun 11 2010 *)
    Table[Binomial[n + 1, 2] + n - 1, {n, 53}] (* or *)
    Rest@ CoefficientList[Series[x (1 + x - x^2)/(1 - x)^3, {x, 0, 53}], x] (* Michael De Vlieger, Aug 29 2016 *)
  • Maxima
    A034856(n) := block(
            n-1+(n+1)*n/2
    )$ /* R. J. Mathar, Mar 19 2012 */
    
  • PARI
    A034856(n)=(n+3)*n\2-1 \\ M. F. Hasler, Jan 21 2015
    
  • Python
    def A034856(n): return n*(n+3)//2 -1 # G. C. Greubel, Jun 15 2025

Formula

G.f.: A(x) = x*(1 + x - x^2)/(1 - x)^3.
a(n) = A049600(3, n-2).
a(n) = binomial(n+2, 2) - 2. - Paul Barry, Feb 27 2003
With offset 5, this is binomial(n, 0) - 2*binomial(n, 1) + binomial(n, 2), the binomial transform of (1, -2, 1, 0, 0, 0, ...). - Paul Barry, Jul 01 2003
Row sums of triangle A131818. - Gary W. Adamson, Jul 27 2007
Binomial transform of (1, 3, 1, 0, 0, 0, ...). Also equals A130296 * [1,2,3,...]. - Gary W. Adamson, Jul 27 2007
Row sums of triangle A134225. - Gary W. Adamson, Oct 14 2007
a(n) = A000217(n+1) - 2. - Omar E. Pol, Apr 23 2008
From Jaroslav Krizek, Sep 05 2009: (Start)
a(n) = a(n-1) + n + 1 for n >= 1.
a(n) = n*(n-1)/2 + 2*n - 1.
a(n) = A000217(n-1) + A005408(n-1) = A005843(n-1) + A000124(n-1). (End)
a(n) = Hyper2F1([-2, n-1], [1], -1). - Peter Luschny, Aug 02 2014
a(n) = floor[1/(-1 + Sum_{m >= n+1} 1/S2(m,n+1))], where S2 is A008277. - Richard R. Forberg, Jan 17 2015
a(n) = A101881(2*(n-1)). - Reinhard Zumkeller, Feb 20 2015
a(n) = A253909(n+3) - A000217(n+3). - David Neil McGrath, May 23 2015
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>3. - David Neil McGrath, May 23 2015
For n > 1, a(n) = 4*binomial(n-1,1) + binomial(n-2,2), comprising the third column of A267633. - Tom Copeland, Jan 25 2016
From Klaus Purath, Dec 07 2020: (Start)
a(n) = A024206(n) + A024206(n+1).
a(2*n-1) = -A168244(n+1).
a(2*n) = A091823(n). (End)
Sum_{n>=1} 1/a(n) = 3/2 + 2*Pi*tan(sqrt(17)*Pi/2)/sqrt(17). - Amiram Eldar, Jan 06 2021
a(n) + a(n+1) = A028347(n+2). - R. J. Mathar, Mar 13 2021
a(n) = A000290(n) - A161680(n-1). - Omar E. Pol, Mar 26 2021
E.g.f.: 1 + exp(x)*(x^2 + 4*x - 2)/2. - Stefano Spezia, Jun 05 2021
a(n) = A024916(n) - A244049(n). - Omar E. Pol, Aug 01 2021
a(n) = A000290(n) - A000217(n-2). - Omar E. Pol, Aug 05 2021

Extensions

More terms from Zerinvary Lajos, May 12 2006

A055998 a(n) = n*(n+5)/2.

Original entry on oeis.org

0, 3, 7, 12, 18, 25, 33, 42, 52, 63, 75, 88, 102, 117, 133, 150, 168, 187, 207, 228, 250, 273, 297, 322, 348, 375, 403, 432, 462, 493, 525, 558, 592, 627, 663, 700, 738, 777, 817, 858, 900, 943, 987, 1032, 1078, 1125, 1173, 1222, 1272
Offset: 0

Views

Author

Barry E. Williams, Jun 14 2000

Keywords

Comments

If X is an n-set and Y a fixed (n-3)-subset of X then a(n-3) is equal to the number of 2-subsets of X intersecting Y. - Milan Janjic, Aug 15 2007
Bisection of A165157. - Jaroslav Krizek, Sep 05 2009
a(n) is the number of (w,x,y) having all terms in {0,...,n} and w=x+y-1. - Clark Kimberling, Jun 02 2012
Numbers m >= 0 such that 8m+25 is a square. - Bruce J. Nicholson, Jul 26 2017
a(n-1) = 3*(n-1) + (n-1)*(n-2)/2 is the number of connected, loopless, non-oriented, multi-edge vertex-labeled graphs with n edges and 3 vertices. Labeled multigraph analog of A253186. There are 3*(n-1) graphs with the 3 vertices on a chain (3 ways to label the middle graph, n-1 ways to pack edges on one of connections) and binomial(n-1,2) triangular graphs (one way to label the graphs, pack 1 or 2 or ...n-2 on the 1-2 edge, ...). - R. J. Mathar, Aug 10 2017
a(n) is also the number of vertices of the quiver for PGL_{n+1} (see Shen). - Stefano Spezia, Mar 24 2020
Starting from a(2) = 7, this is the 4th column of the array: natural numbers written by antidiagonals downwards. See the illustration by Kival Ngaokrajang and the cross-references. - Andrey Zabolotskiy, Dec 21 2021

References

  • Albert H. Beiler, Recreations in the Theory of Numbers, Dover, N.Y., 1964, p. 193.

Crossrefs

a(n) = A095660(n+1, 2): third column of (1, 3)-Pascal triangle.
Row n=2 of A255961.

Programs

Formula

G.f.: x*(3-2*x)/(1-x)^3.
a(n) = A027379(n), n > 0.
a(n) = A126890(n,2) for n > 1. - Reinhard Zumkeller, Dec 30 2006
a(n) = A000217(n) + A005843(n). - Reinhard Zumkeller, Sep 24 2008
If we define f(n,i,m) = Sum_{k=0..n-i} binomial(n,k)*Stirling1(n-k,i)*Product_{j=0..k-1} (-m-j), then a(n) = -f(n,n-1,3), for n >= 1. - Milan Janjic, Dec 20 2008
a(n) = A167544(n+8). - Philippe Deléham, Nov 25 2009
a(n) = a(n-1) + n + 2 with a(0)=0. - Vincenzo Librandi, Aug 07 2010
a(n) = Sum_{k=1..n} (k+2). - Gary Detlefs, Aug 10 2010
a(n) = A034856(n+1) - 1 = A000217(n+2) - 3. - Jaroslav Krizek, Sep 05 2009
Sum_{n>=1} 1/a(n) = 137/150. - R. J. Mathar, Jul 14 2012
a(n) = 3*n + A000217(n-1) = 3*n - floor(n/2) + floor(n^2/2). - Wesley Ivan Hurt, Jun 15 2013
a(n) = Sum_{i=3..n+2} i. - Wesley Ivan Hurt, Jun 28 2013
a(n) = 3*A000217(n) - 2*A000217(n-1). - Bruno Berselli, Dec 17 2014
a(n) = A046691(n) + 1. Also, a(n) = A052905(n-1) + 2 = A055999(n-1) + 3 for n>0. - Andrey Zabolotskiy, May 18 2016
E.g.f.: x*(6+x)*exp(x)/2. - G. C. Greubel, Apr 05 2019
Sum_{n>=1} (-1)^(n+1)/a(n) = 4*log(2)/5 - 47/150. - Amiram Eldar, Jan 10 2021
From Amiram Eldar, Feb 12 2024: (Start)
Product_{n>=1} (1 - 1/a(n)) = -5*cos(sqrt(33)*Pi/2)/(4*Pi).
Product_{n>=1} (1 + 1/a(n)) = 15*cos(sqrt(17)*Pi/2)/(2*Pi). (End)

A133622 a(n) = 1 if n is odd, a(n) = n/2+1 if n is even.

Original entry on oeis.org

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

Views

Author

Hieronymus Fischer, Sep 30 2007

Keywords

Comments

a(n) is the count of terms a(n+1) present so far in the sequence, with a(n+1) included in the count; example: a(1) = 1 "says" that there is 1 term "2" so far in the sequence; a(2) = 2 "says" that there are 2 terms "1" so far in the sequence... etc. This comment was inspired by A039617. - Eric Angelini, Mar 03 2020

Crossrefs

Programs

  • Haskell
    import Data.List (transpose)
    a133622 n = (1 - m) * n' + 1 where (n', m) = divMod n 2
    a133622_list = concat $ transpose [[1, 1 ..], [2 ..]]
    -- Reinhard Zumkeller, Feb 20 2015
    
  • Maple
    seq([1,n][],n=2..100); # Robert Israel, May 27 2016
  • Mathematica
    Riffle[Range[2,50],1,{1,-1,2}] (* Harvey P. Dale, Jan 19 2013 *)
  • PARI
    a(n)=if(n%2,1,n/2+1) \\ Charles R Greathouse IV, Sep 02 2015

Formula

a(n)=1+(binomial(n+1,2)mod n)=1+(binomial(n+1,n-1)mod n).
a(n)=binomial(n+2,2) mod n = binomial(n+2,n) mod n for n>2.
a(n)=1+(1+(-1)^n)*n/4.
a(n)=1+(A000217(n) mod n).
a(n)=a(n-2)+1, if n is even, a(n)=a(n-2) if n is odd.
a(n)=a(n-2)+1-(n mod 2)=a(n-2)+(1+(-1)^n)/2 for n>2.
a(n)=(a(n-3)+a(n-2))/a(n-1) for n>3.
G.f.: g(x)=x(1+2x-x^2-x^3)/(1-x^2)^2.
G.f.: (Q(0)-1-x)/x^2, where Q(k)= 1 + (k+1)*x/(1 - x/(x + (k+1)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, Apr 23 2013
a(n) = 2*a(n-2)-a(n-4) for n > 4. - Chai Wah Wu, May 26 2016
E.g.f.: exp(x) - 1 + x*sinh(x)/2. - Robert Israel, May 27 2016

A283394 a(n) = 3*n*(3*n + 7)/2 + 4.

Original entry on oeis.org

4, 19, 43, 76, 118, 169, 229, 298, 376, 463, 559, 664, 778, 901, 1033, 1174, 1324, 1483, 1651, 1828, 2014, 2209, 2413, 2626, 2848, 3079, 3319, 3568, 3826, 4093, 4369, 4654, 4948, 5251, 5563, 5884, 6214, 6553, 6901, 7258, 7624, 7999, 8383, 8776, 9178, 9589, 10009
Offset: 0

Views

Author

Bruno Berselli, Mar 23 2017

Keywords

Comments

Sum_{k = 0..n} (3*k + r)^3 is divisible by 3*n*(3*n + 2*r + 3)/2 + r^2: the sequence corresponds to the case r = 2 of this formula (other cases are listed in Crossrefs section).
Also, Sum_{k = 0..n} (3*k + 2)^3 / a(n) gives 2, 7, 15, 26, 40, 57, 77, 100, 126, 155, 187, 222, ... (A005449).
a(n) is even if n belongs to A014601. No term is divisible by 3, 5, 7 and 11.

Crossrefs

Sequences with formula 3*n*(3*n + 2*r + 3)/2 + r^2: A038764 (r=-1), A027468 (r=0), A081271 (r=1), this sequence (r=2), A027468 (r=3; offset: -1), A080855 (r=4; offset: -2).

Programs

  • Magma
    [3*n*(3*n+7)/2+4: n in [0..50]];
    
  • Mathematica
    Table[3 n (3 n + 7)/2 + 4, {n, 0, 50}]
    LinearRecurrence[{3,-3,1},{4,19,43},50] (* Harvey P. Dale, Mar 02 2019 *)
  • Maxima
    makelist(3*n*(3*n+7)/2+4, n, 0, 50);
    
  • PARI
    a(n) = 3*n*(3*n + 7)/2 + 4; \\ Indranil Ghosh, Mar 24 2017
  • Python
    [3*n*(3*n+7)/2+4 for n in range(50)]
    
  • Sage
    [3*n*(3*n+7)/2+4 for n in range(50)]
    

Formula

O.g.f.: (4 + 7*x - 2*x^2)/(1 - x)^3.
E.g.f.: (8 + 30*x + 9*x^2)*exp(x)/2.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = A081271(-n-2).
a(n) = 3*A095794(n+1) + 1.
a(n) = A034856(3*n+2) = A101881(6*n+2) = A165157(6*n+3) = A186349(6*n+3).
The inverse binomial transform yields 4, 15, 9, 0 (0 continued), therefore:
a(n) = 4*binomial(n,0) + 15*binomial(n,1) + 9*binomial(n,2).
Showing 1-4 of 4 results.