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.

Previous Showing 31-40 of 85 results. Next

A158821 Triangle read by rows: row n (n>=0) ends with 1, and for n>=1 begins with n; other entries are zero.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Mar 30 2008

Keywords

Examples

			Triangle begins:
  1;
  1, 1;
  2, 0, 1;
  3, 0, 0, 1;
  4, 0, 0, 0, 1;
  5, 0, 0, 0, 0, 1;
  6, 0, 0, 0, 0, 0, 1;
  7, 0, 0, 0, 0, 0, 0, 1;
		

Crossrefs

Programs

  • Maple
    A158821:= proc(n,k)
        if n = k then 1;
        elif k = 0 then n;
        else 0;
        end if;
    end proc: # R. J. Mathar, Jan 08 2015
  • Mathematica
    T[n_, k_]:= If[k==0, Boole[n==0] +n, If[k==n, 1, 0]];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Dec 22 2021 *)
    Join[{1},Table[Join[{n},PadLeft[{1},n,0]],{n,15}]]//Flatten (* Harvey P. Dale, Apr 05 2023 *)
  • Sage
    def A158821(n,k):
        if (k==0): return n + bool(n==0)
        elif (k==n): return 1
        else: return 0
    flatten([[A158821(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Dec 22 2021

Formula

T(n, k) = A145677(n, n-k-1). - R. J. Mathar, Apr 01 2009
From G. C. Greubel, Dec 22 2021: (Start)
Sum_{k=0..n} T(n, k) = A000027(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A109613(n). (End)

A182579 Triangle read by rows: T(0,0) = 1, for n>0: T(n,n) = 2 and for k<=floor(n/2): T(n,2*k) = n/(n-k) * binomial(n-k,k), T(n,2*k+1) = (n-1)/(n-1-k) * binomial(n-1-k,k).

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 1, 1, 3, 2, 1, 1, 4, 3, 2, 1, 1, 5, 4, 5, 2, 1, 1, 6, 5, 9, 5, 2, 1, 1, 7, 6, 14, 9, 7, 2, 1, 1, 8, 7, 20, 14, 16, 7, 2, 1, 1, 9, 8, 27, 20, 30, 16, 9, 2, 1, 1, 10, 9, 35, 27, 50, 30, 25, 9, 2, 1, 1, 11, 10, 44, 35, 77, 50, 55, 25, 11, 2
Offset: 0

Views

Author

Reinhard Zumkeller, May 06 2012

Keywords

Comments

A000204(n+1) = sum of n-th row, Lucas numbers;
A000204(n+3) = alternating row sum of n-th row;
A182584(n) = T(2*n,n), central terms;
A000012(n) = T(n,0), left edge;
A040000(n) = T(n,n), right edge;
A054977(n-1) = T(n,1) for n > 0;
A109613(n-1) = T(n,n-1) for n > 0;
A008794(n) = T(n,n-2) for n > 1.

Examples

			Starting with 2nd row = [1 2] the rows of the triangle are defined recursively without computing explicitely binomial coefficients; demonstrated for row 8, (see also Haskell program):
   (0) 1  1  7  6 14  9  7  2      [A]  row 7 prepended by 0
    1  1  7  6 14  9  7  2 (0)     [B]  row 7, 0 appended
    1  0  1  0  1  0  1  0  1      [C]  1 and 0 alternating
    1  0  7  0 14  0  7  0  0      [D]  = [B] multiplied by [C]
    1  1  8  7 20 14 16  7  2      [E]  = [D] added to [A] = row 8.
The triangle begins:                 | A000204
              1                      |       1
             1  2                    |       3
            1  1  2                  |       4
           1  1  3  2                |       7
          1  1  4  3  2              |      11
         1  1  5  4  5  2            |      18
        1  1  6  5  9  5  2          |      29
       1  1  7  6 14  9  7  2        |      47
      1  1  8  7 20 14 16  7  2      |      76
     1  1  9  8 27 20 30 16  9  2    |     123
    1  1 10  9 35 27 50 30 25  9  2  |     199 .
		

Crossrefs

Programs

  • Haskell
    a182579 n k = a182579_tabl !! n !! k
    a182579_row n = a182579_tabl !! n
    a182579_tabl = [1] : iterate (\row ->
      zipWith (+) ([0] ++ row) (zipWith (*) (row ++ [0]) a059841_list)) [1,2]
  • Mathematica
    T[_, 0] = 1;
    T[n_, n_] /; n > 0 = 2;
    T[_, 1] = 1;
    T[n_, k_] := T[n, k] = Which[
         OddQ[k],  T[n - 1, k - 1],
         EvenQ[k], T[n - 1, k - 1] + T[n - 1, k]];
    Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 01 2021 *)

Formula

T(n+1,2*k+1) = T(n,2*k), T(n+1,2*k) = T(n,2*k-1) + T(n,2*k).

A186421 Even numbers interleaved with repeated odd numbers.

Original entry on oeis.org

0, 1, 2, 1, 4, 3, 6, 3, 8, 5, 10, 5, 12, 7, 14, 7, 16, 9, 18, 9, 20, 11, 22, 11, 24, 13, 26, 13, 28, 15, 30, 15, 32, 17, 34, 17, 36, 19, 38, 19, 40, 21, 42, 21, 44, 23, 46, 23, 48, 25, 50, 25, 52, 27, 54, 27, 56, 29, 58, 29, 60, 31, 62, 31, 64, 33, 66, 33, 68, 35, 70, 35, 72, 37, 74, 37, 76, 39, 78, 39, 80, 41, 82, 41, 84, 43, 86, 43
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 21 2011

Keywords

Comments

A005843 interleaved with A109613.
Row sum of superimposed binary filled triangle. - Craig Knecht, Aug 07 2015

Examples

			A005843: 0   2   4   6   8   10   12   14   16   18   20    22
A109613:   1   1   3   3   5    5    7    7    9    9    11    11
this   : 0 1 2 1 4 3 6 3 8 5 10 5 12 7 14 7 16 9 18 9 20 11 22 ... .
		

Crossrefs

Cf. A186422 (first differences), A186423 (partial sums), A240828 (row sum of superimposed binary triangle).

Programs

  • Haskell
    a186421 n = a186421_list !! n
    a186421_list = interleave [0,2..] $ rep [1,3..] where
       interleave (x:xs) ys = x : interleave ys xs
       rep (x:xs) = x : x : rep xs
    
  • Magma
    [IsEven(n) select n else 2*Floor(n/4)+1: n in [0..100]]; // Vincenzo Librandi, Jul 13 2015
    
  • Maple
    A186421:=n->n-(1-(-1)^n)*(n+(-1)^(n*(n+1)/2))/4: seq(A186421(n), n=0..100); # Wesley Ivan Hurt, Aug 07 2015
  • Mathematica
    Table[n - (1 - (-1)^n)*(n + I^(n (n + 1)))/4, {n, 0, 87}] (* or *)
    CoefficientList[Series[x (1 + 2 x + 2 x^3 + x^4)/((1 + x^2) (x - 1)^2 (1 + x)^2), {x, 0, 87}], x] (* or *)
    n = 88; Riffle[Range[0, n, 2], Flatten@ Transpose[{Range[1, n, 2], Range[1, n, 2]}]] (* Michael De Vlieger, Jul 14 2015 *)
  • Maxima
    makelist(n-(1-(-1)^n)*(n+%i^(n*(n+1)))/4, n, 0, 90); /* Bruno Berselli, Mar 04 2013 */
    
  • Python
    def A186421(n): return (n>>1)|1 if n&1 else n # Chai Wah Wu, Jan 31 2023

Formula

a(2*k) = 2*k, a(4*k+1) = a(4*k+3) = 2*k+1.
a(n) = n if n is even, else 2*floor(n/4)+1.
a(2*n-(2*k+1)) + a(2*n+2*k+1) = 2*n, 0 <= k < n.
a(n+2) = A109043(n) - a(n).
G.f.: x*(1+2*x+2*x^3+x^4) / ( (1+x^2)*(x-1)^2*(1+x)^2 ). - R. J. Mathar, Feb 23 2011
a(n) = n-(1-(-1)^n)*(n+i^(n(n+1)))/4, where i=sqrt(-1). - Bruno Berselli, Feb 23 2011
a(n) = a(n-2)+a(n-4)-a(n-6) for n>5. - Wesley Ivan Hurt, Aug 07 2015
E.g.f.: (x*cosh(x) + sin(x) + 2*x*sinh(x))/2. - Stefano Spezia, May 09 2021

Extensions

Edited by Bruno Berselli, Mar 04 2013

A186422 First differences of A186421.

Original entry on oeis.org

1, 1, -1, 3, -1, 3, -3, 5, -3, 5, -5, 7, -5, 7, -7, 9, -7, 9, -9, 11, -9, 11, -11, 13, -11, 13, -13, 15, -13, 15, -15, 17, -15, 17, -17, 19, -17, 19, -19, 21, -19, 21, -21, 23, -21, 23, -23, 25, -23, 25, -25, 27, -25, 27, -27, 29, -27, 29, -29, 31, -29, 31, -31, 33, -31, 33, -33, 35, -33, 35, -35, 37, -35, 37, -37, 39, -37, 39, -39, 41, -39, 41, -41, 43
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 21 2011

Keywords

Comments

a(n) = A186421(n+1) - A186421(n);
a(2*n) = - A109613(n-1) for n>0; a(2*n+1) = A109613(n);
a(3*k) = A047270(floor((k+1)/2)) * (-1)^(k+1);
a(3*k+1) = A007310(floor((k+2)/2)) * (-1)^k;
a(3*k+2) = A047241(floor((k+3)/2)) * (-1)^(k+1).

Crossrefs

Programs

  • Haskell
    a186422 n = a186422_list !! n
    a186422_list = zipWith (-) (tail a186421_list) a186421_list
    
  • Magma
    /* By definition: */
    A186421:=func;
    [A186421(n+1)-A186421(n): n in [0..90]]; // Bruno Berselli, Mar 04 2013
  • Mathematica
    Differences@ CoefficientList[Series[x (1 + 2 x + 2 x^3 + x^4)/((1 + x^2) (x - 1)^2 (1 + x)^2), {x, 0, 84}], x] (* Michael De Vlieger, Oct 02 2017 *)
  • Maxima
    makelist(-((2*n+1)*(-1)^n-2*%i^(n*(n+1))-3)/4,n,0,83); /* Bruno Berselli, Mar 04 2013 */
    

Formula

G.f.: -(x^4+2*x^3+2*x+1) / ((x-1)*(x+1)^2*(x^2+1)). - Colin Barker, Mar 04 2013
a(n) = -((2*n+1)*(-1)^n-2*i^(n*(n+1))-3)/4, where i=sqrt(-1). [Bruno Berselli, Mar 04 2013]
a(n) = cos((n-1)*Pi)*(2*n+1-2*cos(n*Pi/2)-3*cos(n*Pi)-2*sin(n*Pi/2))/4. - Wesley Ivan Hurt, Oct 02 2017
E.g.f.: (cos(x) + (1 + x)*cosh(x) - sin(x) - (x - 2)*sinh(x))/2. - Stefano Spezia, May 09 2021

A141310 The odd numbers interlaced with the constant-2 sequence.

Original entry on oeis.org

1, 2, 3, 2, 5, 2, 7, 2, 9, 2, 11, 2, 13, 2, 15, 2, 17, 2, 19, 2, 21, 2, 23, 2, 25, 2, 27, 2, 29, 2, 31, 2, 33, 2, 35, 2, 37, 2, 39, 2, 41, 2, 43, 2, 45, 2, 47, 2, 49, 2, 51, 2, 53, 2, 55, 2, 57, 2, 59, 2, 61, 2, 63, 2, 65, 2, 67, 2, 69, 2, 71, 2, 73, 2, 75, 2, 77, 2, 79, 2, 81, 2, 83, 2, 85, 2, 87, 2, 89, 2, 91, 2, 93, 2, 95, 2, 97
Offset: 0

Views

Author

Paul Curtz, Aug 02 2008

Keywords

Comments

Similarly, the principle of interlacing a sequence and its first differences leads from A000012 and its differences A000004 to A059841, or from A140811 and its first differences A017593 to a sequence -1, 6, 5, 18, ...
If n is even then a(n) = n + 1 ; otherwise a(n) = 2. - Wesley Ivan Hurt, Jun 05 2013
Denominators of floor((n+1)/2) / (n+1), n > 0. - Wesley Ivan Hurt, Jun 14 2013
a(n) is also the number of minimum total dominating sets in the (n+1)-gear graph for n>1. - Eric W. Weisstein, Apr 11 2018
a(n) is also the number of minimum total dominating sets in the (n+1)-sun graph for n>1. - Eric W. Weisstein, Sep 09 2021
Denominators of Cesàro means sequence of A114112, corresponding numerators are in A354008. - Bernard Schott, May 14 2022
Also, denominators of Cesàro means sequence of A237420, corresponding numerators are in A354280. - Bernard Schott, May 22 2022

Crossrefs

Programs

  • Maple
    a:= n-> n+1-(n-1)*(n mod 2): seq(a(n), n=0..96); # Wesley Ivan Hurt, Jun 05 2013
  • Mathematica
    Flatten[Table[{2 n - 1, 2}, {n, 40}]] (* Alonso del Arte, Jun 15 2013 *)
    Riffle[Range[1, 79, 2], 2] (* Alonso del Arte, Jun 14 2013 *)
    Table[((-1)^n (n - 1) + n + 3)/2, {n, 0, 20}] (* Eric W. Weisstein, Apr 11 2018 *)
    Table[Floor[(n + 1)/2]/(n + 1), {n, 0, 20}] // Denominator (* Eric W. Weisstein, Apr 11 2018 *)
    LinearRecurrence[{0, 2, 0, -1}, {2, 3, 2, 5}, {0, 20}] (* Eric W. Weisstein, Apr 11 2018 *)
    CoefficientList[Series[(1 + 2 x + x^2 - 2 x^3)/(-1 + x^2)^2, {x, 0, 20}], x] (* Eric W. Weisstein, Apr 11 2018 *)
  • PARI
    A141310(n) = if(n%2,2,1+n); \\ (for offset=0 version) - Antti Karttunen, Oct 02 2018
    
  • PARI
    A141310off1(n) = if(n%2,n,2); \\ (for offset=1 version) - Antti Karttunen, Oct 02 2018
    
  • Python
    def A141310(n): return 2 if n % 2 else n + 1 # Chai Wah Wu, May 24 2022

Formula

a(2n) = A005408(n). a(2n+1) = 2.
First differences: a(n+1) - a(n) = (-1)^(n+1)*A109613(n-1), n > 0.
b(2n) = -A008586(n), and b(2n+1) = A060747(n), where b(n) = a(n+1) - 2*a(n).
a(n) = 2*a(n-2) - a(n-4). - R. J. Mathar, Feb 23 2009
G.f.: (1+2*x+x^2-2*x^3)/((x-1)^2*(1+x)^2). - R. J. Mathar, Feb 23 2009
From Wesley Ivan Hurt, Jun 05 2013: (Start)
a(n) = n + 1 - (n - 1)*(n mod 2).
a(n) = (n + 1) * (n - floor((n+1)/2))! / floor((n+1)/2)!.
a(n) = A000142(n+1) / A211374(n+1). (End)

Extensions

Edited by R. J. Mathar, Feb 23 2009
Term a(45) corrected, and more terms added by Antti Karttunen, Oct 02 2018

A182432 Recurrence a(n)*a(n-2) = a(n-1)*(a(n-1) + 3) with a(0) = 1, a(1) = 4.

Original entry on oeis.org

1, 4, 28, 217, 1705, 13420, 105652, 831793, 6548689, 51557716, 405913036, 3195746569, 25160059513, 198084729532, 1559517776740, 12278057484385, 96664942098337, 761041479302308, 5991666892320124, 47172293659258681, 371386682381749321
Offset: 0

Views

Author

Peter Bala, Apr 30 2012

Keywords

Comments

The non-linear recurrence equation a(n)*a(n-2) = a(n-1)*(a(n-1) + r) with initial conditions a(0) = 1, a(1) = 1 + r has the solution a(n) = 1/2 + (1/2)*Sum_{k = 0..n} (2*r)^k*binomial(n+k,2*k) = 1/2 + b(n,2*r)/2, where b(n,x) are the Morgan-Voyce polynomials of A085478. The recurrence produces sequences A101265 (r = 1), A011900 (r = 2) and A054318 (r = 4), as well as signed versions of A133872 (r = -1), A109613 (r = -2), A146983 (r = -3) and A084159(r = -4).
Also the indices of centered pentagonal numbers (A005891) which are also centered triangular numbers (A005448). - Colin Barker, Jan 01 2015
Also positive integers y in the solutions to 3*x^2 - 5*y^2 - 3*x + 5*y = 0. - Colin Barker, Jan 01 2015

Crossrefs

Programs

  • Magma
    I:=[1, 4, 28]; [n le 3 select I[n] else 9*Self(n-1)-9*Self(n-2)+Self(n-3): n in [1..25]]; // Vincenzo Librandi, May 18 2012
    
  • Mathematica
    RecurrenceTable[{a[0]==1,a[1]==4,a[n]==(a[-1+n] (3+a[-1+n]))/a [-2+n]}, a[n],{n,30}] (* or *) LinearRecurrence[{9,-9,1},{1,4,28},30] (* Harvey P. Dale, May 14 2012 *)
  • PARI
    Vec((1-5*x+x^2)/((1-x)*(1-8*x+x^2)) + O(x^100)) \\ Colin Barker, Jan 01 2015

Formula

a(n) = 1/2 + (1/2)*Sum_{k = 0..n} 6^k*binomial(n+k,2*k).
a(n) = R(n,3) where R(n,x) denotes the row polynomials of A211955.
a(n) = (1/u)*T(n,u)*T(n+1,u) with u = sqrt(5/2) and T(n,x) the n-th Chebyshev polynomial of the first kind.
Recurrence equation: a(n) = 8*a(n-1) - a(n-2) - 3 with a(0) = 1 and a(1) = 4.
O.g.f.: (1 - 5*x + x^2)/((1 - x)*(1 - 8*x + x^2)) = 1 + 4*x + 28*x^2 + ....
Sum_{n >= 0} 1/a(n) = sqrt(5/3); 5 - 3*(Sum_{k = 0..2*n} 1/a(k))^2 = 2/A070997(n)^2.
a(0) = 1, a(1) = 4, a(2) = 28, a(n) = 9*a(n-1) - 9*a(n-2) + a(n-3). - Harvey P. Dale, May 14 2012

A098557 Expansion of e.g.f. (1/2)*(1+x)*log((1+x)/(1-x)).

Original entry on oeis.org

0, 1, 2, 2, 8, 24, 144, 720, 5760, 40320, 403200, 3628800, 43545600, 479001600, 6706022400, 87178291200, 1394852659200, 20922789888000, 376610217984000, 6402373705728000, 128047474114560000, 2432902008176640000, 53523844179886080000, 1124000727777607680000
Offset: 0

Views

Author

Paul Barry, Sep 14 2004

Keywords

Crossrefs

From Johannes W. Meijer, Nov 12 2009: (Start)
Cf. A109613 (odd numbers repeated).
Equals the first left hand column of A167552.
Equals the first right hand column of A167556.
A098557(n)*A064455(n) equals the second right hand column of A167556(n).
(End)

Programs

  • Magma
    [0,1] cat [Factorial(n-1) + Factorial(n-2)*(1+(-1)^n)/2: n in [2..30]]; // G. C. Greubel, Jan 17 2018
  • Mathematica
    Join[{0,1}, Table[(n-1)! + (n-2)!*(1+(-1)^n)/2, {n,2,30}]] (* or *) With[{nmax = 50}, CoefficientList[Series[(1/2)*(1 + x)*Log[(1 + x)/(1 - x)], {x,0,nmax}], x]*Range[0,nmax]!] (* G. C. Greubel, Jan 17 2018 *)
  • PARI
    for(n=0, 30, print1(if(n==0,0, if(n==1, 1, (n-1)! + (n-2)!*(1 + (-1)^n)/2)), ", ")) \\ G. C. Greubel, Jan 17 2018
    

Formula

a(n+1) = n! + (n-1)! * (1-(-1)^n)/2.
a(n+2) = 2*A052558(n).
conjecture: -a(n) +a(n-1) +(n-1)*(n-3)*a(n-2)=0. - R. J. Mathar, Nov 14 2011
G.f.: 1-G(0), where G(k)= 1 + x*(2*k-1)/(1 - x*(2*k+2)/(x*(2*k+2) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 11 2013
Sum_{n>=1} 1/a(n) = sinh(1) + 1 = A073742 + 1. - Amiram Eldar, Jan 22 2023

A212120 Triangle read by rows T(n,k), n>=1, k>=1, where T(n,k) is the sum of the divisors d of n with min(d, n/d) = k.

Original entry on oeis.org

1, 3, 5, 7, 1, 9, 1, 11, 3, 13, 3, 15, 5, 17, 5, 1, 19, 7, 1, 21, 7, 1, 23, 9, 3, 25, 9, 3, 27, 11, 3, 29, 11, 5, 31, 13, 5, 1, 33, 13, 5, 1, 35, 15, 7, 1, 37, 15, 7, 1, 39, 17, 7, 3, 41, 17, 9, 3, 43, 19, 9, 3, 45, 19, 9, 3, 47, 21, 11, 5, 49, 21, 11, 5, 1
Offset: 1

Views

Author

Omar E. Pol, Jul 02 2012

Keywords

Comments

Column k lists the odd numbers repeated k times starting in row k^2.
1 together with the first differences of the row sums give the divisor function A000005.
T(n,k) is also the total number of divisors of all positive integers <= n on the edges of k-th triangle in the diagram of divisors (see link section). See also A212119.

Examples

			Written as an irregular triangle the sequence begins:
1;
3;
5;
7,   1;
9,   1;
11,  3;
13,  3;
15,  5;
17,  5,  1;
19,  7,  1;
21,  7,  1;
23,  9,  3;
25,  9,  3;
27, 11,  3;
29, 11,  5;
31, 13,  5,  1;
33, 13,  5,  1;
35, 15,  7,  1;
37, 15,  7,  1;
39, 17,  7,  3;
41, 17,  9,  3;
43, 19,  9,  3;
45, 19,  9,  3;
47, 21, 11,  5;
49, 21, 11,  5,  1;
		

Crossrefs

Row sums give A006218, n >= 1.
Columns (1-5): A005408, A109613, A130823, A129756, A130497.

Formula

T(n,k) = Sum_{j=1..n} A212119(j,k).

Extensions

Definition changed by Franklin T. Adams-Watters, Jul 12 2012

A063196 Dimension of the space of weight 2n cuspidal newforms for Gamma_0( 7 ).

Original entry on oeis.org

0, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 17, 17, 19, 19, 21, 21, 23, 23, 25, 25, 27, 27, 29, 29, 31, 31, 33, 33, 35, 35, 37, 37, 39, 39, 41, 41, 43, 43, 45, 45, 47, 47, 49, 49, 51, 51, 53, 53, 55, 55, 57, 57, 59, 59, 61, 61, 63, 63, 65, 65, 67, 67, 69, 69, 71, 71, 73, 73, 75, 75, 77, 77, 79, 79, 81, 81, 83
Offset: 1

Views

Author

N. J. A. Sloane, Jul 10 2001

Keywords

Comments

Also, for n>1, number of involutions (i.e. elements of order 2) in the dihedral group D_(n-1). - Lekraj Beedassy, Oct 22 2004
Also, the chromatic number of the n-th triangular graph; i.e., the chromatic index (edge chromatic number) of the n-th complete graph. - Danny Rorabaugh, Nov 26 2018

Crossrefs

Cf. A109613.

Programs

  • Mathematica
    CoefficientList[Series[-x (x^2 - 2 x - 1) / ((x - 1)^2 (x + 1)), {x, 0, 100}], x] (* Vincenzo Librandi, Nov 27 2018 *)
    LinearRecurrence[{1,1,-1},{0,1,3,3},90] (* Harvey P. Dale, Sep 11 2024 *)
  • PARI
    concat([0], Vec(-x^2*(x^2-2*x-1)/((x-1)^2*(x+1)) + O(x^100))) \\ Colin Barker, Sep 08 2013

Formula

For n > 1, a(n-1) = (2n + 1 + (-1)^n)/2 (odd numbers appearing twice). - Lekraj Beedassy, Oct 22 2004
For n > 1, a(n) = 2*n - a(n-1), (with a(1)=1). - Vincenzo Librandi, Dec 06 2010
From Colin Barker, Sep 08 2013: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 4.
G.f.: -x^2*(x^2-2*x-1) / ((x-1)^2*(x+1)). (End)

A179207 a(n) = n - 1 + ceiling((-3 + n^2)/2) if n > 1 with a(1)=1, complement of A182835.

Original entry on oeis.org

1, 2, 5, 10, 15, 22, 29, 38, 47, 58, 69, 82, 95, 110, 125, 142, 159, 178, 197, 218, 239, 262, 285, 310, 335, 362, 389, 418, 447, 478, 509, 542, 575, 610, 645, 682, 719, 758, 797, 838, 879, 922, 965, 1010, 1055, 1102, 1149, 1198, 1247, 1298, 1349, 1402, 1455
Offset: 1

Views

Author

Clark Kimberling, Jan 07 2011

Keywords

Crossrefs

First differences: A109613(n) for n > 2. - Guenther Schrack, Jun 06 2018

Programs

  • GAP
    a:=[2,5,10,15];; for n in [5..60] do a[n]:=2*a[n-1]-2*a[n-3]+a[n-4]; od; a:=Concatenation([1],a); # Muniru A Asiru, Aug 05 2018
  • Maple
    a:=n->n-1+ceil((-3+n^2)/2): 1,seq(a(n),n=2..60); # Muniru A Asiru, Aug 05 2018
  • Mathematica
    Table[n-1+Ceiling[(n*n-3)/2], {n,60}] (* Vladimir Joseph Stephan Orlovsky, Apr 02 2011 *)
    Join[{1},LinearRecurrence[{2,0,-2,1},{2,5,10,15},52]] (* Ray Chandler, Jul 15 2015 *)

Formula

a(n) = n - 1 + ceiling((-3 + n^2)/2) if n > 1.
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4). - Joerg Arndt, Apr 02 2011
From Guenther Schrack, Jun 06 2018: (Start)
a(n) = (2*n^2 + 4*n - 9 + (-1)^n)/4 for n > 1.
a(n) = a(n-2) + 2*n for n > 3.
a(-n) = a(n-2) for n > 1.
a(n) = n - 1 + A047838(n) for n > 1. (End)
G.f.: x * (1 + x^2 + 2*x^3 - 2*x^4) / (1 - 2*x + 2*x^3 - x^4). - Michael Somos, Oct 28 2018
Sum_{n>=1} 1/a(n) = 8/3 + tan(sqrt(5)*Pi/2)*Pi/(2*sqrt(5)) - cot(sqrt(3/2)*Pi)*Pi/(2*sqrt(6)). - Amiram Eldar, Sep 16 2022
Previous Showing 31-40 of 85 results. Next