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

A105374 a(n) = 4*n^3 + 4*n.

Original entry on oeis.org

0, 8, 40, 120, 272, 520, 888, 1400, 2080, 2952, 4040, 5368, 6960, 8840, 11032, 13560, 16448, 19720, 23400, 27512, 32080, 37128, 42680, 48760, 55392, 62600, 70408, 78840, 87920, 97672, 108120, 119288, 131200, 143880, 157352, 171640, 186768, 202760, 219640, 237432
Offset: 0

Views

Author

Henry Bottomley, Apr 02 2005

Keywords

Comments

For n > 1, the number of straight lines with n points in a 4-dimensional hypercube with n points on each edge is 4*n^3 + 12*n^2 + 16*n + 8, i.e., A105374(n+1).

Examples

			a(5) = 4*5^3 + 4*5 = 500 + 20 = 520.
		

Crossrefs

Essentially row or column of A102728 and A105374.

Programs

  • Magma
    I:=[0, 8, 40, 120]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..45]]; // Vincenzo Librandi, Jun 26 2012
    
  • Mathematica
    CoefficientList[Series[8*x*(1+x+x^2)/(1-x)^4,{x,0,40}],x] (* or *) LinearRecurrence[{4,-6,4,-1},{0,8,40,120},50] (* Vincenzo Librandi, Jun 26 2012 *)
  • PARI
    a(n)=4*n^3+4*n \\ Charles R Greathouse IV, Oct 16 2015

Formula

a(n) = A002522(n)*A008586(n).
G.f.: 8*x*(1 + x + x^2)/(1-x)^4. - Colin Barker, May 24 2012
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Vincenzo Librandi, Jun 26 2012
a(n) = 8*A006003(n). - Bruce J. Nicholson, Apr 18 2017
From Elmo R. Oliveira, Aug 07 2025: (Start)
E.g.f.: 4*x*(1 + x)*(2 + x)*exp(x).
a(n) = 4*A034262(n). (End)

A105373 Square array by antidiagonals of number of straight lines with n points in a k-dimensional hypercube with n points on each edge.

Original entry on oeis.org

1, 1, 1, 1, 6, 1, 1, 28, 8, 1, 1, 120, 49, 10, 1, 1, 496, 272, 76, 12, 1, 1, 2016, 1441, 520, 109, 14, 1, 1, 8128, 7448, 3376, 888, 148, 16, 1, 1, 32640, 37969, 21280, 6841, 1400, 193, 18, 1, 1, 130816, 192032, 131776, 51012, 12496, 2080, 244, 20, 1, 1, 523776
Offset: 1

Views

Author

Henry Bottomley, Apr 02 2005

Keywords

Examples

			Rows start:
  1,  1,   1,   1,    1,     1, ...;
  1,  6,  28, 120,  496,  2016, ...;
  1,  8,  49, 272, 1441,  7448, ...;
  1, 10,  76, 520, 3376, 21280, ...;
  1, 12, 109, 888, 6841, 51012, ...;
  etc.
T(5,3)=109 because in a 5 X 5 X 5 cube there are 25 columns, 25 linear rows in one direction, 25 linear rows in another direction, 5 short diagonals in each of 6 directions and 4 long diagonals; and 3*25 + 6*5 + 4 = 109.
		

Crossrefs

See A102728. Rows essentially include A000012, A006516, A005059, A016149 or A081199, A016161 or A081200, A016170 or A081201, A016178 or A081202 etc. Columns essentially include A000012, A005843, A056107, A105373.

Formula

T(1, k)=1. For n>1: T(n, k) = ((n+2)^k-n^k)/2 = (n+2)*T(n, k-1)+n^(k-1) = A102728(k, n+1).
Showing 1-2 of 2 results.