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

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

A186423 Partial sums of A186421.

Original entry on oeis.org

0, 1, 3, 4, 8, 11, 17, 20, 28, 33, 43, 48, 60, 67, 81, 88, 104, 113, 131, 140, 160, 171, 193, 204, 228, 241, 267, 280, 308, 323, 353, 368, 400, 417, 451, 468, 504, 523, 561, 580, 620, 641, 683, 704, 748, 771, 817, 840, 888, 913, 963, 988, 1040, 1067, 1121, 1148, 1204, 1233, 1291, 1320
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 21 2011

Keywords

Crossrefs

A062717 is the subsequence of even terms.
A186424 is the subsequence of odd terms.

Programs

  • GAP
    List([0..65], n-> (6*n^2 +6*n +3 +(-1)^n*(2*n+1) -4*(-1)^Binomial(n+1, 2))/16); # G. C. Greubel, Oct 09 2019
    
  • Haskell
    a186423 n = a186423_list !! n
    a186423_list = scanl1 (+) a186421_list
    
  • Magma
    [(6*n^2 +6*n +3 +(-1)^n*(2*n+1) -4*(-1)^Binomial(n+1, 2))/16: n in [0..65]]; // G. C. Greubel, Oct 09 2019
    
  • Maple
    A087960 := proc(n) op((n mod 4)+1,[1,-1,-1,1]) ; end proc:
    A186423 := proc(n) 3*n*(n+1)/8 +3/16 +(-1)^n*(2*n+1)/16 -A087960(n)/4 ; end proc: # R. J. Mathar, Feb 28 2011
  • Mathematica
    CoefficientList[Series[x(1+2x+2x^3+x^4)/((1-x)^3(1+x)^2(1+x^2)),{x, 0, 65}],x]  (* Harvey P. Dale, Mar 13 2011 *)
    Table[(6*n^2 +6*n +3 +(-1)^n*(2*n+1) -4*(-1)^Binomial[n+1, 2])/16, {n, 0, 65}] (* G. C. Greubel, Oct 09 2019 *)
  • PARI
    vector(66, n, my(m=n-1); (6*m^2 +6*m +3 +(-1)^m*(2*m+1) -4*(-1)^binomial(m+1, 2))/16) \\ G. C. Greubel, Oct 09 2019
    
  • Python
    def A186423(n): return (6*n*(n+1)+3+(-2*n-1 if n&1 else 2*n+1)+(4 if n+1&2 else -4))>>4 # Chai Wah Wu, Jan 31 2023
  • Sage
    [(6*n^2 +6*n +3 +(-1)^n*(2*n+1) -4*(-1)^binomial(n+1, 2))/16 for n in (0..65)] # G. C. Greubel, Oct 09 2019
    

Formula

From R. J. Mathar, Feb 28 2011: (Start)
G.f.: x*(1 + 2*x + 2*x^3 + x^4)/( (1+x^2)*(1+x)^2*(1-x)^3 ).
a(n) = (6*n*(n+1) + 3 + (-1)^n*(2*n+1) - 4*A087960(n))/16. (End)
E.g.f.: ((2 + 5*x + 3*x^2)*cosh(x) + (1 + 7*x + 3*x^2)*sinh(x) + 2*sin(x) - 2*cos(x))/8. - G. C. Greubel, Oct 09 2019

Extensions

More terms added by G. C. Greubel, Oct 09 2019

A109613 Odd numbers repeated.

Original entry on oeis.org

1, 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
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 01 2005

Keywords

Comments

The number of rounds in a round-robin tournament with n competitors. - A. Timothy Royappa, Aug 13 2011
Diagonal sums of number triangle A113126. - Paul Barry, Oct 14 2005
When partitioning a convex n-gon by all the diagonals, the maximum number of sides in resulting polygons is 2*floor(n/2)+1 = a(n-1) (from Moscow Olympiad problem 1950). - Tanya Khovanova, Apr 06 2008
The inverse values of the coefficients in the series expansion of f(x) = (1/2)*(1+x)*log((1+x)/(1-x)) lead to this sequence; cf. A098557. - Johannes W. Meijer, Nov 12 2009
From Reinhard Zumkeller, Dec 05 2009: (Start)
First differences: A010673; partial sums: A000982;
A059329(n) = Sum_{k = 0..n} a(k)*a(n-k);
A167875(n) = Sum_{k = 0..n} a(k)*A005408(n-k);
A171218(n) = Sum_{k = 0..n} a(k)*A005843(n-k);
A008794(n+2) = Sum_{k = 0..n} a(k)*A059841(n-k). (End)
Dimension of the space of weight 2n+4 cusp forms for Gamma_0(5). - Michael Somos, May 29 2013
For n > 4: a(n) = A230584(n) - A230584(n-2). - Reinhard Zumkeller, Feb 10 2015
The arithmetic function v+-(n,2) as defined in A290988. - Robert Price, Aug 22 2017
For n > 0, also the chromatic number of the (n+1)-triangular (Johnson) graph. - Eric W. Weisstein, Nov 17 2017
a(n-1), for n >= 1, is also the upper bound a_{up}(b), where b = 2*n + 1, in the first (top) row of the complete coach system Sigma(b) of Hilton and Pedersen [H-P]. All odd numbers <= a_{up}(b) of the smallest positive restricted residue system of b appear once in the first rows of the c(2*n+1) = A135303(n) coaches. If b is an odd prime a_{up}(b) is the maximum. See a comment in the proof of the quasi-order theorem of H-P, on page 263 ["Furthermore, every possible a_i < b/2 ..."]. For an example see below. - Wolfdieter Lang, Feb 19 2020
Satisfies the nested recurrence a(n) = a(a(n-2)) + 2*a(n-a(n-1)) with a(0) = a(1) = 1. Cf. A004001. - Peter Bala, Aug 30 2022
The binomial transform is 1, 2, 6, 16, 40, 96, 224, 512, 1152, 2560,.. (see A057711). - R. J. Mathar, Feb 25 2023

Examples

			G.f. = 1 + x + 3*x^2 + 3*x^3 + 5*x^4 + 5*x^5 + 7*x^6 + 7*x^7 + 9*x^8 + 9*x^9 + ...
Complete coach system for (a composite) b = 2*n + 1 = 33: Sigma(33) ={[1; 5], [5, 7, 13; 2, 1, 2]} (the first two rows are here 1 and 5, 7, 13), a_{up}(33) = a(15) = 15. But 15 is not in the reduced residue system modulo 33, so the maximal (odd) a number is 13. For the prime b = 31, a_{up}(31) = a(14) = 15 appears as maximum of the first rows. - _Wolfdieter Lang_, Feb 19 2020
		

References

  • Peter Hilton and Jean Pedersen, A Mathematical Tapestry: Demonstrating the Beautiful Unity of Mathematics, Cambridge University Press, 2010, 3rd printing 2012, pp. (260-281).

Crossrefs

Complement of A052928 with respect to the universe A004526. - Guenther Schrack, Aug 21 2018
First differences of A000982, A061925, A074148, A105343, A116940, and A179207. - Guenther Schrack, Aug 21 2018

Programs

Formula

a(n) = 2*floor(n/2) + 1.
a(n) = A052928(n) + 1 = 2*A004526(n) + 1.
a(n) = A028242(n) + A110654(n).
a(n) = A052938(n-2) + A084964(n-2) for n > 1. - Reinhard Zumkeller, Aug 27 2005
G.f.: (1 + x + x^2 + x^3)/(1 - x^2)^2. - Paul Barry, Oct 14 2005
a(n) = 2*a(n-2) - a(n-4), a(0) = 1, a(1) = 1, a(2) = 3, a(3) = 3. - Philippe Deléham, Nov 03 2008
a(n) = A001477(n) + A059841(n). - Philippe Deléham, Mar 31 2009
a(n) = 2*n - a(n-1), with a(0) = 1. - Vincenzo Librandi, Nov 13 2010
a(n) = R(n, -2), where R(n, x) is the n-th row polynomial of A211955. a(n) = (-1)^n + 2*Sum_{k = 1..n} (-1)^(n - k - 2)*4^(k-1)*binomial(n+k, 2*k). Cf. A084159. - Peter Bala, May 01 2012
a(n) = A182579(n+1, n). - Reinhard Zumkeller, May 06 2012
G.f.: ( 1 + x^2 ) / ( (1 + x)*(x - 1)^2 ). - R. J. Mathar, Jul 12 2016
E.g.f.: x*exp(x) + cosh(x). - Ilya Gutkovskiy, Jul 12 2016
From Guenther Schrack, Sep 10 2018: (Start)
a(-n) = -a(n-1).
a(n) = A047270(n+1) - (2*n + 2).
a(n) = A005408(A004526(n)). (End)
a(n) = A000217(n) / A004526(n+1), n > 0. - Torlach Rush, Nov 10 2023

A109043 a(n) = lcm(n,2).

Original entry on oeis.org

0, 2, 2, 6, 4, 10, 6, 14, 8, 18, 10, 22, 12, 26, 14, 30, 16, 34, 18, 38, 20, 42, 22, 46, 24, 50, 26, 54, 28, 58, 30, 62, 32, 66, 34, 70, 36, 74, 38, 78, 40, 82, 42, 86, 44, 90, 46, 94, 48, 98, 50, 102, 52, 106, 54, 110, 56, 114, 58, 118, 60, 122, 62, 126, 64, 130, 66, 134
Offset: 0

Views

Author

Mitch Harris, Jun 18 2005

Keywords

Comments

Exponent of the dihedral group D(2n) = . - Arkadiusz Wesolowski, Sep 10 2013
Second column of table A210530. - Boris Putievskiy, Jan 29 2013
For n > 1, the basic period of A000166(k) (mod n) (Miska, 2016). - Amiram Eldar, Mar 03 2021

Crossrefs

Cf. A000166, A109042, A152749 (partial sums).
Cf. A066043 (essentially the same), A000034 (=a(n)/n), A026741 (=a(n)/2).

Programs

Formula

For n > 0: a(n) = A186421(n) + A186421(n+2).
a(n) = n*2 / gcd(n, 2).
a(n) = -(n*((-1)^n-3))/2. - Stephen Crowley, Feb 11 2007
From R. J. Mathar, Aug 20 2008: (Start)
a(n) = A066043(n), n > 1.
a(n) = 2*A026741(n).
G.f.: 2*x(1+x+x^2)/((1-x)^2*(1+x)^2). (End)
a(n) = n*A000034(n). - Paul Curtz, Mar 25 2011
E.g.f.: x*(2*cosh(x) + sinh(x)). - Stefano Spezia, May 09 2021
Sum_{k=1..n} a(k) ~ (3/4) * n^2. - Amiram Eldar, Nov 26 2022

A186424 Odd terms in A186423.

Original entry on oeis.org

1, 3, 11, 17, 33, 43, 67, 81, 113, 131, 171, 193, 241, 267, 323, 353, 417, 451, 523, 561, 641, 683, 771, 817, 913, 963, 1067, 1121, 1233, 1291, 1411, 1473, 1601, 1667, 1803, 1873, 2017, 2091, 2243, 2321, 2481, 2563, 2731, 2817, 2993, 3083, 3267, 3361, 3553, 3651
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 21 2011

Keywords

Comments

Sum of odd square and half of even square. - Vladimir Joseph Stephan Orlovsky, May 20 2011
Numbers m such that 6*m-2 is a square. - Bruno Berselli, Apr 29 2016

Crossrefs

Programs

  • Haskell
    a186424 n = a186424_list !! n
    a186424_list = filter odd a186423_list
    
  • Mathematica
    Table[If[OddQ[n],n^2+((n+1)^2)/2,(n^2)/2+(n+1)^2],{n,0,100}] (* Vladimir Joseph Stephan Orlovsky, May 20 2011 *)
  • Python
    def A186424(n): return (n*(3*n + 2) + 1 if n&1 else n*(3*n + 4) + 2)>>1 # Chai Wah Wu, Jan 31 2023

Formula

From R. J. Mathar, Feb 28 2011: (Start)
G.f.: ( -1-2*x-6*x^2-2*x^3-x^4 ) / ( (1+x)^2*(x-1)^3 ).
a(n) = 3*(1+2*n+2*n^2)/4 + (-1)^n*(1+2*n)/4. (End)
a(n+2) = a(n) + A091999(n+2).
Union of A080859 and A126587: a(2*n) = A080859(n) and a(2*n+1) = A126587(n+1).
From Peter Bala, Feb 13 2021: (Start)
Appears to be the sequence of exponents in the following series expansion:
Sum_{n >= 0} (-1)^n * x^n/Product_{k = 1..n} 1 - x^(2*k-1) = 1 - x - x^3 + x^11 + x^17 - x^33 - x^43 + + - - .... Cf. A053253.
More generally, for nonnegative integer N, we appear to have the identity
Product_{j = 1..N} 1/(1 + x^(2*j-1))*( P(N,x) + Sum_{n >= 1} (-1)^n * x^((2*N+1)*n-N)/Product_{k = 1..n} 1 - x^(2*k-1) ) = 1 - x - x^3 + x^11 + x^17 - x^33 - x^43 + + - - ..., where P(N,x) is a polynomial in x of degree N^2 - 1, with the first few values given empirically by
P(0,x) = 0, P(1,x) = 1, P(2,x) = 1 - x^2 + x^3, P(3,x) = 1 - x^2 + x^5 - x^7 + x^8 and P(4,x) = 1 - x^2 - x^4 + x^5 + x^8 - x^9 + x^12 - x^14 + x^15. Cf. A203568. (End)
E.g.f.: ((2 + 5*x + 3*x^2)*cosh(x) + (1 + 7*x + 3*x^2)*sinh(x))/2. - Stefano Spezia, May 08 2021
Sum_{n>=0} 1/a(n) = sqrt(2)*Pi*sinh(sqrt(2)*Pi/3)/(1+2*cosh(sqrt(2)*Pi/3)). - Amiram Eldar, May 11 2025

A212831 a(4*n) = 2*n, a(2*n+1) = 2*n+1, a(4*n+2) = 2*n+2.

Original entry on oeis.org

0, 1, 2, 3, 2, 5, 4, 7, 4, 9, 6, 11, 6, 13, 8, 15, 8, 17, 10, 19, 10, 21, 12, 23, 12, 25, 14, 27, 14, 29, 16, 31, 16, 33, 18, 35, 18, 37, 20, 39, 20, 41, 22, 43, 22, 45, 24, 47, 24, 49, 26, 51, 26, 53, 28, 55, 28, 57, 30, 59, 30, 61, 32, 63, 32, 65, 34, 67, 34, 69, 36, 71, 36, 73, 38, 75
Offset: 0

Views

Author

Paul Curtz, Aug 14 2012

Keywords

Comments

First differences: (1, 1, 1, -1, 3, -1, 3, -3, 5,...) = (1, A186422).
Second differences: (0, 0, -2, 4, -4, 4, -6, 8, ...) = (-1)^(n+1) * A201629(n).
Interleave the terms with even indices of the companion A215495 and this one to get (A215495(0), A212831(0), A215495(2), A212831(2),...) = (1, 0, 1, 2, 3, 2, 3, 4, 5, 4,...) = A106249, up to the initial term = A083219 = A083220/2.

Crossrefs

Programs

  • Magma
    [(1/4)*((1 +(-1)^n)*(1 - (-1)^Floor(n/2)) + (3 -(-1)^n)*n): n in [0..50]]; // G. C. Greubel, Apr 25 2018
  • Mathematica
    a[n_] := (1/4)*((-(1 + (-1)^n))*(-1 + (-1)^Floor[n/2]) - (-3 + (-1)^n)*n ); Table[a[n], {n, 0, 84}] (* Jean-François Alcover, Sep 18 2012 *)
    LinearRecurrence[{0,1,0,1,0,-1},{0,1,2,3,2,5},80] (* Harvey P. Dale, May 29 2016 *)
  • PARI
    A212831(n)=if(bittest(n,0), n, n\2+bittest(n,1)) \\ M. F. Hasler, Oct 21 2012
    
  • PARI
    for(n=0,50, print1((1/4)*((1 +(-1)^n)*(1 - (-1)^floor(n/2)) + (3 -(-1)^n)*n), ", ")) \\ G. C. Greubel, Apr 25 2018
    

Formula

a(n) + A215495(n) = A043547(n).
a(n) = -A214283(n)/A000108([n/2]).
a(n+1) = (A186421(n)=0,1,2,1,4,...) + 1.
a(2*n) = A052928(n+1).
a(n+2) - a(n) = 2, 2, 0, 2. (period 4).
a(n) = a(n-2) +a(n-4) -a(n-6); also holds for A215495(n).
G.f.: x*(1+2*x+2*x^2+x^4) / ( (x^2+1)*(x-1)^2*(1+x)^2 ). - R. J. Mathar, Aug 21 2012
a(n) = (1/4)*((1 +(-1)^n)*(1 - (-1)^floor(n/2)) + (3 -(-1)^n)*n). - G. C. Greubel, Apr 25 2018

Extensions

Corrected and edited by M. F. Hasler, Oct 21 2012

A257857 Sequentially filled binary triangle rotated 180 degrees and then superimposed and added to the original triangle.

Original entry on oeis.org

2, 1, 1, 0, 2, 0, 1, 1, 1, 1, 2, 0, 2, 0, 2, 1, 1, 1, 1, 1, 1, 0, 2, 0, 2, 0, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 2, 0, 2
Offset: 1

Views

Author

Craig Knecht, Jul 12 2015

Keywords

Comments

The integers in the LINKS illustration hang like ornaments on a tree.

Examples

			Triangle T(n,k) begins:       Row sums
2;                                2
1,  1;                            2
0,  2,  0;                        2
1,  1,  1,  1;                    4
2,  0,  2,  0,  2;                6
1,  1,  1,  1,  1,  1;            6
0,  2,  0,  2,  0,  2,  0;        6
1,  1,  1,  1,  1,  1,  1,  1;    8
		

Crossrefs

For row sums for the three other variations of this build process, see A186421, A201629, A240828.

Programs

  • Maple
    A257857 := proc(n,k)
        if type(n,'even') then
            1 ;
        elif type((n+1)/2+k,'even') then
            2 ;
        else
            0;
        end if;
    end proc:

Formula

T(n,k)=1 if n even, 1<=k<=n.
T(n,k)=2 if n odd and (n+1)/2+k even, 1<=k<=n.
T(n,k)=0 if n odd and (n+1)/2+k odd, 1<=k<=n.
Showing 1-7 of 7 results.