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

A002717 a(n) = floor(n(n+2)(2n+1)/8).

Original entry on oeis.org

0, 1, 5, 13, 27, 48, 78, 118, 170, 235, 315, 411, 525, 658, 812, 988, 1188, 1413, 1665, 1945, 2255, 2596, 2970, 3378, 3822, 4303, 4823, 5383, 5985, 6630, 7320, 8056, 8840, 9673, 10557, 11493, 12483, 13528, 14630, 15790, 17010, 18291, 19635, 21043, 22517, 24058
Offset: 0

Views

Author

Keywords

Comments

Number of triangles in triangular matchstick arrangement of side n, for n >= 1. Row sums of A085691.
We observe that the sequence is the transform of A006578 by the following transform T: T(u_0,u_1,u_2,u_3,...)=(u_0,u_0+u_1, u_0+u_1+u_2, u_0+u_1+u_2+u_3+u_4,...). In another terms v_p=sum(u_k,k=0..p) and the G.f phi_v of v is given by: phi_v=phi_u/(1-z). - Richard Choulet, Jan 28 2010
Row sums of A220053, for n > 0. - Reinhard Zumkeller, Dec 03 2012
a(n) has the expansion (1*0)+(1*1)+(4*1)+(4*2)+(7*2)+(7*3)+..., where the expansion stops when a(n) has n+1 number of terms. The expansion starts at (1*0), and progresses by alternating addition of 1 to the second number and 3 to the first number. - Arlu Genesis A. Padilla, Jun 04 2014
Taking the absolute values of each n-th difference and excluding the first n terms of each mentioned sequence, A002717 has the first difference A006578 (see formula of Michael Somos dated Jun 09 2014), the second difference A032766 (see 'partial sum' crossref), the third difference A000034, the fourth difference A000012, and the fifth to n-th difference A000004. - Arlu Genesis A. Padilla, Jun 12 2014

Examples

			f(3)=13 because the following figure contains 13 triangles if horizontal bars are added:
....... /\
...... /\/\
..... /\/\/\
G.f. = x + 5*x^2 + 13*x^3 + 27*x^4 + 48*x^5 + 78*x^6 + 118*x^7 + 170*x^8 + ...
		

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, p. 83.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000292 number of triangles with same orientation as largest triangle, A002623 number of triangles pointing in opposite direction to largest triangle, A085691 number of triangles of side k in arrangement of side n.
Bisections: A135712 (odd part), A135713 (even part).

Programs

  • Magma
    [Floor(n*(n+2)*(2*n+1)/8): n in [0..50]]; // Wesley Ivan Hurt, Jun 04 2014
  • Maple
    A002717:=n->floor(n*(n+2)*(2*n+1)/8); seq(A002717(n), n=0..100);
  • Mathematica
    Table[Floor[n(n+2)(2n+1)/8],{n,0,50}] (* or *) LinearRecurrence[{3,-2,-2,3,-1},{0,1,5,13,27},50] (* Harvey P. Dale, Jan 20 2013 *)
  • PARI
    {a(n) = n * (n+2) * (2*n+1) \ 8};
    

Formula

a(n) = (1/16)*[2n(2n+1)(n+2)+cos(Pi*n)-1]. - Justin C. Bozonier (justinb67(AT)excite.com), Dec 05 2000
a(m+1)-2a(m)+2a(m-2)-a(m-3) = 3. - Len Smiley, Oct 08 2001
a(n) = (2n(2n+1)(n+2)+(-1)^n-1)/16. - Wesley Petty (Wesley.Petty(AT)mail.tamucc.edu), Oct 25 2003
a(n) = A000292(n-1) + A002623(n-2). - Hugo Pfoertner, Mar 06 2004
a(n) = Sum_{k=0..n} (-1)^(n-k)*k*binomial(k+1,2).
G.f.: x(1+2x)/((1+x)(1-x)^4). - Simon Plouffe in his 1992 dissertation (with a different offset).
a(0)=0, a(1)=1, a(2)=5, a(3)=13, a(4)=27, a(n)=3*a(n-1)-2*a(n-2)-2*a(n-3)+ 3*a(n-4)- a(n-5). - Harvey P. Dale, Jan 20 2013
a(n) = a(n-1) + A016777(floor(0.5*n))*floor(0.5+0.5*n). - Arlu Genesis A. Padilla, Jun 04 2014
a(-n) = - A045947(n). a(n) = a(n-1) + A006578(n). - Michael Somos, Jun 09 2014
a(n) = Sum_{i=1..n} T(n-i+1)+T(n-2*i+1), where T(n)=n*(n+1)/2=A000217(n) if n>0 and 0 if n<=0. So we have a(n+2)-a(n)=(n+2)^2+(n+1)*(n+2)/2. - Maurice Mischler, Sep 08 2014
E.g.f.: (x*(2*x^2 + 11*x + 9)*cosh(x) + (2*x^3 + 11*x^2 + 9*x - 1)*sinh(x))/8. - Stefano Spezia, Jul 19 2022

A130517 Triangle read by rows: row n counts down from n in steps of 2, then counts up the remaining elements in the set {1,2,...,n}, again in steps of 2.

Original entry on oeis.org

1, 2, 1, 3, 1, 2, 4, 2, 1, 3, 5, 3, 1, 2, 4, 6, 4, 2, 1, 3, 5, 7, 5, 3, 1, 2, 4, 6, 8, 6, 4, 2, 1, 3, 5, 7, 9, 7, 5, 3, 1, 2, 4, 6, 8, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 9, 7, 5, 3, 1, 2, 4, 6, 8, 10, 12, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 13, 11, 9, 7, 5, 3, 1, 2, 4, 6, 8, 10, 12, 14, 12, 10
Offset: 1

Views

Author

Omar E. Pol, Aug 08 2007

Keywords

Comments

Triangle read by rows in which row n lists the number of pairs of states of the subshells of the n-th shell of the nuclear shell model ordered by energy level in increasing order.
Row n lists a permutation of the first n positive integers.
If n is odd then row n lists the first (n+1)/2 odd numbers in decreasing order together with the first (n-1)/2 positive even numbers.
If n is even then row n lists the first n/2 even numbers in decreasing order together with the first n/2 odd numbers.
Row n >= 2, with its floor(n/2) last numbers taken as negative, lists the n different eigenvalues (in decreasing order) of the odd graph O(n). The odd graph O(n) has the (n-1)-subsets of a (2*n-1)-set as vertices, with two (n-1)-subsets adjacent if and only if they are disjoint. For example, O(3) is isomorphic to the Petersen graph. - Miquel A. Fiol, Apr 07 2024

Examples

			A geometric model of the atomic nucleus:
......-------------------------------------------------
......|...-----------------------------------------...|
......|...|...---------------------------------...|...|
......|...|...|...-------------------------...|...|...|
......|...|...|...|...-----------------...|...|...|...|
......|...|...|...|...|...---------...|...|...|...|...|
......|...|...|...|...|...|...-...|...|...|...|...|...|
......i...h...g...f...d...p...s...p...d...f...g...h...i
......|...|...|...|...|...|.......|...|...|...|...|...|
......|...|...|...|...|.......1.......|...|...|...|...|
......|...|...|...|.......2.......1.......|...|...|...|
......|...|...|.......3.......1.......2.......|...|...|
......|...|.......4.......2.......1.......3.......|...|
......|.......5.......3.......1.......2.......4.......|
..........6.......4.......2.......1.......3.......5....
......7.......5.......3.......1.......2.......4.......6
.......................................................
...13/2.11/2.9/2.7/2.5/2.3/2.1/2.1/2.3/2.5/2.7/2.9/2.11/2
......|...|...|...|...|...|...|...|...|...|...|...|...|
......|...|...|...|...|...|...-----...|...|...|...|...|
......|...|...|...|...|...-------------...|...|...|...|
......|...|...|...|...---------------------...|...|...|
......|...|...|...-----------------------------...|...|
......|...|...-------------------------------------...|
......|...---------------------------------------------
.
Triangle begins:
   1;
   2, 1;
   3, 1, 2;
   4, 2, 1, 3;
   5, 3, 1, 2, 4;
   6, 4, 2, 1, 3, 5;
   7, 5, 3, 1, 2, 4, 6;
   8, 6, 4, 2, 1, 3, 5, 7;
   9, 7, 5, 3, 1, 2, 4, 6, 8;
  10, 8, 6, 4, 2, 1, 3, 5, 7, 9;
  ...
Also:
                     1;
                   2,  1;
                 3,  1,  2;
               4,  2,  1,  3;
             5,  3,  1,  2,  4;
           6,  4,  2,  1,  3,  5;
         7,  5,  3,  1,  2,  4,  6;
       8,  6,  4,  2,  1,  3,  5,  7;
     9,  7,  5,  3,  1,  2,  4,  6,  8;
  10,  8,  6,  4,  2,  1,  3,  5,  7,  9;
  ...
In this view each column contains the same numbers.
From _Miquel A. Fiol_, Apr 07 2024: (Start)
Eigenvalues of the odd graphs O(n) for n=2..10:
   2, -1;
   3,  1, -2;
   4,  2, -1, -3;
   5,  3,  1, -2, -4;
   6,  4,  2, -1, -3, -5;
   7,  5,  3,  1, -2, -4, -6;
   8,  6,  4,  2, -1, -3, -5, -7;
   9,  7,  5,  3,  1, -2, -4, -6, -8;
  10,  8,  6,  4,  2, -1, -3, -5, -7, -9;
... (End)
		

Crossrefs

Absolute values of A056951. Column 1 is A000027. Row sums are in A000217.
Other versions are A004736, A212121, A213361, A213371.
Cf. A028310 (right edge), A000012 (central terms), A220073 (mirrored), A220053 (partial sums in rows), A375303.

Programs

  • Haskell
    a130517 n k = a130517_tabl !! (n-1) !! (k-1)
    a130517_row n = a130517_tabl !! (n-1)
    a130517_tabl = iterate (\row -> (head row + 1) : reverse row) [1]
    -- Reinhard Zumkeller, Dec 03 2012
    
  • Maple
    A130517 := proc(n,k)
         if k <= (n+1)/2 then
            n-2*(k-1) ;
        else
            1-n+2*(k-1) ;
        end if;
    end proc: # R. J. Mathar, Jul 21 2012
  • Mathematica
    t[n_, 1] := n; t[n_, n_] := n-1; t[n_, k_] := Abs[2*k-n - If[2*k <= n+1, 2, 1]]; Table[t[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Oct 03 2013, from abs(A056951) *)
  • PARI
    a130517_row(n) = my(v=vector(n), s=1, n1=0, n2=n+1); forstep(k=n, 1,-1, s=-s; if(s>0, n2--; v[n2]=k, n1++; v[n1]=k)); v \\ Hugo Pfoertner, Aug 26 2024

Formula

a(n) = A162630(n)/2. - Omar E. Pol, Sep 02 2012
T(1,1) = 1; for n > 1: T(n,1) = T(n-1,1)+1 and T(n,k) = T(n-1,n-k+1), 1 < k <= n. - Reinhard Zumkeller, Dec 03 2012
From Boris Putievskiy, Jan 16 2013: (Start)
a(n) = |2*A000027(n) - A003056(n)^2 - 2*A003056(n) - 3| + floor((2*A000027(n) - A003056(n)^2 - A003056(n))/(A003056(n)+3)).
a(n) = |2*n - t^2 - 2*t - 3| + floor((2*n - t^2 - t)/(t+3)) where t = floor((-1+sqrt(8*n-7))/2). (End)

A220075 Partial sums in rows of A220073, triangle read by rows.

Original entry on oeis.org

1, 1, 3, 2, 3, 6, 3, 4, 6, 10, 4, 6, 7, 10, 15, 5, 8, 9, 11, 15, 21, 6, 10, 12, 13, 16, 21, 28, 7, 12, 15, 16, 18, 22, 28, 36, 8, 14, 18, 20, 21, 24, 29, 36, 45, 9, 16, 21, 24, 25, 27, 31, 37, 45, 55, 10, 18, 24, 28, 30, 31, 34, 39, 46, 55, 66, 11, 20, 27
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 03 2012

Keywords

Comments

T(n,k) = sum(A220073(n,i): i=1..k).

Crossrefs

Cf. A000027 (left edge), A000217 (right edge), A002061 (central terms), A019298 (row sums); A220053.

Programs

  • Haskell
    a220075 n k = a220075_tabl !! (n-1) !! (k-1)
    a220075_row n = a220075_tabl !! (n-1)
    a220075_tabl = map (scanl1 (+)) a220073_tabl
  • Mathematica
    A[n_, k_] := If[k == 1, n, If[k == n, n-1, Abs[2k-n-If[2k <= n+1, 2, 1]]]];
    A220073[n_, k_] := A[n, n-k+1];
    T[n_, k_] := Sum[A220073[n, i], {i, 1, k}];
    Table[T[n, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, Sep 27 2021 *)
Showing 1-3 of 3 results.