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-10 of 12 results. Next

A133872 Period 4: repeat [1, 1, 0, 0].

Original entry on oeis.org

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

Views

Author

Hieronymus Fischer, Oct 10 2007

Keywords

Comments

Partial sums of A056594.
Let i=sqrt(-1) and S(n) = Sum_{k=0..n-1} exp(2*Pi*i*k^2/n) for n>=1 the famous Gauss sum. Then S(n) = (a(n)+a(n+1)*i)*sqrt(n). - Franz Vrabec, Nov 08 2007
a(A042948(n)) = 1; a(A042964(n)) = 0. - Reinhard Zumkeller, Oct 03 2008
a(n) is also the real part of partial sum of powers of the complex unit i. - Enrique Pérez Herrero, Aug 16 2009
Periodic sequences having a period of 2k and composed of k ones followed by k zeros have a closed formula of floor(((n+k) mod 2k)/k). Listed sequences of this form are: k=1..A000035(n+1), k=2..A133872(n), k=3..A088911, k=4..A131078(n), k=5..A112713(n-1). - Gary Detlefs, May 17 2011
0.repeat(0,0,1,1) is 1/5 in base 2, due to 1/5 = (3/16)/(1-1/16). For the general case see 1/A062158(n) in base n >= 2. Here n = 2. - Wolfdieter Lang, Jun 20 2014
a(n) (for n>=1) is the determinant of the n X n Toeplitz matrix M satisfying: M(i,j)=1 if -1<=j-i<=2 and 0 otherwise. - Dmitry Efimov, Jun 23 2015
a(n) (for n>=1) is the difference between numbers of even and odd permutations p of 1,2,...,n such that -1 <= p(i)-i <= 2 for i=1,2,...,n. - Dmitry Efimov, Jan 08 2016
The binomial transform is 1, 2, 3, 4, 6, 12,... (see A038504). - R. J. Mathar, Feb 25 2023

Examples

			G.f. = 1 + x + x^4 + x^5 + x^8 + x^9 + x^12 + x^13 + x^16 + x^17 + x^20 + ...
		

Crossrefs

Programs

Formula

a(n) = (1 + floor(n/2)) mod 2.
a(n) = A004526(A000035(n+2)).
a(n) = 1 + floor(n/2) - 2*floor((n+2)/4).
a(n) = (((n+2) mod 4) - (n mod 2))/2.
a(n) = ((n + 2 - (n mod 2))/2) mod 2.
a(n) = ((2*n + 3 + (-1)^n)/4) mod 2.
a(n) = (1 + (-1)^((2*n - 1 + (-1)^n)/4))/2.
a(n) = binomial(n+2, n) mod 2 = binomial(n+2, 2) mod 2.
a(n) = A000217(n+1) mod 2.
G.f.: (1+x)/(1-x^4) = 1/((1-x)(1+x^2)).
a(n) = 1/2 + (1/2)*cos(Pi*n/2) + (1/2)*sin(Pi*n/2). a(n) = A021913(n+2). - R. J. Mathar, Nov 15 2007
From Jaume Oliver Lafont, Dec 05 2008: (Start)
a(n) = 1/2 + sin((2n+1)Pi/4)/sqrt(2).
a(n) = 1/2 + cos((2n-1)Pi/4)/sqrt(2). (End)
a(n) = Re(Sum_{k=0..n} i^k), where i=sqrt(-1) and Re is the real part of a complex number. a(n) = (1/2)*((Sum_{k=0..n} i^k) + Sum_{k=0..n} i^-k) = Re((1/2)*(1 + i)*(1 - i^(n+1))). - Enrique Pérez Herrero, Aug 16 2009
a(n) = (1 + i^(n*(n-1)))/2, where i=sqrt(-1). - Bruno Berselli, May 18 2011
a(n) = (Sum_{k=1..n} k^j) mod 2, for any j. - Gary Detlefs, Dec 28 2011
a(n) = a(n-1) - a(n-2) + a(n-3) for n>2. - Jean-Christophe Hervé, May 01 2013
a(n) = 1 - floor(n/2) + 2*floor(n/4) = 1 - A004526(n) + A122461(n). - Wesley Ivan Hurt, Dec 06 2013
a(n) = (1 + (-1)^floor(n/2))/2. - Wesley Ivan Hurt, Apr 17 2014
a(n) = A054925(n+2) - A011848(n+2). - Wesley Ivan Hurt, Jun 09 2014
Euler transform of length 4 sequence [1, -1, 0, 1]. - Michael Somos, Sep 26 2014
a(n) = a(1-n) for all n in Z. - Michael Somos, Sep 26 2014
From Ilya Gutkovskiy, Jul 09 2016: (Start)
Inverse binomial transform of A038504(n+1).
E.g.f.: (exp(x) + sin(x) + cos(x))/2. (End)
a(n) = (1 + (-1)^(n*(n-1)/2))/2. - Guenther Schrack, Apr 04 2019

Extensions

Definition rewritten by N. J. A. Sloane, Apr 30 2009

A053698 a(n) = n^3 + n^2 + n + 1.

Original entry on oeis.org

1, 4, 15, 40, 85, 156, 259, 400, 585, 820, 1111, 1464, 1885, 2380, 2955, 3616, 4369, 5220, 6175, 7240, 8421, 9724, 11155, 12720, 14425, 16276, 18279, 20440, 22765, 25260, 27931, 30784, 33825, 37060, 40495, 44136, 47989, 52060, 56355, 60880
Offset: 0

Views

Author

Henry Bottomley, Mar 23 2000

Keywords

Comments

a(n) = 1111 in base n.
n^3 + n^2 + n + 1 = (n^2 + 1)*(n + 1), therefore a(n) is never prime. - Alonso del Arte, Apr 22 2014

Examples

			a(2) = 15 because 2^3 + 2^2 + 2 + 1 = 8 + 4 + 2 + 1 = 15.
a(3) = 40 because 3^3 + 3^2 + 3 + 1 = 27 + 9 + 3 + 1 = 40.
a(4) = 85 because 4^3 + 4^2 + 4 + 1 = 64 + 16 + 4 + 1 = 85.
From _Bruno Berselli_, Jan 02 2017: (Start)
The terms of the sequence are provided by the row sums of the following triangle (see the seventh formula in the previous section):
.   1;
.   3,   1;
.   9,   5,   1;
.  19,  13,   7,   1;
.  33,  25,  17,   9,   1;
.  51,  41,  31,  21,  11,   1;
.  73,  61,  49,  37,  25,  13,  1;
.  99,  85,  71,  57,  43,  29, 15,  1;
. 129, 113,  97,  81,  65,  49, 33, 17,  1;
. 163, 145, 127, 109,  91,  73, 55, 37, 19,  1;
. 201, 181, 161, 141, 121, 101, 81, 61, 41, 21, 1;
...
Columns from the first to the fifth, respectively: A058331, A001844, A056220 (after -1), A059993, A161532. Also, eighth column is A161549.
(End)
		

Crossrefs

Cf. A237627 (subset of semiprimes).
Cf. A056106 (first differences).

Programs

Formula

For n >= 2, a(n) = (n^4-1)/(n-1) = A024002(n)/A024000(n) = A002522(n)*(n+1) = A002061(n+1) + A000578(n).
G.f.: (1+5*x^2) / (1-x)^4. - Colin Barker, Jan 06 2012
a(n) = -A062158(-n). - Bruno Berselli, Jan 26 2016
a(n) = Sum_{i=0..n} 2*n*(n-i)+1. - Bruno Berselli, Jan 02 2017
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n > 3. - Colin Barker, Jan 02 2017
a(n) = A104878(n+3,n) = A055129(4,n) for n > 0. - Mathew Englander, Jan 06 2021
E.g.f.: exp(x)*(x^3+4*x^2+3*x+1). - Nikolaos Pantelidis, Feb 06 2023

A021913 Period 4: repeat [0, 0, 1, 1].

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Decimal expansion of 1/909.
Lexicographically earliest de Bruijn sequence for n = 2 and k = 2.
Except for first term, binary expansion of the decimal number 1/10 = 0.000110011001100110011... in base 2. - Benoit Cloitre, May 18 2002
Content of #2 binary placeholder when n is converted from decimal to binary. a(n) = n*(n-1)/2 mod 2. Example: a(7) = 1 since 7 in binary is 1 -1- 1 and (7*6/2) mod 2 = 1. - Anne M. Donovan (anned3005(AT)aol.com), Sep 15 2003
Expansion in any base b of 1/((b-1)*(b^2+1)) = 1/(b^3-b^2+b-1). E.g., 1/5 in base 2, 1/20 in base 3, 1/51 in base 4, etc. - Franklin T. Adams-Watters, Nov 07 2006
Except for first term, parity of the triangular numbers A000217. - Omar E. Pol, Jan 17 2012
Except for first term, more generally: 1) Parity of the k-polygonal numbers, if k is odd (Cf. A139600, A139601). 2) Parity of the generalized k-gonal numbers, for even k >= 6. - Omar E. Pol, Feb 05 2012
Except for first term, parity of Recamán's sequence A005132. - Omar E. Pol, Apr 13 2012
Inverse binomial transform of A000749(n+1). - Wesley Ivan Hurt, Dec 30 2015
Least significant bit of tribonacci numbers (A000073). - Andres Cicuttin, Apr 04 2016

Examples

			G.f. = x^2 + x^3 + x^6 + x^7 + x^10 + x^11 + x^14 + x^15 + x^18 + x^19 + ...;
1/909 = 0.001100110011001 ...
		

Crossrefs

Programs

Formula

From Paul Barry, Aug 30 2004: (Start)
G.f.: x^2*(1 + x)/(1 - x^4).
a(n) = 1/2 - cos(Pi*n/2)/2 - sin(Pi*n/2)/2.
a(n) = a(n-1) - a(n-2) + a(n-3) for n > 2. (End)
a(n+2) = Sum_{k=0..n} b(k), with b(k) = A056594(k) (partial sums of S(n,x) Chebyshev polynomials at x=0).
a(n) = -a(n-2) + 1, for n >= 2 with a(0) = a(1) = 0.
G.f.: x^2/((1 - x)*(1 + x^2)) = x^2/(1 - x + x^2 - x^3).
From Jaume Oliver Lafont, Dec 05 2008: (Start)
a(n) = 1/2 - sin((2n+1)*Pi/4)/sqrt(2).
a(n) = 1/2 - cos((2n-1)*Pi/4)/sqrt(2). (End)
a(n) = floor((n mod 4)/2). - Reinhard Zumkeller, Apr 15 2011
Euler transform of length 4 sequence [1, -1, 0, 1]. - Michael Somos, Feb 28 2014
a(1-n) = a(n) for all n in Z. - Michael Somos, Feb 28 2014
From Wesley Ivan Hurt, Jul 22 2016: (Start)
a(n) = a(n-4) for n > 3.
a(n) = A133872(n+2).
a(n) + a(n+1) = A007877(n). (End)
E.g.f.: (exp(x) - sin(x) - cos(x))/2. - Ilya Gutkovskiy, Jul 11 2016
a(n) = (1 - (-1)^(n*(n-1)/2))/2. - Guenther Schrack, Feb 28 2019

Extensions

Chebyshev comment from Wolfdieter Lang, Sep 10 2004

A360099 To get A(n,k), replace 0's in the binary expansion of n with (-1) and interpret the result in base k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

0, 0, 1, 0, 1, -1, 0, 1, 0, 1, 0, 1, 1, 2, -1, 0, 1, 2, 3, -1, 1, 0, 1, 3, 4, 1, 1, -1, 0, 1, 4, 5, 5, 3, 1, 1, 0, 1, 5, 6, 11, 7, 5, 3, -1, 0, 1, 6, 7, 19, 13, 11, 7, -2, 1, 0, 1, 7, 8, 29, 21, 19, 13, 1, 0, -1, 0, 1, 8, 9, 41, 31, 29, 21, 14, 3, 0, 1, 0, 1, 9, 10, 55, 43, 41, 31, 43, 16, 5, 2, -1
Offset: 0

Views

Author

Alois P. Heinz, Jan 25 2023

Keywords

Comments

The empty bit string is used as binary expansion of 0, so A(0,k) = 0.

Examples

			Square array A(n,k) begins:
   0,  0, 0,  0,  0,   0,   0,   0,   0,   0,   0, ...
   1,  1, 1,  1,  1,   1,   1,   1,   1,   1,   1, ...
  -1,  0, 1,  2,  3,   4,   5,   6,   7,   8,   9, ...
   1,  2, 3,  4,  5,   6,   7,   8,   9,  10,  11, ...
  -1, -1, 1,  5, 11,  19,  29,  41,  55,  71,  89, ...
   1,  1, 3,  7, 13,  21,  31,  43,  57,  73,  91, ...
  -1,  1, 5, 11, 19,  29,  41,  55,  71,  89, 109, ...
   1,  3, 7, 13, 21,  31,  43,  57,  73,  91, 111, ...
  -1, -2, 1, 14, 43,  94, 173, 286, 439, 638, 889, ...
   1,  0, 3, 16, 45,  96, 175, 288, 441, 640, 891, ...
  -1,  0, 5, 20, 51, 104, 185, 300, 455, 656, 909, ...
		

Crossrefs

Columns k=0-6, 10 give: A062157, A145037, A006257, A147991, A147992, A153777, A147993, A359925.
Rows n=0-10 give: A000004, A000012, A023443, A000027(k+1), A165900, A002061, A165900(k+1), A002061(k+1), A083074, A152618, A062158.
Main diagonal gives A360096.

Programs

  • Maple
    A:= proc(n, k) option remember; local m;
         `if`(n=0, 0, k*A(iquo(n, 2, 'm'), k)+2*m-1)
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);
    # second Maple program:
    A:= (n, k)-> (l-> add((2*l[i]-1)*k^(i-1), i=1..nops(l)))(Bits[Split](n)):
    seq(seq(A(n, d-n), n=0..d), d=0..12);

Formula

G.f. for column k satisfies g_k(x) = k*(x+1)*g_k(x^2) + x/(1+x).
A(n,k) = k*A(floor(n/2),k)+2*(n mod 2)-1 for n>0, A(0,k)=0.
A(n,k) mod 2 = A057427(n) if k is even.
A(n,k) mod 2 = A030300(n) if k is odd and n>=1.
A(2^(n+1),1) + n = 0.

A062160 Square array T(n,k) = (n^k - (-1)^k)/(n+1), n >= 0, k >= 0, read by falling antidiagonals.

Original entry on oeis.org

0, 1, 0, -1, 1, 0, 1, 0, 1, 0, -1, 1, 1, 1, 0, 1, 0, 3, 2, 1, 0, -1, 1, 5, 7, 3, 1, 0, 1, 0, 11, 20, 13, 4, 1, 0, -1, 1, 21, 61, 51, 21, 5, 1, 0, 1, 0, 43, 182, 205, 104, 31, 6, 1, 0, -1, 1, 85, 547, 819, 521, 185, 43, 7, 1, 0, 1, 0, 171, 1640, 3277, 2604, 1111, 300, 57, 8, 1, 0, -1, 1, 341, 4921, 13107, 13021, 6665, 2101, 455, 73, 9, 1, 0
Offset: 0

Views

Author

Henry Bottomley, Jun 08 2001

Keywords

Comments

For n >= 1, T(n, k) equals the number of walks of length k between any two distinct vertices of the complete graph K_(n+1). - Peter Bala, May 30 2024

Examples

			From _Seiichi Manyama_, Apr 12 2019: (Start)
Square array begins:
   0, 1, -1,  1,  -1,    1,    -1,      1, ...
   0, 1,  0,  1,   0,    1,     0,      1, ...
   0, 1,  1,  3,   5,   11,    21,     43, ...
   0, 1,  2,  7,  20,   61,   182,    547, ...
   0, 1,  3, 13,  51,  205,   819,   3277, ...
   0, 1,  4, 21, 104,  521,  2604,  13021, ...
   0, 1,  5, 31, 185, 1111,  6665,  39991, ...
   0, 1,  6, 43, 300, 2101, 14706, 102943, ... (End)
		

Crossrefs

Related to repunits in negative bases (cf. A055129 for positive bases).
Main diagonal gives A081216.
Cf. A109502.

Programs

  • Maple
    seq(print(seq((n^k - (-1)^k)/(n+1), k = 0..10)), n = 0..10); # Peter Bala, May 31 2024
  • Mathematica
    T[n_,k_]:=(n^k - (-1)^k)/(n+1); Join[{0},Table[Reverse[Table[T[n-k,k],{k,0,n}]],{n,12}]]//Flatten (* Stefano Spezia, Feb 20 2024 *)

Formula

T(n, k) = n^(k-1) - n^(k-2) + n^(k-3) - ... + (-1)^(k-1) = n^(k-1) - T(n, k-1) = n*T(n, k-1) - (-1)^k = (n - 1)*T(n, k-1) + n*T(n, k-2) = round[n^k/(n+1)] for n > 1.
T(n, k) = (-1)^(k+1) * resultant( n*x + 1, (x^k-1)/(x-1) ). - Max Alekseyev, Sep 28 2021
G.f. of row n: x/((1+x) * (1-n*x)). - Seiichi Manyama, Apr 12 2019
E.g.f. of row n: (exp(n*x) - exp(-x))/(n+1). - Stefano Spezia, Feb 20 2024
From Peter Bala, May 31 2024: (Start)
Binomial transform of the m-th row: Sum_{k = 0..n} binomial(n, k)*T(m, k) = (m + 1)^(n-1) for n >= 1.
Let R(m, x) denote the g.f. of the m-th row of the square array. Then R(m_1, x) o R(m_2, x) = R(m_1 + m_2 + m_1*m_2, x), where o denotes the black diamond product of power series as defined by Dukes and White. Cf. A109502.
T(m_1 + m_2 + m_1*m_2, k) = Sum_{i = 0..k} Sum_{j = i..k} binomial(k, i)* binomial(k-i, j-i)*T(m_1, j)*T(m_2, k-i). (End)

A067347 Square array read by antidiagonals: T(n,k)=(T(n,k-1)*n^2-Catalan(k-1)*n)/(n-1) with a(n,0)=1 and a(1,k)=Catalan(k) where Catalan(k)=C(2k,k)/(k+1)=A000108(k).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 2, 1, 0, 5, 6, 3, 1, 0, 14, 20, 12, 4, 1, 0, 42, 70, 51, 20, 5, 1, 0, 132, 252, 222, 104, 30, 6, 1, 0, 429, 924, 978, 548, 185, 42, 7, 1, 0, 1430, 3432, 4338, 2904, 1150, 300, 56, 8, 1, 0, 4862, 12870, 19323, 15432, 7170, 2154, 455, 72, 9, 1, 0, 16796
Offset: 0

Views

Author

Henry Bottomley, Jan 16 2002

Keywords

Examples

			Array begins
1 0 0 0 0 0 0 0 ... k=0
1 1 2 5 14 42 132 429 ... k=1
1 2 6 20 70 252 924 3432 ... k=2
1 3 12 51 222 978 4338 19323 ... k=3
		

Crossrefs

Formula

T(n, k) =A067345(n, k)*n =A067346(n, k)*n/(n-1)

A062159 a(n) = n^5 - n^4 + n^3 - n^2 + n - 1.

Original entry on oeis.org

-1, 0, 21, 182, 819, 2604, 6665, 14706, 29127, 53144, 90909, 147630, 229691, 344772, 501969, 711914, 986895, 1340976, 1790117, 2352294, 3047619, 3898460, 4929561, 6168162, 7644119, 9390024, 11441325, 13836446, 16616907, 19827444, 23516129, 27734490, 32537631, 37984352, 44137269
Offset: 0

Views

Author

Henry Bottomley, Jun 08 2001

Keywords

Comments

Number of walks of length 6 between any two distinct nodes of the complete graph K_{n+1} (n>=1). - Emeric Deutsch, Apr 01 2004
For odd n, a(n) * (n+1) / 2 + 1 also represents the first integer in a sum of n^6 consecutive integers that equals n^12. - Patrick J. McNab, Dec 26 2016

Examples

			a(4) = 4^5 - 4^4 + 4^3 - 4^2 + 4 - 1 = 1024 - 256 + 64 - 16 + 4 - 1 = 819.
		

Crossrefs

Programs

Formula

a(n) = round(n^6/(n+1)) for n>2 = A062160(n,6).
G.f.: (76x^3 + 6x^2 + 27x^4 + 6x^5 + 6x - 1)/(1-x)^6 (for the signed sequence). - Emeric Deutsch, Apr 01 2004
a(n) = (n^6 - 1)/(n+1). a(n) = (n-1)(n^2 - n + 1)(n^2 + n + 1) = (n-1)*A002061(n)*A002061(n+1). - Alexander Adamchuk, Apr 12 2006
a(0)=-1, a(1)=0, a(2)=21, a(3)=182, a(4)=819, a(5)=2604, a(n) = 6*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6). - Harvey P. Dale, Dec 20 2015
E.g.f.: exp(x)*(x^5 + 9*x^4 + 20*x^3 + 10*x^2 + x - 1). - Stefano Spezia, Apr 22 2023

Extensions

More terms from Emeric Deutsch, Apr 01 2004

A268086 Decimal expansion of Sum_{k>0} 1/(k*((k+1)^2+1)).

Original entry on oeis.org

2, 9, 7, 5, 9, 5, 9, 6, 9, 0, 2, 7, 7, 1, 4, 3, 3, 1, 8, 7, 2, 1, 6, 9, 8, 8, 9, 0, 2, 7, 1, 5, 6, 3, 3, 1, 5, 3, 6, 3, 8, 3, 0, 2, 0, 6, 4, 9, 8, 2, 4, 2, 7, 8, 2, 3, 1, 8, 4, 7, 2, 3, 7, 3, 0, 6, 8, 0, 9, 2, 9, 6, 8, 0, 9, 3, 1, 7, 6, 5, 1, 2, 8, 8, 4, 2, 6, 1, 1, 0, 5, 1, 3, 9, 0, 2, 4, 6, 4, 7
Offset: 0

Views

Author

Bruno Berselli, Jan 26 2016

Keywords

Comments

Also, decimal expansion of Integral_{x=0..1} (2 - (1-i)*x^(1-i) - (1+i)*x^(1+i))/(4 - 4*x) dx, where i is the imaginary unit.

Examples

			.297595969027714331872169889027156331536383020649824278231847237306809...
		

Crossrefs

Cf. A062158: numbers of the form k*((k+1)^2+1), with k>-2.
Cf. A268046: (1+i)*(H(1-i)-i*H(1+i))/4.

Programs

  • Maple
    ((1-I)*(harmonic(1-I) + I*harmonic(1+I)))/4:
    Re(evalf(%, 106)); # Peter Luschny, Jan 27 2016
  • Mathematica
    (1 - I)*(HarmonicNumber[1 - I] + I*HarmonicNumber[1 + I])/4 // Re // RealDigits[#, 10, 100]& // First (* Jean-François Alcover, Jan 26 2016 *)
  • Sage
    # Warning: Floating point calculation. Adjust precision as needed
    # and use some guard digits!
    from mpmath import mp, chop, psi, coth, pi
    mp.dps = 108; mp.pretty = True
    chop((psi(0,I-1)-psi(0,1)-I+1)/2-pi*(I+1)*coth(pi)/4) # Peter Luschny, Jan 27 2016

Formula

Equals (1 - i)*(H(1-i) + i*H(1+i))/4, where H(z) is a harmonic number with complex argument.
Equals (Psi(i-1)-Psi(1)-i+1)/2 - Pi*(i+1)*coth(Pi)/4, where Psi(x) is the digamma function. - Peter Luschny, Jan 27 2016

A242604 a(n) = (n - 1)*(n^3 + 1) = n^4 - n^3 + n - 1, for n >= 1.

Original entry on oeis.org

0, 9, 56, 195, 504, 1085, 2064, 3591, 5840, 9009, 13320, 19019, 26376, 35685, 47264, 61455, 78624, 99161, 123480, 152019, 185240, 223629, 267696, 317975, 375024, 439425, 511784, 592731, 682920, 783029, 893760, 1015839, 1150016, 1297065
Offset: 1

Views

Author

Wolfdieter Lang, Jun 20 2014

Keywords

Comments

1/a(n), for n >= 2, is in base n represented by 0.repeat(0,0,0,1,1,1). This is instance p = 3 of the general formula for 0.repeat(0^(q),1^(q)) (meaning here q zeros followed by q 1's) in base b >= 2 which is 1/a(q,b) with a(q,b) = (b - 1)*(b^p + 1), for p >= 1.

Crossrefs

Cf. A005563 (case q=1), A062158 (case q=2).

Programs

Formula

a(n) = (n - 1)*(n^3 + 1) = n^4 - n^3 + n - 1, n >= 1.
O.g.f.: x^2*(9 + 11*x + 5*x^2 - x^3)/(1 - x)^5.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5). - Wesley Ivan Hurt, Jul 23 2025

A071233 a(n) = 2*(n-1)*(n^2 + 1).

Original entry on oeis.org

0, 10, 40, 102, 208, 370, 600, 910, 1312, 1818, 2440, 3190, 4080, 5122, 6328, 7710, 9280, 11050, 13032, 15238, 17680, 20370, 23320, 26542, 30048, 33850, 37960, 42390, 47152, 52258, 57720, 63550, 69760, 76362, 83368, 90790, 98640, 106930, 115672, 124878, 134560
Offset: 1

Views

Author

N. J. A. Sloane, Jun 11 2002

Keywords

Comments

For n > 1, a(n) is the sum of the numbers appearing along the outside border of an n X n square array whose elements are the numbers from 1..n^2, listed in increasing order by rows. - Wesley Ivan Hurt, May 13 2021

Examples

			From _Wesley Ivan Hurt_, May 13 2021: (Start)
Given the 4 X 4 square array below,
  [  1   2   3   4 ]
  [  5   6   7   8 ]
  [  9  10  11  12 ]
  [ 13  14  15  16 ]
the sum of the elements along the outside border is 1+2+3+4+8+12+16+15+14+13+9+5 = 102. Thus a(4) = 102. (End)
		

References

  • T. A. Gulliver, Sequences from Arrays of Integers, Int. Math. Journal, Vol. 1, No. 4, pp. 323-332, 2002.

Crossrefs

Programs

  • Magma
    [2*(n-1)*(n^2+1): n in [1..50]]; // Vincenzo Librandi, Jun 14 2011
    
  • Mathematica
    Table[2(n-1)(n^2+1),{n,50}] (* or *) LinearRecurrence[{4,-6,4,-1},{0,10,40,102},50] (* Harvey P. Dale, Jun 27 2021 *)
  • SageMath
    def A071233(n): return 2*(n-1)*(n^2+1)
    [A071233(n) for n in range(1,51)] # G. C. Greubel, Aug 05 2024

Formula

a(n) = 2*A062158(n).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
G.f.: 2*x*(5+x^2)/(1 - x)^4 - Harvey P. Dale, Jun 27 2021
E.g.f.: 2*exp(x)*x*(5 + 5*x + x^2). - Stefano Spezia, Apr 22 2023
a(n) = (n-1)*A005893(n). - G. C. Greubel, Aug 05 2024
Showing 1-10 of 12 results. Next