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

A175631 a(n) = (n-th pentagonal number) modulo (n-th triangular number).

Original entry on oeis.org

0, 2, 0, 2, 5, 9, 14, 20, 27, 35, 44, 54, 65, 77, 90, 104, 119, 135, 152, 170, 189, 209, 230, 252, 275, 299, 324, 350, 377, 405, 434, 464, 495, 527, 560, 594, 629, 665, 702, 740, 779, 819, 860, 902, 945, 989, 1034, 1080, 1127, 1175, 1224, 1274, 1325, 1377, 1430
Offset: 1

Views

Author

Zak Seidov, Jul 29 2010

Keywords

Examples

			a(1)=0 because (1(3-1)/2) mod (1(1+1)/2) = 1 mod 1 = 0,
a(2)=2 because (2(6-1)/2) mod (2(2+1)/2) = 5 mod 3 = 2.
		

Crossrefs

Cf. A000096 (n(n+3)/2), A000217 (triangular numbers), A000326 (pentagonal numbers), A175630 (n-th pentagonal number mod (n+2)).

Programs

  • Magma
    [n lt 4 select 1+(-1)^n else n*(n-3)/2: n in [1..60]]; // G. C. Greubel, Jan 30 2022
    
  • Mathematica
    Table[Mod[n(3n-1)/2, n(n+1)/2],{n,100}]
    Module[{nn=60},Mod[#[[1]],#[[2]]]&/@Thread[{PolygonalNumber[ 5,Range[ nn]],Accumulate[ Range[nn]]}]] (* Harvey P. Dale, Nov 19 2022 *)
  • Sage
    def A175631(n): return 1+(-1)^n if (n<4) else 9*binomial(n/3, 2)
    [A175631(n) for n in (1..60)] # G. C. Greubel, Jan 30 2022

Formula

For n>=3, a(n) = A000096(n-2).
From Chai Wah Wu, Oct 12 2018: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 5.
G.f.: x^2*(2 - 6*x + 8*x^2 - 3*x^3)/(1 - x)^3. (End)
E.g.f.: (x/2)*(2 + 3*x - (2 - x)*exp(x)). - G. C. Greubel, Jan 30 2022
Showing 1-1 of 1 results.