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

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

A064455 a(2n) = 3n, a(2n-1) = n.

Original entry on oeis.org

1, 3, 2, 6, 3, 9, 4, 12, 5, 15, 6, 18, 7, 21, 8, 24, 9, 27, 10, 30, 11, 33, 12, 36, 13, 39, 14, 42, 15, 45, 16, 48, 17, 51, 18, 54, 19, 57, 20, 60, 21, 63, 22, 66, 23, 69, 24, 72, 25, 75, 26, 78, 27, 81, 28, 84, 29, 87, 30, 90, 31, 93, 32, 96, 33, 99, 34, 102, 35, 105, 36, 108
Offset: 1

Views

Author

N. J. A. Sloane, Oct 02 2001

Keywords

Comments

Also number of 1's in n-th row of triangle in A071030. - Hans Havermann, May 26 2002
Number of ON cells at generation n of 1-D CA defined by Rule 54. - N. J. A. Sloane, Aug 09 2014
a(n)*A098557(n) equals the second right hand column of A167556. - Johannes W. Meijer, Nov 12 2009
Given a(1) = 1, for all n > 1, a(n) is the least positive integer not equal to a(n-1) such that the arithmetic mean of the first n terms is an integer. The sequence of arithmetic means of the first 1, 2, 3, ..., terms is 1, 2, 2, 3, 3, 4, 4, ... (A004526 disregarding its first three terms). - Rick L. Shepherd, Aug 20 2013

Examples

			a(13) = a(2*7 - 1) = 7, a(14) = a(2*7) = 21.
a(8) = 8-9+10-11+12-13+14-15+16 = 12. - _Bruno Berselli_, Jun 05 2013
		

Crossrefs

Interleaving of A000027 and A008585 (without first term).

Programs

  • ARIBAS
    maxarg := 75; for n := 1 to maxarg do if n mod 2 = 1 then write((n+1) div 2, " ") else write((n div 2)*3," "); end; end;
    
  • GAP
    a:=[];;  for n in [1..75] do if n mod 2 = 0 then Add(a,3*n/2); else Add(a,(n+1)/2); fi; od; a; # Muniru A Asiru, Oct 28 2018
    
  • Haskell
    import Data.List (transpose)
    a064455 n = n + if m == 0 then n' else - n'  where (n',m) = divMod n 2
    a064455_list = concat $ transpose [[1 ..], [3, 6 ..]]
    -- Reinhard Zumkeller, Oct 12 2013
    
  • Magma
    [(1/2)*n*(-1)^n+n+(1/4)*(1-(-1)^n): n in [1..80]]; // Vincenzo Librandi, Aug 10 2014
    
  • Maple
    A064455 := proc(n)
        if type(n,'even') then
            3*n/2 ;
        else
            (n+1)/2 ;
        end if;
    end proc: # R. J. Mathar, Aug 03 2015
  • Mathematica
    Table[ If[ EvenQ[n], 3n/2, (n + 1)/2], {n, 1, 70} ]
  • PARI
    a(n) = { if (n%2, (n + 1)/2, 3*n/2) } \\ Harry J. Smith, Sep 14 2009
    
  • PARI
    a(n)=if(n<3,2*n-1,((n-1)*(n-2))%(2*n-1)) \\ Jim Singh, Oct 14 2018
    
  • Python
    def A064455(n): return (3*n - (2*n-1)*(n%2))//2
    print([A064455(n) for n in range(1,81)]) # G. C. Greubel, Jan 30 2025

Formula

a(n) = (1/2)*n*(-1)^n + n + (1/4)*(1 - (-1)^n). - Stephen Crowley, Aug 10 2009
G.f.: x*(1+3*x) / ( (1-x)^2*(1+x)^2 ). - R. J. Mathar, Mar 30 2011
From Jaroslav Krizek, Mar 22 2011: (Start)
a(n) = n - A123684(n-1) for odd n.
a(n) = n + a(n-1) for even n.
a(n) = A123684(n) + A137501(n).
Abs( a(n) - A123684(n) ) = A052928(n). (End)
a(n) = Sum_{i=n..2*n} i*(-1)^i. - Bruno Berselli, Jun 05 2013
a(n) = n + floor(n/2)*(-1)^(n mod 2). - Bruno Berselli, Dec 14 2015
a(n) = (n^2-3*n+2) mod (2*n-1) for n>2. - Jim Singh, Oct 31 2018
E.g.f.: (1/2)*(x*cosh(x) + (1+3*x)*sinh(x)). - G. C. Greubel, Jan 30 2025

A167552 A triangle related to the a(n) formulas of the rows of the ED1 array A167546.

Original entry on oeis.org

1, 3, -2, 5, -5, 2, 7, -7, 14, -8, 9, -6, 63, -66, 24, 11, 0, 209, -264, 308, -144, 13, 13, 559, -689, 2236, -2132, 720, 15, 35, 1281, -1255, 11640, -14980, 14064, -5760, 17, 68, 2618, -1360, 47753, -68068, 145452, -126480, 40320
Offset: 1

Views

Author

Johannes W. Meijer, Nov 10 2009, Nov 23 2009

Keywords

Comments

The a(n) formulas given below correspond to the first ten rows of the ED1 array A167546.
The recurrence relations of the a(n) formulas for the left hand triangle columns, see the cross-references below, lead to the sequences A003148 and A007318.

Examples

			Row 1: a(n) = 1.
Row 2: a(n) = 3*n - 2.
Row 3: a(n) = 5*n^2 - 5*n + 2.
Row 4: a(n) = 7*n^3 - 7*n^2 + 14*n - 8.
Row 5: a(n) = 9*n^4 - 6*n^3 + 63*n^2 - 66*n + 24.
Row 6: a(n) = 11*n^5 + 0*n^4 + 209*n^3 - 264*n^2 + 308*n - 144.
Row 7: a(n) = 13*n^6 +13*n^5 +559*n^4 -689*n^3 +2236*n^2 -2132*n +720.
Row 8: a(n) = 15*n^7 + 35*n^6 + 1281*n^5 - 1255*n^4 + 11640*n^3 - 14980*n^2 + 14064*n - 5760.
Row 9: a(n) = 17*n^8 + 68*n^7 + 2618*n^6 - 1360*n^5 + 47753*n^4 - 68068*n^3 + 145452*n^2 - 126480*n + 40320.
Row 10: a(n) = 19*n^9 + 114*n^8 + 4902*n^7 + 684*n^6 + 163419*n^5 - 224694*n^4 + 1048268*n^3 - 1308264*n^2 + 1081632*n - 403200.
		

Crossrefs

A167546 is the ED1 array.
A000012, A016777, 2*A005891, A167547, A167548 and A167549 are the first sixth ED1 array rows.
A098557 and A167553 equal the first two right hand columns of this triangle.
A005408, A167554 and A167555, A168302 and A168303 equal the first five left hand columns of this triangle.
A000142 equals the row sums.
Cf. A003148 and A007318.

A167556 A triangle related to the GF(z) formulas of the rows of the ED1 array A167546.

Original entry on oeis.org

1, 1, 2, 2, 6, 2, 6, 24, 4, 8, 24, 120, 0, 48, 24, 120, 720, -120, 384, 72, 144, 720, 5040, -1680, 3696, -432, 1296, 720, 5040, 40320, -20160, 40320, -15840, 17280, 2880, 5760, 40320, 362880, -241920, 483840, -311040, 288000, -46080, 69120, 40320
Offset: 1

Views

Author

Johannes W. Meijer, Nov 10 2009

Keywords

Comments

The GF(z) formulas given below correspond to the first ten rows of the ED1 array A167546. The polynomials in their numerators lead to the triangle given above.

Examples

			Row 1: GF(z) = 1/(1-z).
Row 2: GF(z) = (1 + 2*z)/(1-z)^2.
Row 3: GF(z) = (2 + 6*z + 2*z^2)/(1-z)^3.
Row 4: GF(z) = (6 + 24*z + 4*z^2 + 8*z^3)/(1-z)^4.
Row 5: GF(z) = (24 + 120*z + 0*z^2 + 48*z^3 + 24*z^4)/(1-z)^5.
Row 6: GF(z) = (120 + 720*z - 120*z^2 + 384*z^3 + 72*z^4 + 144*z^5)/ (1-z)^6.
Row 7: GF(z) = (720 + 5040*z - 1680*z^2 + 3696*z^3 - 432*z^4 + 1296*z^5 + 720*z^6)/(1-z)^7.
Row 8: GF(z) = (5040 + 40320*z - 20160*z^2 + 40320*z^3 - 15840*z^4 + 17280*z^5 + 2880*z^6 + 5760*z^7)/(1-z)^8.
Row 9: GF(z) = (40320 +362880*z -241920*z^2 + 483840*z^3 - 311040*z^4 + 288000*z^5 - 46080*z^6 + 69120*z^7 + 40320*z^8)/(1-z)^9.
Row 10: GF(z) = (362880 +3628800*z -3024000*z^2 +6289920*z^3 -5495040*z^4 + 5276160*z^5 - 2131200*z^6 + 1382400*z^7 + 201600*z^8 + 403200*z^9)/(1-z)^10;
		

Crossrefs

A167546 is the ED1 array.
A000142, A000142 (n=>2) and 120*A062148 (with three extra terms at the beginning of the sequence) equal the first three left hand triangle columns.
A098557(n) and A098557(n)*A064455(n) equal the first two right hand triangle columns.
A007680 equals the row sums.

A108644 Square array A(n,k) read by ascending antidiagonals: A(n,n) = n^2, if n>k: A(n,k) = n*(n-1) + k, if k>n: A(n,k) = n + (k-1)^2.

Original entry on oeis.org

1, 3, 2, 7, 4, 5, 13, 8, 6, 10, 21, 14, 9, 11, 17, 31, 22, 15, 12, 18, 26, 43, 32, 23, 16, 19, 27, 37, 57, 44, 33, 24, 20, 28, 38, 50, 73, 58, 45, 34, 25, 29, 39, 51, 65, 91, 74, 59, 46, 35, 30, 40, 52, 66, 82, 111, 92, 75, 60, 47, 36, 41, 53, 67, 83, 101
Offset: 1

Views

Author

Pierre CAMI, Jun 27 2005

Keywords

Comments

The table gives all positive integers exactly once.

Examples

			Array begins:
   1  2  5 10 17 26 37 ...
   3  4  6 11 18 27 38 ...
   7  8  9 12 19 28 39 ...
  13 14 15 16 20 29 40 ...
  21 22 23 24 25 30 41 ...
  31 32 33 34 35 36 42 ...
  43 44 45 46 47 48 49 ...
  ...
Antidiagonal triangle begins as:
   1;
   3,  2;
   7,  4,  5;
  13,  8,  6, 10;
  21, 14,  9, 11, 17;
  31, 22, 15, 12, 18, 26;
  43, 32, 23, 16, 19, 27, 37;
  ...
		

Crossrefs

Cf. A002522 (1st row), A002061 (1st column), A000290 (diagonal).

Programs

  • Magma
    A:= func< n,k | k lt n select k+n*(n-1) else k eq n select n^2 else n+(k-1)^2 >;
    A108644:= func< n,k | A(n-k+1,k) >;
    [A108644(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Oct 18 2023
    
  • Mathematica
    A[n_, k_]:= If[kA108644[n_, k_]:= A[n-k+1,k];
    Table[A108644[n,k], {n,12}, {k,n}]//Flatten (* G. C. Greubel, Oct 18 2023 *)
  • PARI
    A(i,j)=if (i==j, i^2, if (i>j, i*(i-1)+j, (j-1)^2+i));
    matrix(7,7,n,k,A(n,k)) \\ Michel Marcus, Dec 30 2020
    
  • SageMath
    def A(n,k):
        if kA108644(n,k): return A(n-k+1,k)
    flatten([[A108644(n,k) for k in range(1,n+1)] for n in range(1,13)]) # G. C. Greubel, Oct 18 2023

Formula

From G. C. Greubel, Oct 18 2023: (Start)
T(n, k) = A(n-k+1, k) (antidiagonal triangle).
T(n, n) = A002522(n-1).
T(2*n, n) = A005563(n).
T(2*n-1, n) = A000290(n).
T(2*n-2, n) = A002378(n-1), n >= 2.
T(3*n, n) = A033954(n).
Sum_{k=1..n} T(n, k) = A274248(n). (End)
Let M be the upper left n X n submatrix of this array, then abs(det(M)) = A098557(n). - Thomas Scheuerle, Nov 11 2023
Showing 1-5 of 5 results.