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

A354280 a(n) is the numerator of Cesàro means sequence c(n) of A237420 when the denominator is A141310(n).

Original entry on oeis.org

0, 0, 2, 1, 6, 2, 12, 3, 20, 4, 30, 5, 42, 6, 56, 7, 72, 8, 90, 9, 110, 10, 132, 11, 156, 12, 182, 13, 210, 14, 240, 15, 272, 16, 306, 17, 342, 18, 380, 19, 420, 20, 462, 21, 506, 22, 552, 23, 600, 24, 650, 25, 702, 26, 756, 27, 812, 28, 870, 29, 930, 30, 992, 31, 1056, 32, 1122, 33, 1190
Offset: 0

Views

Author

Bernard Schott, May 22 2022

Keywords

Comments

So, we get c(n) = a(n) / A141310(n) for n >= 0 (see Formula and Example section).
Cesàro mean theorem: when the series u(n) has a limit (finite or infinite) in the usual sense, then c(n) = (u(0)+...+u(n))/(n+1) has the same Cesàro limit, but the converse is false.
A237420 is such a counterexample in the case of an infinite limit.
Proof: A237420 is not convergent in the usual sense because a(2n+1) = 0, while a(2n) -> oo when n -> oo. Now, the successive arithmetic means c(n) of the first n terms of the sequence are 0/1, 0/2, 2/3, 2/4, 6/5, 6/6, 12/7, 12/8, 20/9, 20/10, ... so c(2n)= (n*(n+1))/(2*n+1) ~ n/2 and c(2n+1) = n/2, hence the Cesàro limit is infinity because c(n) -> oo as n -> oo (Arnaudiès et al.), QED.
The first few irreducible fractions c(n) are in the last row of the Example section. The differences between row 4 and last row exist only when n = 4*k+1, k>0, then respectively c(n) = 2k/2 = k/1.
This sequence consists of the oblong numbers (A002378) interlaced with the natural numbers (A001477)
Note that A033999 is a counterexample in the case of a finite Cesàro limit.
Also, the converse of the Cesàro mean theorem is true iff u(n) is monotonic.

Examples

			Table with the first few terms:
       Indices n         :   0,   1,   2,   3,   4,   5,    6,   7,    8,   9, ...
       A237420(n)        :   0,   0,   2,   0,   4,   0,    6,   0,    8,   0, ...
      Partial sums       :   0,   0,   2,   2,   6,   6,   12,  12,   20,  20, ...
    Cesàro means c(n)    : 0/1, 0/2, 2/3, 1/2, 6/5, 2/2, 12/7, 3/2, 20/9, 4/2, ...
      Numerator a(n)     :   0,   0,   2,   1,   6,   2,   12,   3,   20,   4, ...
Denominator A141310(n)   :   1,   2,   3,   2,   5,   2,    7,   2,    9,   2, ...
Irreducible Cesàro mean  : 0/1, 0/2, 2/3, 1/2, 6/5, 1/1, 12/7, 3/2, 20/9, 2/1, ...
		

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

Cf. A001477, A002378, A033999, A141310 (denominators), A237420.

Programs

  • Mathematica
    m = 50; Accumulate[Table[If[OddQ[n], 0, n], {n, 0, 2*m - 1}]] * Flatten[Table[{2*n - 1, 2}, {n, 1, m}]] / Range[2*m] (* Amiram Eldar, Jun 05 2022 *)
  • PARI
    c(n) = sum(k=0, n, if (k%2, 0, k))/(n+1);
    f(n) = if(n%2, 2, 1+n); \\ A141310
    a(n) = c(n)*f(n); \\ Michel Marcus, Jun 06 2022

Formula

a(n) = (A141310(n)/(n+1)) * Sum_{k=0..n} A237420(k).
For n >= 0, a(2n) = n*(n+1) = A002378(n), a(2n+1) = n = A001477(n).
G.f.: x^2*(2 + x - x^3)/(1 - x^2)^3. - Stefano Spezia, May 23 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

A114112 a(1)=1, a(2)=2; thereafter a(n) = n+1 if n odd, n-1 if n even.

Original entry on oeis.org

1, 2, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15, 18, 17, 20, 19, 22, 21, 24, 23, 26, 25, 28, 27, 30, 29, 32, 31, 34, 33, 36, 35, 38, 37, 40, 39, 42, 41, 44, 43, 46, 45, 48, 47, 50, 49, 52, 51, 54, 53, 56, 55, 58, 57, 60, 59, 62, 61, 64, 63, 66, 65, 68, 67, 70, 69, 72, 71
Offset: 1

Views

Author

Leroy Quet, Nov 13 2005

Keywords

Comments

a(1)=1; for n>1, a(n) is the smallest positive integer not occurring earlier in the sequence such that a(n) does not divide Sum_{k=1..n-1} a(k). - Leroy Quet, Nov 13 2005 (This was the original definition. A simple induction argument shows that this is the same as the present definition. - N. J. A. Sloane, Mar 12 2018)
Define b(1)=2; for n>1, b(n) is the smallest number not yet in the sequence which shares a prime factor with the sum of all preceding terms. Then a simple induction argument shows that the b(n) sequence is the same as the present sequence with the first term omitted. - David James Sycamore, Feb 26 2018
Here are the details of the two induction arguments (Start)
For a(n), let A(n) = a(1)+...+a(n). The claim is that for n>2 a(n)=n+1 if n odd, n-1 if n even.
The induction hypotheses are: for i
For b(n), the argument is very similar, except that the missing numbers when looking for b(n) are slightly different, and (setting B(n) = b(1)+...b(n)), we have B(2i)=(i+1)(2i+1), B(2i+1)=(i+2)(2i+1). - N. J. A. Sloane, Mar 14 2018
When sequence a(n) is increasing, then the Cesàro means sequence c(n) = (a(1)+...+a(n))/n is also increasing, but the converse is false. This sequence is a such an example where c(n) is increasing, while a(n) is not increasing (Arnaudiès et al.). See proof in A354008. - Bernard Schott, May 11 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

All of A014681, A103889, A113981, A114112, A114285 are essentially the same sequence. - N. J. A. Sloane, Mar 12 2018
Cf. A114113 (partial sums).
See A084265 for the partial sums of the b(n) sequence.
About Cesàro mean theorem: A033999, A141310, A237420, A354008.
Cf. A244009.

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = Block[{k = 1, s, t = Table[ a[i], {i, n - 1}]}, s = Plus @@ t; While[ Position[t, k] != {} || Mod[s, k] == 0, k++ ]; k]; Array[a, 72] (* Robert G. Wilson v, Nov 18 2005 *)
  • PARI
    a(n) = if (n<=2, n, if (n%2, n+1, n-1)); \\ Michel Marcus, May 16 2022
    
  • Python
    def A114112(n): return n + (0 if n <= 2 else -1+2*(n%2)) # Chai Wah Wu, May 24 2022

Formula

G.f.: x*(x^4-2*x^3+x^2+x+1)/((1-x)*(1-x^2)). - N. J. A. Sloane, Mar 12 2018
The g.f. for the b(n) sequence is x*(x^3-3*x^2+2*x+2)/((1-x)*(1-x^2)). - Conjectured (correctly) by Colin Barker, Mar 04 2018
E.g.f.: 1 - x + x^2/2 + (x - 1)*cosh(x) + (x + 1)*sinh(x). - Stefano Spezia, Sep 02 2022
Sum_{n>=1} (-1)^(n+1)/a(n) = 1 - log(2) (A244009). - Amiram Eldar, Jun 29 2025

Extensions

More terms from Robert G. Wilson v, Nov 18 2005
Entry edited (with simpler definition) by N. J. A. Sloane, Mar 12 2018

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

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

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

A262666 Irregular table read by rows: T(n,k) is the number of binary bisymmetric n X n matrices with exactly k 1's; n>=0, 0<=k<=n^2.

Original entry on oeis.org

1, 1, 1, 1, 0, 2, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 0, 4, 0, 8, 0, 12, 0, 14, 0, 12, 0, 8, 0, 4, 0, 1, 1, 1, 4, 4, 10, 10, 20, 20, 31, 31, 40, 40, 44, 44, 40, 40, 31, 31, 20, 20, 10, 10, 4, 4, 1, 1, 1, 0, 6, 0, 21, 0, 56, 0, 120, 0, 216, 0, 336, 0, 456, 0
Offset: 0

Author

Kival Ngaokrajang, Sep 26 2015

Keywords

Comments

T(n,k) = 0 if n is even and k is odd.
T(n,k) = T(n,k+1) if n is odd and k is even.

Examples

			Irregular table begins:
n\k 0   1   2   3   4   5   6   7   8   9   ...
0:  1
1:  1   1
2:  1   0   2   0   1
3:  1   1   2   2   2   2   2   2   1   1
4:  1   0   4   0   8   0  12   0  14   0   ...
5:  1   1   4   4  10  10  20  20  31  31   ...
...
		

Crossrefs

Row sums give A060656(n+1).
Columns k=0-3 give: A000012, A000035, A052928, A237420(n+1).

Programs

  • Maple
    T:= n-> seq(coeff((t->(1+x^2)^(n-t)*(1+x)^t*(1+x^4)^
          (((n-2)*n+t)/4))(irem(n, 2)), x, i), i=0..n^2):
    seq(T(n), n=0..6);  # Alois P. Heinz, Sep 27 2015

Formula

G.f. for row n: (1+x)^t*(1+x^2)^(n-t)*(1+x^4)^(((n-2)*n+t)/4) where t = n mod 2. - Alois P. Heinz, Sep 27 2015

Extensions

More terms from Alois P. Heinz, Sep 27 2015

A115718 Inverse of number triangle A115717; a divide-and-conquer related triangle.

Original entry on oeis.org

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

Author

Paul Barry, Jan 29 2006

Keywords

Comments

Product of A115713 and (1/(1-x), x).
Row sums are 1,1,-1,1,-3,1,-5,1,-7,1, ... with g.f. (1+x-3*x^2-x^3)/(1-x^2)^2.
Row sums of inverse are A115716.

Examples

			Triangle begins
   1;
   0,  1;
  -3,  1,  1;
   0,  0,  0,  1;
  -3, -3,  1,  1,  1;
   0,  0,  0,  0,  0,  1;
  -3, -3, -3,  1,  1,  1,  1;
   0,  0,  0,  0,  0,  0,  0,  1;
  -3, -3, -3, -3,  1,  1,  1,  1,  1;
   0,  0,  0,  0,  0,  0,  0,  0,  0,  1;
  -3, -3, -3, -3, -3,  1,  1,  1,  1,  1,  1;
   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1;
  -3, -3, -3, -3, -3, -3,  1,  1,  1,  1,  1,  1,  1;
   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1;
  -3, -3, -3, -3, -3, -3, -3,  1,  1,  1,  1,  1,  1,  1,  1;
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= If[OddQ[n], If[kG. C. Greubel, Nov 29 2021 *)
  • Sage
    def A115718(n,k):
        if (n%2==0): return 0 if (kA115718(n,k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Nov 29 2021

Formula

From G. C. Greubel, Nov 29 2021: (Start)
T(2*n, k) = -3 if (k < n/2) otherwise 1.
T(2*n+1, k) = 0 if (k < n) otherwise 1.
Sum_{k=0..n} T(n, k) = (1/2)*(2 + (1 + (-1)^n)*n) = 1 + A237420(n). (End)

A322506 Factorial expansion of 1/exp(2) = Sum_{n>=1} a(n)/n!.

Original entry on oeis.org

0, 0, 0, 3, 1, 1, 3, 0, 6, 4, 7, 5, 2, 9, 9, 8, 10, 8, 9, 1, 13, 18, 1, 2, 8, 15, 26, 10, 22, 1, 18, 9, 20, 10, 2, 6, 13, 19, 16, 38, 38, 3, 32, 5, 39, 24, 7, 27, 14, 41, 20, 39, 32, 7, 20, 35, 44, 50, 24, 34, 51, 14, 39, 47, 49, 15, 61, 54, 60, 52, 34, 60, 32, 72, 48, 12, 67, 52, 22, 48
Offset: 1

Author

G. C. Greubel, Dec 12 2018

Keywords

Examples

			1/exp(2) = 0 + 0/2! + 0/3! + 3/4! + 1/5! + 1/6! + 3/7! + 0/8! + 6/9! +...
		

Crossrefs

Cf. A092553 (decimal expansion), 0 U A001204 (continued fraction).
Cf. A054977 (e), A067840 (e^2), A068453 (sqrt(e)), A237420 (1/e).

Programs

  • Magma
    SetDefaultRealField(RealField(250));  [Floor(Exp(-2))] cat [Floor(Factorial(n)*Exp(-2)) - n*Floor(Factorial((n-1))*Exp(-2)) : n in [2..80]];
    
  • Mathematica
    With[{b = 1/E^2}, Table[If[n == 1, Floor[b], Floor[n!*b] - n*Floor[(n - 1)!*b]], {n, 1, 100}]]
  • PARI
    default(realprecision, 250); b = exp(-2); for(n=1, 80, print1(if(n==1, floor(b), floor(n!*b) - n*floor((n-1)!*b)), ", "))
    
  • Sage
    b=exp(-2);
    def a(n):
        if (n==1): return floor(b)
        else: return expand(floor(factorial(n)*b) -n*floor(factorial(n-1)*b))
    [a(n) for n in (1..80)]

A347365 a(n) = n * (2-(-1)^n), or zero together with first differences of even triangular numbers halved (A074378).

Original entry on oeis.org

0, 3, 2, 9, 4, 15, 6, 21, 8, 27, 10, 33, 12, 39, 14, 45, 16, 51, 18, 57, 20, 63, 22, 69, 24, 75, 26, 81, 28, 87, 30, 93, 32, 99, 34, 105, 36, 111, 38, 117, 40, 123, 42, 129, 44, 135, 46, 141, 48, 147, 50, 153, 52, 159, 54, 165, 56, 171, 58, 177, 60, 183, 62, 189, 64
Offset: 0

Author

Federico Provvedi, Aug 29 2021

Keywords

Comments

This sequence and A165998 form a complementary pair as solutions of alternating sequences a(n) + b(n) = 4*n (A008586), and a(n)*b(n) = 3*n^2 (A033428).
This is the particular case of the two integer sequences x(n)=2n and y(n)=n, where more generally, x(n) + y(n) = 2*a(n) and x(n)*y(n) = (a(n) + b(n)) * (a(n) - b(n)) give the two conjugate binomials a(n) = x(n) + (-1)^n*y(n) and b(n) = x(n) - (-1)^n*y(n) as solutions over the integer domain.
a(n) is also A005843 and A016945 interleaved.
For every integer k: a(n*k) = n*k is multiplicative for nonnegative even integers n and a(n*k) = n*a(k) for nonnegative odd integers n.
For every nonnegative odd integer k, the k-th difference of a(k*n)/k = (2n+1)*(-1)^n + 2 = A166519(n), and 1 for all nonnegative even integers.
a(6n+1)/3 = 6n+1, and a(6n+5)/3 = 6n+5, related to Collatz Conjecture.
Half-periods of a(k) mod n is A026741(n).

Programs

  • Mathematica
    Table[n(2-(-1)^n),{n,0,99}] (* or *)
    LinearRecurrence[{0,2,0,-1}, {0,3,2,9}, 100] (* or *)
    If[EvenQ@#,#,3#]&/@Range[0,99]  (* or *)
    Drop[Flatten@Transpose[{2#,6#+3}&@Range[0,Quotient[#,2]]],-Boole@EvenQ@#]&@(10^2)
  • PARI
    a(n) = n*(2-(-1)^n); \\ Michel Marcus, Sep 13 2021
  • Sage
    (x*(3+2*x+3*x^2)/(1-x^2)^2).series(x,65).coefficients(x,sparse=False) # Stefano Spezia, Aug 30 2021
    

Formula

G.f.: x*(3 + 2*x + 3*x^2)/(1 - x^2)^2.
E.g.f.: x*(3*cosh(x) + sinh(x)).
Dirichlet g.f.: 2^(-s) * (3*2^s - 4) * zeta(s-1) = (3 - 4/2^s) * zeta(s-1) = (3 - 1/2^(s-2)) * zeta(s-1).
a(n) = n*(2-(-1)^n) = 3*n / (2+(-1)^n).
a(n) = 3*n if n odd, a(n) = n if n even, implies a(a(2n)) = 2n, a(a(2n+1)) = 9*a(2n+1).
a(n) = 3*b(n), if n odd and a(n) = b(n)/3, if n even, with b(n) = A165998(n).
a(n) = a(a(2k*n)/(2k)) = a((2k+1)*n) / (2k+1), since a(2*k*n) / (2*k) = n.
a(n) = 4*n - A165998(n).
a(n+1) = a(n) + A086970(n+1)*(-1)^n.
a(n) = 2*A014682(n) - A000035(n).
a(n) = n*A010684(n). - Michel Marcus, Sep 13 2021
For positive integers k and n, a(n) = A(n,1) = n * (A(n,k)/n)^(1/k), where the k-th nesting composition A(n,k) = a(a(...a(a(n))...)) = n * ( a(n) / n )^k, and d.g.f. of A(n,k) = (2^(1-s) + (1-2^(1-s))*3^k) * zeta(s-1). - Federico Provvedi, Sep 18 2021
a(n+1) = A165998(n)*(1 + 1/n). - Federico Provvedi, Sep 19 2021
Showing 1-8 of 8 results.