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

A114113 a(n) = sum{k=1 to n} (A114112(k)). (For n>=2, a(n) = sum{k=1 to n} (A014681(k)) =sum{k=1 to n} (A103889(k)).).

Original entry on oeis.org

1, 3, 7, 10, 16, 21, 29, 36, 46, 55, 67, 78, 92, 105, 121, 136, 154, 171, 191, 210, 232, 253, 277, 300, 326, 351, 379, 406, 436, 465, 497, 528, 562, 595, 631, 666, 704, 741, 781, 820, 862, 903, 947, 990, 1036, 1081, 1129, 1176, 1226, 1275, 1327, 1378, 1432
Offset: 1

Views

Author

Leroy Quet, Nov 13 2005

Keywords

Comments

a(n) is not divisible by (A114112(n+1)).
Sequence is A130883 union A014105 - {0,2}. - Anthony Hernandez, Sep 08 2016

Crossrefs

Programs

  • Magma
    I:=[1,3,7,10,16]; [n le 5 select I[n] else 2*Self(n-1)-2*Self(n-3)+Self(n-4): n in [1..60]]; // Vincenzo Librandi, Mar 13 2018
    
  • Mathematica
    Join[{1}, LinearRecurrence[{2, 0, -2, 1}, {3, 7, 10, 16}, 52]] (* Jean-François Alcover, Sep 22 2017 *)
    CoefficientList[Series[(1 + x + x^2 -2 x^3 + x^4)/((1 + x) (1 - x)^3), {x, 0, 60}], x] (* Vincenzo Librandi, Mar 13 2018 *)
  • Python
    def A114113(n): return 1 if n == 1 else (m:=n//2)*(n+1) + (n+1-m)*(n-2*m) # Chai Wah Wu, May 24 2022

Formula

a(1)=1. a(2n) = n*(2n+1). a(2n+1) = 2n^2 +3n +2.
From R. J. Mathar, Nov 04 2008: (Start)
a(n) = A026035(n+1) - A026035(n), n>1.
G.f.: x(1+x+x^2-2x^3+x^4)/((1+x)(1-x)^3).
a(n) = 2*a(n-1)-2*a(n-3)+a(n-4), n>5. (End)
This is (essentially) 1 + A084265, - N. J. A. Sloane, Mar 12 2018

Extensions

More terms from R. J. Mathar, Aug 31 2007

A354008 Numerators of Cesàro means sequence of A114112.

Original entry on oeis.org

1, 3, 7, 5, 16, 7, 29, 9, 46, 11, 67, 13, 92, 15, 121, 17, 154, 19, 191, 21, 232, 23, 277, 25, 326, 27, 379, 29, 436, 31, 497, 33, 562, 35, 631, 37, 704, 39, 781, 41, 862, 43, 947, 45, 1036, 47, 1129, 49, 1226, 51, 1327, 53, 1432, 55, 1541, 57, 1654, 59, 1771, 61, 1892, 63, 2017, 65
Offset: 1

Views

Author

Bernard Schott, May 13 2022

Keywords

Comments

This sequence lists the numerators of c(n) = (Sum_{k=1..n} A114112(k)) / n. The corresponding denominator is A141310(n-1) (see Example section).
When a sequence u(n) is increasing, then Cesàro means sequence c(n) = (u(1)+...+u(n))/n is also increasing, but the converse is false.
A114112 is such a counterexample.
Proof: A114112 is clearly not increasing; now, the successive arithmetic means c(n) of the first specific terms of the sequence are 1/1, 3/2, 7/3, 10/4, 16/5, 21/6, 29/7, ... so, if m >= 1, c(2m) = (2m+1)/2 and c(2m+1) = m+1 + 1/(2m+1), c(1) = 1. We get c(n) = a(n) / A141310(n-1) for n >= 1.
We have c(2m+1) - c(2m) = 1/(2m+1) + 1/2 > 0 and c(2m+2) - c(2m+1) = (2m-1) / (4m+2) > 0 when m >= 1; hence for m >= 1, c(2m) < c(2m+1) < c(2m+2), and also c(1) = 1 < c(2) = 3/2; QED.

Examples

			Table with the first few terms:
       Indices n        :  1,   2,   3,   4,    5,   6,    7,   8,    9,   10, ...
       A114112(n)       :  1,   2,   4,   3,    6,   5,    8,   7,   10,    9, ...
      Partial sums      :  1,   3,   7,  10,   16,  21,   29,  36,   46,   55, ...
    Cesàro means c(n)   :  1, 3/2, 7/3, 5/2, 16/5, 7/2, 29/7, 9/2, 46/9, 11/2, ...
      Numerator a(n)    :  1,   3,   7,   5,   16,   7,   29,   9,   46,   11, ...
Denominator A141310(n-1):  1,   2,   3,   2,    5,   2,    7,   2,    9,    2, ...
		

References

  • J. M. Arnaudiès, P. Delezoide et H. Fraysse, Exercices résolus d'Analyse du cours de mathématiques - 2, Dunod, Exercice 10, pp. 14-16.

Crossrefs

Programs

  • Mathematica
    s[1] = 1; s[2] = 2; s[n_] := If[OddQ[n], n + 1, n - 1]; m = 100; Numerator[Accumulate[Array[s, m]]/Range[m]] (* Amiram Eldar, May 15 2022 *)
  • PARI
    f(n) = if (n<=2, n, if (n%2, n+1, n-1)); \\ A114112
    a(n) = numerator(sum(k=1, n, f(k))/n); \\ Michel Marcus, May 16 2022
    
  • Python
    from math import gcd
    def A354008(n): return 1 if n == 1 else (k:= (m:=n//2)*(n+1) + (n+1-m)*(n-2*m))//gcd(k,n) # Chai Wah Wu, May 24 2022

Formula

a(1) = 1, then for m >= 1: a(2m+1) = A130883(m+1) and a(2m) = A005408(m) = 2m+1.
G.f.: x*(1 + 3*x + 4*x^2 - 4*x^3 - 2*x^4 + x^5 + x^6)/(1 - x^2)^3. - Stefano Spezia, May 15 2022

A033999 a(n) = (-1)^n.

Original entry on oeis.org

1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1
Offset: 0

Views

Author

Vasiliy Danilov (danilovv(AT)usa.net), Jun 15 1998

Keywords

Comments

(-1)^(n+1) = signed area of parallelogram with vertices (0,0), U=(F(n),F(n+1)), V=(F(n+1),F(n+2)), where F = A000045 (Fibonacci numbers). The area of every such parallelogram is 1. The signed area is -1 if and only if F(n+1)^2 > F(n)*F(n+2), or, equivalently, n is even, or, equivalently, the vector U is "above" V, indicating that U and V "cross" as n -> n+1. - Clark Kimberling, Sep 09 2013
Periodic with period length 2. - Ray Chandler, Apr 03 2017
From Bernard Schott, May 11 2022: (Start)
Cesàro mean theorem: When a(n) has a limit (finite or infinite) in the usual sense, then c(n) = (a(1)+...+a(n))/n has the same Cesàro limit, but the converse is false. This sequence is a counterexample in the case of a finite Cesàro limit (see A237420 for counterexample with an infinite Cesàro limit).
This sequence is not convergent in the usual sense because a(2n) = 1 while a(2n+1) = -1; the successive arithmetic means c(n) of the first n terms of the sequence are 1/1, 0/2, 1/3, 0/4, 1/5, 0/6, ... so c(2n) = 1/(2n+1) and c(2n+1) = 0, hence the Cesàro limit is 0 because c(n) -> 0 when n -> oo.
In fact, when sequence a(n) is "Period k: [a1, a2, ..., ak]", then the Cesàro limit c of this sequence is (a1+a2+...+ak)/k.
Note that the converse of the theorem is true iff a(n) is monotonic (End).

Examples

			G.f. = 1 - x + x^2 - x^3 + x^4 - x^5 + x^6 - x^7 + x^8 - x^9 + x^10 - x^11 + x^12 + ...
		

References

  • J. M. Arnaudiès, P. Delezoide et H. Fraysse, Exercices résolus d'Analyse du cours de mathématiques - 2, Dunod, Exercice 10, pp. 14-16.

Crossrefs

About Cesàro mean theorem: A114112, A237420.
Cf. A072691 (abs. val. Dgf at s=2), A197070 (abs. val. Dgf at s=3), A267315 (abs. val. Dgf at s=4).

Programs

Formula

G.f.: 1/(1+x).
E.g.f.: exp(-x).
Linear recurrence: a(0)=1, a(n)=-a(n-1) for n>0. - Jaume Oliver Lafont, Mar 20 2009
Sum_{k=0..n} a(k) = A059841(n). - Jaume Oliver Lafont, Nov 21 2009
Sum_{k>=0} a(k)/(k+1) = log(2). - Jaume Oliver Lafont, Mar 30 2010
Euler transform of length 2 sequence [ -1, 1]. - Michael Somos, Mar 21 2011
Moebius transform is length 2 sequence [ -1, 2]. - Michael Somos, Mar 21 2011
a(n) = -b(n) where b(n) = multiplicative with b(2^e) = -1 if e>0, b(p^e) = 1 if p>2. - Michael Somos, Mar 21 2011
a(n) = a(-n) = a(n + 2) = cos(n * Pi). a(n) = c_2(n) if n>1 where c_k(n) is Ramanujan's sum. - Michael Somos, Mar 21 2011
a(n) = (1/2)*Product_{k=0..2*n-1} 2*cos((2*k+1)*Pi/(4*n)), n >= 1. See the product given in the Oct 21 2013 formula comment in A056594, and replace there n -> 2*n. - Wolfdieter Lang, Oct 23 2013
D.g.f.: (2^(1-s)-1)*zeta(s) = -eta(s) (the Dirichlet eta function). - Ralf Stephan, Mar 27 2015
From Ilya Gutkovskiy, Aug 17 2016: (Start)
a(n) = T_n(-1), where T_n(x) are the Chebyshev polynomials of the first kind.
Binomial transform of A122803. (End)
a(n) = exp(i*Pi*n) = exp(-i*Pi*n). - Carauleanu Marc, Sep 15 2016
a(n) = Sum_{k=0..n} (-1)^k*A063007(n, k), n >= 0. - Wolfdieter Lang, Sep 13 2016

A086270 Rectangular array T(k,n) of polygonal numbers, by antidiagonals.

Original entry on oeis.org

1, 3, 1, 6, 4, 1, 10, 9, 5, 1, 15, 16, 12, 6, 1, 21, 25, 22, 15, 7, 1, 28, 36, 35, 28, 18, 8, 1, 36, 49, 51, 45, 34, 21, 9, 1, 45, 64, 70, 66, 55, 40, 24, 10, 1, 55, 81, 92, 91, 81, 65, 46, 27, 11, 1, 66, 100, 117, 120, 112, 96, 75, 52, 30, 12, 1, 78, 121, 145, 153, 148, 133, 111
Offset: 1

Views

Author

Clark Kimberling, Jul 14 2003

Keywords

Comments

The antidiagonal sums 1, 4, 11, 25, 50, ... are the numbers A006522(n) for n >= 3.
This is the accumulation array (cf. A144112) of A144257 (which is the weight array of this sequence). - Clark Kimberling, Sep 16 2008
By rows, the sequence beginning (1, N, ...) is the binomial transform of (1, (N-1), (N-2), 0, 0, 0, ...); and is the second partial sum of (1, (N-2), (N-2), (N-2), ...). Example: The sequence (1, 4, 9, 16, 25, ...) is the binomial transform of (1, 3, 2, 0, 0, 0, ...) and the second partial sum of (1, 2, 2, 2, ...). - Gary W. Adamson, Aug 23 2015

Examples

			First 6 rows:
=========================================
n\k|  1   2    3    4    5    6     7
---|-------------------------------------
1  |  1   3    6   10   15   21    28 ... (A000217, triangular numbers)
2  |  1   4    9   16   25   36    49 ... (A000290, squares)
3  |  1   5   12   22   35   51    70 ... (A000326, pentagonal numbers)
4  |  1   6   15   28   45   66    91 ... (A000384, hexagonal numbers)
5  |  1   7   18   34   55   81   112 ... (A000566, heptagonal numbers)
6  |  1   8   21   40   65   96   133 ... (A000567, octagonal numbers)
...
The array formed by the complements: A183225.
		

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See Table 76 at p. 189.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 123.

Crossrefs

Programs

  • Magma
    T:=func; [T(k,n-k+1): k in [1..n], n in [1..12]]; // Bruno Berselli, Dec 19 2014
  • Mathematica
    t[n_, k_] := n*Binomial[k, 2] + k; Table[ t[k, n - k + 1], {n, 12}, {k, n}] // Flatten

Formula

T(n, k) = n*binomial(k, 2) + k = A057145(n+2,k).
2*T(n, k) = T(n+r, k) + T(n-r, k), where r = 0, 1, 2, 3, ..., n-1 (see table in Example field). - Bruno Berselli, Dec 19 2014
From Stefano Spezia, Sep 02 2022: (Start)
G.f.: x*y*(1 - x + x*y)/((1 - x)^2*(1 - y)^3).
G.f. of k-th column: k*(1 + k - 2*x)*x/(2*(1 - x)^2). (End)

Extensions

Extended by Clark Kimberling, Jan 01 2011

A237420 If n is odd, then a(n) = 0; otherwise, a(n) = n.

Original entry on oeis.org

0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 10, 0, 12, 0, 14, 0, 16, 0, 18, 0, 20, 0, 22, 0, 24, 0, 26, 0, 28, 0, 30, 0, 32, 0, 34, 0, 36, 0, 38, 0, 40, 0, 42, 0, 44, 0, 46, 0, 48, 0, 50, 0, 52, 0, 54, 0, 56, 0, 58, 0, 60, 0, 62, 0, 64, 0, 66, 0, 68, 0, 70, 0, 72, 0, 74
Offset: 0

Views

Author

Vincenzo Librandi, Feb 24 2014

Keywords

Comments

Normally the OEIS excludes sequences in which every other term is zero. But there are exceptions for especially important sequences like this one. - N. J. A. Sloane, Feb 27 2014
Essentially the factorial expansion of exp(-1): exp(-1) = Sum_{n>=1} a(n)/(n+1)!. - Joerg Arndt, Mar 13 2014
a(n) is the number of m < n for which a(m) has the same parity as n. For instance, a(4) = 4 because 4 has the same parity as a(0), a(1), a(2), and a(3). - Alec Jones, May 16 2016
This sequence is an example of a sequence that has no limit while the Cesàro means limit is infinite. See A354280 for further information. - Bernard Schott, May 22 2022

References

  • J. M. Arnaudiès, P. Delezoide et H. Fraysse, Exercices résolus d'Analyse du cours de mathématiques - 2, Dunod, Exercice 10, pp. 14-16.

Crossrefs

About the Cesàro mean theorem: A033999, A114112.

Programs

  • Magma
    [IsOdd(n) select 0 else n: n in [1..80]];
    
  • Magma
    [(1+(-1)^n)*n/2: n in [1..80]];
    
  • Magma
    &cat [[n, 0]: n in [0..80 by 2]]; // Bruno Berselli, Nov 11 2016
    
  • Maple
    seq(op([0,2*i]),i=1..30); # Robert Israel, Aug 27 2015
  • Mathematica
    Table[If[OddQ[n], 0, n], {n, 80}]
    CoefficientList[Series[2 x /(1 - x^2)^2, {x, 0, 80}], x]
    LinearRecurrence[{0, 2, 0, -1}, {0, 0, 2, 0}, 75] (* Robert G. Wilson v, Nov 11 2016 *)
    Riffle[Range[0,80,2],0] (* Harvey P. Dale, Mar 16 2021 *)
  • PARI
    a(n)=if(n%2==0,n,0) \\ Anders Hellström, Aug 27 2015
    
  • Python
    def a(n): return 0 if n%2 else n # Michael S. Branicky, Jun 05 2022

Formula

O.g.f.: 2*x^2/(1-x^2)^2.
E.g.f.: x*sinh(x). - Robert Israel, Aug 27 2015
a(n) = 2*a(n-2) - a(n-4) for n>4.
a(n) = 2*A142150(n) = (1+(-1)^n)*n/2 = n*((n-1) mod 2).
a(n) = floor(n^(-1)^n) for n>1. - Ilya Gutkovskiy, Aug 27 2015
Sum_{i=1..n} a(i) = A110660(n). - Bruno Berselli, Feb 27 2014
a(n) = -1 + ceiling((n + 1)^(sin(Pi*n/2) + cos(Pi*n))). - Lechoslaw Ratajczak, Nov 06 2016

Extensions

Edited by Bruno Berselli, Feb 27 2014

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
Showing 1-6 of 6 results.