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

A225606 Number of distinct lines passing through 3 or more points in an n X n grid.

Original entry on oeis.org

0, 0, 0, 8, 14, 32, 58, 108, 174, 296, 406, 628, 898, 1216, 1582, 2188, 2754, 3528, 4398, 5524, 6778, 8336, 9778, 11812, 14038, 16456, 19066, 22540, 25954, 29968, 34270, 39116, 44282, 50312, 56026, 63196, 70798, 78984
Offset: 0

Views

Author

R. J. Mathar, Aug 06 2013

Keywords

Programs

  • Mathematica
    f[n_, k_] := Sum[x = kx/k; y = ky/k; If[IntegerQ[x] && IntegerQ[y] && CoprimeQ[x, y], (n - Abs[kx])(n - Abs[ky]), 0], {kx, -n + 1, n - 1}, {ky, -n + 1, n - 1}];
    a[n_] := (f[n, 2] - f[n, 3])/2;
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Oct 30 2018, after Seppo Mustonen in A018808 *)

Formula

a(n) = A018808(n) - A018809(n) = A018810(n) + A018811(n) + A018812(n) + A018813(n)+....

A178465 Expansion of -2*x^2*(-3-2*x+x^2-x^3-2*x^4+x^5) / ( (1+x)^2*(x-1)^4 ).

Original entry on oeis.org

0, 0, 6, 16, 36, 66, 114, 176, 264, 370, 510, 672, 876, 1106, 1386, 1696, 2064, 2466, 2934, 3440, 4020, 4642, 5346, 6096, 6936, 7826, 8814, 9856, 11004, 12210, 13530, 14912, 16416, 17986, 19686, 21456, 23364, 25346, 27474, 29680, 32040, 34482
Offset: 0

Views

Author

Sean A. Irvine, Mar 23 2011

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[ Series[ 2x^2 (3 + 2x - x^2 + x^3 + 2x^4 - x^5)/((1 + x)^2 (x - 1)^4), {x, 0, 42}], x] (* Robert G. Wilson v, Feb 17 2014 *)
  • Python
    def A178465(n): return n+(m:=n&1)+(n*(n**2-m)>>1) if n != 1 else 0 # Chai Wah Wu, Aug 30 2022

Formula

For n even, a(n) = n*(2+n^2)/2 = A061804(n/2). For n>1 and odd, a(n)=(n+1)*(n^2-n+2)/2 = 2*A212133((n+1)/2).
a(n) = (2-2*(-1)^n+(3+(-1)^n)*n+2*n^3)/4 for n>1. [Colin Barker, Feb 18 2013]

Extensions

Discrepancy with A018808 resolved. David W. Wilson, Aug 05 2013
First line of formulas corrected. R. J. Mathar, Aug 05 2013
Prepended a(0)=0, Joerg Arndt, Feb 19 2014

A187062 Expansion of 2*x^2 *(4 +7*x +5*x^2 -x^3 -4*x^4 +6*x^6 +4*x^7 -x^8 -2*x^9) / ((1+x)^2 *(1+x+x^2)^2 *(1-x)^4) .

Original entry on oeis.org

0, 0, 8, 14, 26, 42, 64, 90, 134, 172, 232, 300, 378, 464, 584, 690, 834, 990, 1160, 1342, 1574, 1784, 2048, 2328, 2626, 2940, 3320, 3670, 4090, 4530, 4992, 5474, 6038, 6564, 7176, 7812, 8474, 9160, 9944, 10682, 11522, 12390, 13288, 14214
Offset: 1

Views

Author

Sean A. Irvine, Mar 21 2011

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[ 2x^2 (4 + 7x + 5x^2 - x^3 - 4x^4 + 6x^6 + 4x^7 - x^8 - 2x^9)/((1 + x)^2 (1 + x + x^2)^2 (x - 1)^4), {x, 0, 43}], x]  (* or *) LinearRecurrence[ {0, 2, 2, -1, -4, -1, 2, 2, 0, -1}, {8, 14, 26, 42, 64, 90, 134, 172, 232, 300}, 42] (* Robert G. Wilson v, Feb 17 2014 *)

Formula

a(n) = 2*a(n-2) + 2*a(n-3) - a(n-4) - 4*a(n-5) - a(n-6) + 2*a(n-7) + 2*a(n-8) - a(n-10) .

Extensions

Name replaced by L. Edson Jeffery's definition. R. J. Mathar, Aug 06 2013
Showing 1-3 of 3 results.