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.

A215175 a(2*n) = A214297(n), a(2*n+1) = A000290(n).

Original entry on oeis.org

-1, 0, 0, 1, -3, 4, 2, 9, 3, 16, 6, 25, 5, 36, 12, 49, 15, 64, 20, 81, 21, 100, 30, 121, 35, 144, 42, 169, 45, 196, 56, 225, 63, 256, 72, 289, 77, 324, 90, 361, 99, 400, 110, 441, 117, 484, 132, 529, 143, 576, 156, 625, 165, 676, 182, 729
Offset: 0

Views

Author

Paul Curtz, Aug 05 2012

Keywords

Comments

From Balmer series.
a(n) and differences a(n+1) - a(n):
-1, 0, 0, 1, -3, 4, 2, 9, 3, 16, 6, 25, ...
1, 0, 1, -4, 7, -2, 7, -6, 13, -10, 19, -20, ... = b(n).
b(2*n) = 1, 1, 7, 7, 13, 19, 31, 37, 49, 61, 79, ... = c(n) + 1.
c(n) = 0, 0, 6, 6, 12, 18, 30, 36, 48, 60, 78, ... = A005563(n-1) - A214297(n) = 6*A001971(n).
a(n+3) - a(n) = 2, -3, 4, 1, 12, -1, 14, -3, 22, -11, 30, -13, 44, ... = e(n).
e(2*n+1) = -3, 1, -1, -3, -11, -13, -21, -29, -43, -51, -65, -79, ... of signature (2,-1,0,1,-2,1).
Differ. = 4, -2, -2, -8, -2, -8, -8, -14, -8, -14, -14, -20, -14, ... . The different numbers appear four times.
Differ. = -6, 0, -6, 6, -6, 0, -6, 6, -6, 0, -6, 6, -6, ... . Of period 4. Like c(n+2) - 2*c(n+1) - c(n).
Note that a(2*n) + a(2*n+1) = -1, 1, 1, 11, 19, 31, 41, 61, ... increases after the last 1 despite 6 is before 5.

Programs

  • Mathematica
    Table[If[EvenQ@ n, (2 #^2 - 11 - 9 (-1)^# + 6 ((-1)^((2 # + 1 - (-1)^#)/4) + (-1)^((2 # - 1 + (-1)^#)/4)))/8 &[n/2], ((n - 1)/2)^2], {n, 0, 55}] (* or *)
    CoefficientList[Series[(1 - x^3 + 4 x^4 - 2 x^5 - 8 x^6 - 2 x^7 + 3 x^8 - 2 x^9 - x^11 - 2 x^2)/((x^2 + 1) (x^4 + 1) (x - 1)^3*(1 + x)^3), {x, 0, 69}], x] (* Michael De Vlieger, Mar 24 2017 *)

Formula

G.f. ( 1-x^3+4*x^4-2*x^5-8*x^6-2*x^7+3*x^8-2*x^9-x^11-2*x^2 ) / ( (x^2+1)*(x^4+1)*(x-1)^3*(1+x)^3 ). - R. J. Mathar, Aug 07 2012
a(n) = 2*a(n-2) - a(n-4) + a(n-8) - 2*a(n-10) + a(n-12). - R. J. Mathar, Aug 07 2012
From Luce ETIENNE, Mar 14 2017: (Start)
a(n) = ((5*n^2-8*n-18-(3*n^2-8*n+26)*(-1)^n-18*((-1)^((2*n-1+(-1)^n)/4)+(-1)^((2*n+1-(-1)^n)/4)))+12*(1+(-1)^n+(-1)^((2*n+1-(-1)^n)/4)+(-1)^((2*n-1+(-1)^n)/4))*(-1)^floor(n/4))/32.
a(n) = (5*n^2-8*n-18-(3*n^2-8*n+26)*cos(n*Pi)-36*cos(n*Pi/2)+12*(1+cos(n*Pi)+2*cos(n*Pi/2))*(cos((2*n-1+(-1)^n)*Pi/8)+sin((2*n-1+(-1)^n)*Pi)/8))/32. (End)

A289296 a(n) = (n - 1)*(2*floor(n/2) + 1).

Original entry on oeis.org

-1, 0, 3, 6, 15, 20, 35, 42, 63, 72, 99, 110, 143, 156, 195, 210, 255, 272, 323, 342, 399, 420, 483, 506, 575, 600, 675, 702, 783, 812, 899, 930, 1023, 1056, 1155, 1190, 1295, 1332, 1443, 1482, 1599, 1640, 1763, 1806, 1935, 1980, 2115, 2162, 2303, 2352, 2499, 2550, 2703, 2756, 2915
Offset: 0

Views

Author

Keywords

Comments

Summing a(n) by pairs, one gets -1, 9, 35, 77, 135, ... = A033566.
A198442(k) is a member of this sequence if k == 0 or 1 (mod 4). - Bruno Berselli, Jul 04 2017

Crossrefs

Subsequence of A214297.

Programs

  • Mathematica
    Table[(n - 1) (2 Floor[n/2] + 1), {n, 0, 60}] (* or *) LinearRecurrence[{1, 2, -2, -1, 1}, {-1, 0, 3, 6, 15}, 61]
  • PARI
    a(n)=(n\2*2+1)*(n-1) \\ Charles R Greathouse IV, Jul 02 2017
    
  • PARI
    Vec(-(1 - x - 5*x^2 - x^3 - 2*x^4) / ((1 - x)^3*(1 + x)^2) + O(x^60)) \\ Colin Barker, Jul 02 2017
    
  • Python
    def A289296(n): return (n-1)*(n|1) # Chai Wah Wu, Jan 18 2023

Formula

a(n) = A023443(n) * A109613(n).
a(n) = n^2-1 if n is even and n^2-n if n is odd.
n^2 - a(n) = A093178(n).
From Colin Barker, Jul 02 2017: (Start)
G.f.: -(1 - x - 5*x^2 - x^3 - 2*x^4) / ((1 - x)^3*(1 + x)^2).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>4. (End)

A247829 a(3*k) = k*(k+1), a(3*k+1) = (2*k-1)*(2*k+1), a(3*k+2) = (2*k-1)*(2*k+3).

Original entry on oeis.org

0, -1, -3, 2, 3, 5, 6, 15, 21, 12, 35, 45, 20, 63, 77, 30, 99, 117, 42, 143, 165, 56, 195, 221, 72, 255, 285, 90, 323, 357, 110, 399, 437, 132, 483, 525, 156, 575, 621, 182, 675, 725, 210, 783, 837, 240, 899, 957, 272, 1023, 1085, 306, 1155, 1221, 342, 1295
Offset: 0

Views

Author

Paul Curtz, Dec 01 2014

Keywords

Comments

A permutation of A061037(n) = -1, -3, 0, 5, 3, 21, 2, 45, 15, 77, 6, ... and of A214297(n) = -1, 0, -3, 2, 3, 6, 5, 12, ... .
Among consequences: b(n) = 4*a(n) + (sequence of period 3:repeat 1, 4, 16) = 1, 0, 4, 9, 16, 36, 25, 64, 100, ... , is a permutation of the squares of the nonnegative integers A000290(n).
And a(n)/b(n) = 0/1, -1/0, -3/4, 2/9, 3/16, 5/36, ... is a permutation of the Balmer series A061037(n)/A061038(n) = -1/0, -3/4, 0/1, 5/36, 3/16, ... .
a(5n) is divisible by 5.

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(x*(3*x^7-3*x^6-14*x^4-6*x^3-2*x^2+3*x+1)/((x-1)^3*(x^2 +x+1)^3))); // G. C. Greubel, Sep 20 2018
  • Maple
    seq(op([k*(k+1),(2*k-1)*(2*k+1),(2*k-1)*(2*k+3)]), k=0..100); # Robert Israel, Dec 01 2014
  • Mathematica
    Table[Sequence @@ {n*(n+1), (2*n-1)*(2*n+1), (2*n-1)*(2*n+3)}, {n, 0, 18}] (* Jean-François Alcover, Dec 16 2014 *)
  • PARI
    concat(0, Vec(x*(3*x^7-3*x^6-14*x^4-6*x^3-2*x^2+3*x+1)/((x-1)^3*(x^2+x+1)^3) + O(x^100))) \\ Colin Barker, Dec 02 2014
    

Formula

a(n) = 3*a(n-3) - 3*a(n-6) + a(n-9).
a(3*k) + a(3*k+1) + a(3*k+2) = 9*k^2 + 5*k - 4.
G.f.: x*(3*x^7 - 3*x^6 - 14*x^4 - 6*x^3 - 2*x^2 + 3*x + 1)/((x-1)^3*(x^2 +x+1)^3). - Robert Israel, Dec 01 2014
a(n) = -(n^2 + n + floor(n/3)*(27*floor(n/3)^3 - 18*(n+1)*floor(n/3)^2 + (3*n^2 + 21*n - 14)*floor(n/3) - (5*n^2 - n + 5)))/2. - Luce ETIENNE, Mar 13 2017
From Amiram Eldar, Oct 08 2023: (Start)
Sum_{n>=1} 1/a(n) = 1/2.
Sum_{n>=1} (-1)^n/a(n) = Pi/4 + 1 - 2*log(2). (End)

A214630 a(n) is the reduced numerator of 1/4 - 1/A109043(n)^2 = (1 - 1/A026741(n)^2)/4.

Original entry on oeis.org

-1, 0, 0, 2, 3, 6, 2, 12, 15, 20, 6, 30, 35, 42, 12, 56, 63, 72, 20, 90, 99, 110, 30, 132, 143, 156, 42, 182, 195, 210, 56, 240, 255, 272, 72, 306, 323, 342, 90, 380, 399, 420, 110, 462, 483, 506, 132, 552, 575, 600, 156
Offset: 0

Views

Author

Paul Curtz, Jul 23 2012

Keywords

Comments

The unreduced fractions are -1/0, 0/4, 0/1, 8/36, 3/16, 24/100, 2/9, 48/196, 15/64, 80/324, 6/25, ... = c(n)/A061038(n), say.
Note that c(n)=A061037(n) + (period of length 2: repeat 0, 3).
c(n) is a permutation of A198442(n). The corresponding ranks are (the 0's have been swapped for convenience) 0,2,1,6,4,10,... = A145979(n-2).
Define the following sequences, satisfying the recurrence a(n) = 2*a(n-4) - a(n-8),
e(n) = -1, 0, 0, 2, 1, 4, 1, 6, 3, 8, 2, 10, 5, ... (after -1, a permutation of A004526(n) or mix A026741(n-1), 2*n),
f(n) = 1, 2, 1, 4, 3, 6, 2, 8, 5, 10, 3, 12, 7, ..., (another permutation of A004526(n+2) or mix A026741(n+1), 2*n+2).
f(n) - e(n) = periodic of period length 4: repeat 2, 2, 1, 2.
e(n) + f(n) = 0, 2, 1, 6, 4, 10, ... = A145979(n-2).
Then c(n) = e(n)*f(n).
Note that A061038(n) - 4*c(n) = periodic of period length 4: repeat 4, 4, 1, 4.
After division (by period 2: repeat 1, 4, A010685(n)), the reduced fractions of c(n) are -1/0, 0/1 ?, 0/4 ?, 2/9, 3/16, 6/25, 2/9, 12/49, 15/64, 20/81, 6/25, ... = a(n)/b(n).
Note that a(1+4*n) + a(2+4*n) + a(3+4*n) = 2,20,56,... = A002378(1+3*n) = A194767(3*n).
A061037(n-2) - a(n-2) = 0, -3, 0, -3, 0, 3, 0, 15, 0, 33, 0, 57, ... = Fip(n-2).
Fip(n-2)/3 = 0,-1,0,-1,0,1,0,5,0,11,0,19,0,29, .... Without 0's: A165900(n) (a Fibonacci polynomial); also -A110331(n+1) (Pell numbers).
g(n) = -1, 0, 0, 1, 1, 2, 1, 3, 3, 4, ... = mix A026741(n-1), n.
h(n) = 1, 1, 1, 2, 3, 3, 2, 4, 5, 5, ... = mix A026741(n+1), n+1.
h(n) - g(n) = (period 2: repeat 2, 1, 1, 1 = A177704(n-1)).
k(n) = 1, 1, 0, 2, 3, 3, 1, 4, 5, 5, ... = mix A174239(n), n+1.
l(n) = -1, 0, 1, 1, 1, 2, 2, 3, 3, 4, ... .
k(n) - l(n) = period 4: repeat 2, 1, -1, 1.
2) By the second formula in the definition, we take first 1 - 1/A026741(n)^2.
Hence, using a convention for the first fraction, -1/0, 0/1, 0/1, 8/9, 3/4, 24/25, 8/9, 48/49, 15/16, 80/81, 24/25, ... = (A005563(n-1) - A033996(n))/A168077(n) = q(n)/A168077(n).
For a(n), we divide by 4.
Note that A214297 is the reduced numerator of 1/4 - 1/A061038(n).
Note also that A168077(n) = A026741(n)^2.

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((2*x^9+3*x^8+6*x^7+2*x^6+6*x^5+6*x^4+2*x^3-1)/((1-x)^3*(x+1)^3*(x^2+1)^3))); // G. C. Greubel, Sep 20 2018
  • Mathematica
    CoefficientList[Series[(2*x^9+3*x^8+6*x^7+2*x^6+6*x^5+6*x^4+2*x^3-1)/((1-x)^3*(x+1)^3*(x^2+1)^3), {x, 0, 50}], x] (* G. C. Greubel, Sep 20 2018 *)
    LinearRecurrence[{0,0,0,3,0,0,0,-3,0,0,0,1},{-1,0,0,2,3,6,2,12,15,20,6,30},60] (* Harvey P. Dale, Jul 01 2019 *)
  • PARI
    Vec(-(2*x^9+3*x^8+6*x^7+2*x^6+6*x^5+6*x^4+2*x^3-1)/((x-1)^3*(x+ 1)^3*(x^2+1)^3) + O(x^100)) \\ Colin Barker, Jan 22 2015
    

Formula

a(4*n) = 4*n^2-1 = (2*n-1)*(2*n+1), a(2*n+1) = a(4*n+2) = n(n+1).
a(n)= A198442(n)/(period of length 4: repeat 1,1,4,1=A010121(n+2)).
a(n) = 3*a(n-4) - 3*a(n-8) + a(n-12). Is this the shortest possible recurrence? See A214297.
a(n+2) - a(n-2) = 0, 2, 4, 6, 2, 10, 12, 14, 4, ... = 2*A214392(n). a(-2)=a(-1)=0=a(1)=a(2).
a(n+4) - a(n-4) = 0, 4, 2, 12, 16, 20, 6, 28, 32, 36,... = 2*A188167(n). a(-4)=3=a(4), a(-3)=2=a(3).
a(n) = g(n) * h(n).
a(n) = k(n) * l(n).
G.f.: -(2*x^9+3*x^8+6*x^7+2*x^6+6*x^5+6*x^4+2*x^3-1) / ((x-1)^3*(x+1)^3*(x^2+1)^3). - Colin Barker, Jan 22 2015
From Luce ETIENNE, Apr 08 2017: (Start)
a(n) = (13*n^2-28-3*(n^2+4)*(-1)^n+3*(n^2-4)*((-1)^((2*n-1+(-1)^n)/4)+(-1)^((2*n+1-(-1)^n)/4)))/64.
a(n) = (13*n^2-28-3*(n^2+4)*cos(n*Pi)+6*(n^2-4)*cos(n*Pi/2))/64. (End)

Extensions

Edited by N. J. A. Sloane, Aug 04 2012

A215415 a(2*n) = n, a(4*n+1) = 2*n-1, a(4*n+3) = 2*n+3.

Original entry on oeis.org

0, -1, 1, 3, 2, 1, 3, 5, 4, 3, 5, 7, 6, 5, 7, 9, 8, 7, 9, 11, 10, 9, 11, 13, 12, 11, 13, 15, 14, 13, 15, 17, 16, 15, 17, 19, 18, 17, 19, 21, 20, 19, 21, 23, 22, 21, 23, 25, 24, 23, 25, 27, 26, 25, 27, 29, 28, 27, 29, 31, 30, 29, 31, 33, 32, 31, 33, 35, 34, 33, 35, 37
Offset: 0

Views

Author

Paul Curtz, Aug 09 2012

Keywords

Comments

a(n) and higher order differences in further rows:
0, -1, 1, 3, 2, 1,
-1, 2, 2, -1, -1, -2, A134430(n).
3, 0, -3, 0, 3, 0,
-3, -3, 3, 3, -3, -3,
0, 6, 0, -6, 0, 6,
6, -6, -6, 6, 6, -6.
a(n) is the binomial transform of 0, -1, 3, -3, 0, 6, -12, 12, 0, -24, 48, -48, 0, 96..., essentially negated A134813.
By definition, all differences a(n+k)-a(n) are periodic sequences with period length 4. For k=1, 3 and 4 these are A134430, A021307 and A007395, for example.

Crossrefs

Quadrisections: A005843, A060747, A005408, A144396.

Programs

  • Mathematica
    Flatten[Table[{2n, 2n - 1, 2n + 1, 2n + 3}, {n, 0, 19}]] (* Alonso del Arte, Aug 09 2012 *)
  • PARI
    a(n) = ((-3*I)*((-I)^n-I^n)+2*n)/4 \\ Colin Barker, Oct 19 2015
    
  • PARI
    concat(0, Vec(-x*(1-3*x+x^2)/((x^2+1)*(x-1)^2) + O(x^100))) \\ Colin Barker, Oct 19 2015

Formula

a(2*n) = n, a(2*n+1) = A097062(n+1).
a(n) = (A214297(n+1) - A214297(n-1))/2.
a(3*n) =3*A004525(n).
a(n) = +2*a(n-1) -2*a(n-2) +2*a(n-3) -a(n-4).
G.f. -x*(1-3*x+x^2) / ( (x^2+1)*(x-1)^2 ). - R. J. Mathar, Aug 11 2012
a(n) = ((-3*I)*((-I)^n-I^n)+2*n)/4. - Colin Barker, Oct 19 2015

A226279 a(4n) = a(4n+2) = 2*n , a(4n+1) = a(4n+3) = 2*n-1.

Original entry on oeis.org

0, -1, 0, -1, 2, 1, 2, 1, 4, 3, 4, 3, 6, 5, 6, 5, 8, 7, 8, 7, 10, 9, 10, 9, 12, 11, 12, 11, 14, 13, 14, 13, 16, 15, 16, 15, 18, 17, 18, 17, 20, 19, 20, 19, 22, 21, 22, 21, 24, 23, 24, 23, 26, 25, 26, 25, 28, 27, 28, 27, 30, 29, 30, 29
Offset: 0

Views

Author

Paul Curtz, Jun 02 2013

Keywords

Comments

a(n)=c(n) in A214297(n).
In A214297 d(n)=-1,1,1,3,1,3,3,... = mix (-A186422(2n) , A186422(2n+1)).
A214297 is the (reduced) numerator of 1/4 - 1/A061038(n).
(i.e. (1/4 -(1/0, 1/4, 1, 1/36, 1/16,...)) = -1/0, 0/1, -3/4, 2/9, 3/16,... )
1/0 is a convention.
n^2=(a(n+1)+d(n+1))^2 are the denominators.

Crossrefs

Programs

Formula

a(0) = a(2)=0, a(1)=a(3)=-1, a(4)=2.
a(n) = a(n-4) + 2, n > 3.
a(n) = a(n-1) + a(n-4) - a(n-5), n > 4.
A214297(n) = a(n+1) * d(n+1).
G.f.: x*(3*x^3-x^2+x-1) / ((x-1)^2*(x+1)*(x^2+1)). - Colin Barker, Sep 22 2013

A226379 a(5n) = 2*n*(2*n+1), a(5n+1) = (2*n-3)*(2*n+5), a(5n+2) = (2*n-1)*(2*n+3), a(5n+3) = (2*n+2)*(2*n+1), a(5n+4) = (2*n+1)*(2*n+3).

Original entry on oeis.org

0, -15, -3, 2, 3, 6, -7, 5, 12, 15, 20, 9, 21, 30, 35, 42, 33, 45, 56, 63, 72, 65, 77, 90, 99, 110, 105, 117, 132, 143, 156, 153, 165, 182, 195, 210, 209, 221, 240, 255, 272, 273, 285, 306, 323, 342, 345, 357, 380, 399, 420, 425, 437
Offset: 0

Views

Author

Paul Curtz, Jun 05 2013

Keywords

Comments

The sequence is the fifth row of the following array:
0, 6, 20, 42, 72, 110, 156, 210, 272, ... A002943
0, 3, 6, 15, 20, 35, 42, 63, 72, ... bisections A002943, A000466
0, 2, 3, 6, 12, 15, 20, 30, 35, ... A226023 (trisections A002943, A000466, A002439)
0, -3, 2, 3, 6, 5, 12, 15, 20, ... A214297 (quadrisections A078371)
0, -15, -3, 2, 3, 6, -7, 5, 12, ... a(n)
0, -63, -15, -3, 2, 3, 6, -55, -7, ...
The principle of construction is that (i) the lower left triangular portion has constant values down the diagonals (6, 3, 2, -3, -15, ...), defined from row 4 on by the negated values of A024036. (ii) The extension along the rows is defined by maintaining bisections, trisections, quadrisections etc of the form (2*n+x)*(2*n+y) with some constants x and y. In the fifth line this needs the quintisections shown in the NAME.
Each row in the array has the subsequences of the previous row plus another subsequence of the format (2*n+1)*(2*n+y) shuffled in; the first A002943, the second also A000466, the third also A002439, the fourth also A078371, and the fifth (2*n+3)*(2*n-5).
Only the first three rows are monotonically increasing everywhere.
a(n) is divisible by A226203(n).
Numerators of: 0, -15/4, -3/4, 2/9, 3/16, 6/25, -7/36, 5/36, 12/49, 15/64, 20/81, ... = a(n)/A226096(n). A permutation of A225948(n+1)/A226008(n+1).
Is the sequence increasing monotonically from 221 on?

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 60); [0] cat Coefficients(R!( -x*(15-12*x-5*x^2-x^3-3*x^4-17*x^5+12*x^6+3*x^7-x^8+x^9)/((1-x^5)^2*(1-x)) )); // G. C. Greubel, Mar 23 2024
    
  • Mathematica
    CoefficientList[Series[x*(15 - 12*x - 5*x^2 - x^3 - 3*x^4 - 17*x^5 + 12*x^6 + 3*x^7 - x^8 + x^9)/((x^4 + x^3 + x^2 + x + 1)^2*(x - 1)^3), {x, 0, 80}], x] (* Wesley Ivan Hurt, Oct 03 2017 *)
  • SageMath
    def A226379_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( -x*(15-12*x-5*x^2-x^3-3*x^4-17*x^5+12*x^6+3*x^7-x^8+x^9)/((1-x^5)^2*(1-x)) ).list()
    A226379_list(50) # G. C. Greubel, Mar 23 2024

Formula

4*a(n) = A226096(n) - period 5: repeat [1, 64, 16, 1, 4].
G.f.: x*(15-12*x-5*x^2-x^3-3*x^4-17*x^5+12*x^6+3*x^7-x^8+x^9) / ( (x^4+x^3+x^2+x+1)^2 *(x-1)^3 ). - R. J. Mathar, Jun 13 2013
a(n) = a(n-1)+2*a(n-5)-2*a(n-6)-a(n-10)+a(n-11) for n > 10. - Wesley Ivan Hurt, Oct 03 2017

A289870 a(n) = n*(n + 1) for n odd, otherwise a(n) = (n - 1)*(n + 1).

Original entry on oeis.org

-1, 2, 3, 12, 15, 30, 35, 56, 63, 90, 99, 132, 143, 182, 195, 240, 255, 306, 323, 380, 399, 462, 483, 552, 575, 650, 675, 756, 783, 870, 899, 992, 1023, 1122, 1155, 1260, 1295, 1406, 1443, 1560, 1599, 1722, 1763, 1892, 1935, 2070, 2115, 2256, 2303, 2450, 2499
Offset: 0

Views

Author

Keywords

Comments

a(n) is a fifth-order linear recurrence whose main interest is that it is related to (at least) eight other sequences (see the formula section).

Crossrefs

After -1, subsequence of A035106, A198442 and A214297.

Programs

  • Mathematica
    a[n_] := (n + 1)(n - 1 + Mod[n, 2]); Table[a[n], {n, 0, 50}]
  • PARI
    a(n)=if(n%2, n, n-1)*(n+1) \\ Charles R Greathouse IV, Jul 14 2017

Formula

a(n) = (n + 1)*(n - 1 + (n mod 2)).
a(n) = n * A109613(n-1) for n>0.
a(n) = -A114285(n) * A109613(n).
a(n) = A002378(n) - A193356(n).
a(n) = A289296(-n).
a(n) = n^2 - (-1)^n * A093178(n).
a(2*k) = A000466(k).
G.f.: (1-3*x-3*x^2-3*x^3)/((-1+x)^3*(1+x)^2).
Showing 1-8 of 8 results.