login

Revision History for A014112

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
a(n) = n*(n-1) + (n-2)*(n-3) + ... + 1*0 + 1 for n odd; otherwise, a(n) = n*(n-1) + (n-2)*(n-3) + ... + 2*1.
(history; published version)
#58 by Michael De Vlieger at Tue Apr 11 08:42:13 EDT 2023
STATUS

reviewed

approved

#57 by Michel Marcus at Tue Apr 11 01:17:21 EDT 2023
STATUS

proposed

reviewed

#56 by Delbert L. Johnson at Mon Apr 10 21:55:54 EDT 2023
STATUS

editing

proposed

#55 by Delbert L. Johnson at Mon Apr 10 21:55:49 EDT 2023
LINKS

Delbert L. Johnson, <a href="/A014112/b014112.txt">Table of n, a(n) for n = 1..20000</a>

STATUS

approved

editing

#54 by Michael De Vlieger at Thu Mar 23 19:51:28 EDT 2023
STATUS

reviewed

approved

#53 by Kevin Ryde at Thu Mar 23 18:56:04 EDT 2023
STATUS

proposed

reviewed

#52 by Jon E. Schoenfield at Wed Mar 22 22:16:13 EDT 2023
STATUS

editing

proposed

#51 by Jon E. Schoenfield at Wed Mar 22 22:16:10 EDT 2023
FORMULA

a(n) = a(n-2) + n*(n-1) for n > 2, a(1)=1, a(2)=2.

G.f.: x*(1 - x^3 + 3*x^2 - x)/((x + 1)*(x - 1)^4). [- Maksym Voznyy (voznyy(AT)mail.ru), Aug 10 2009]

EXAMPLE

From Bruno Berselli, Mar 12 2018: (Start)

- Bruno Berselli, Mar 12 2018

(End)

STATUS

proposed

editing

#50 by Delbert L. Johnson at Tue Mar 21 19:14:56 EDT 2023
STATUS

editing

proposed

#49 by Delbert L. Johnson at Tue Mar 21 11:00:22 EDT 2023
PROG

(C#) public BigInteger a(BigInteger n) => (n * (n + 2) * (2 * n - 1) + (n.IsEven ? 0 : 9)) / 12; // Delbert L. Johnson, Mar 19 2023

Discussion
Tue Mar 21
11:01
Delbert L. Johnson: Thanks, I should have caught that. Tested and updated.

I've written a little over 2,000 of these sequences so far in C#.