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.

A130703 a(n) = smallest k such that A000217(n+1) = A000217(n) + (A000217(n) mod k), or 0 if no such k exists.

Original entry on oeis.org

0, 0, 0, 0, 9, 14, 10, 27, 35, 22, 18, 65, 77, 18, 26, 119, 27, 38, 34, 27, 209, 46, 28, 55, 299, 36, 35, 377, 45, 62, 58, 45, 527, 40, 54, 629, 95, 54, 74, 779, 63, 86, 82, 63, 989, 94, 54, 161, 235, 68, 91, 265, 81, 65, 106, 81, 145, 118, 90, 1769, 1829
Offset: 1

Views

Author

Rémi Eismann, Aug 16 2007 - Jan 10 2011

Keywords

Comments

a(n) is the weight of triangular numbers.
The decomposition of triangular numbers into weight * level + gap is A000217(n) = a(n) * A184219(n) + (n + 1) if a(n) > 0.

Examples

			For n = 1 we have A000217(n) = 1, A000217(n+1) = 3; there is no k such that 3 - 1 = 2 = (1 mod k), hence a(1) = 0.
For n = 5 we have A000217(n) = 15, A000217(n+1) = 21; 9 is the smallest k such that 21 - 15 = 6 = (15 mod k), hence a(5) = 9.
For n = 22 we have A000217(n) = 253, A000217(n+1) = 276; 46 is the smallest k such that 276 - 253 = 23 = (253 mod k), hence a(22) = 46.
		

Crossrefs

A184218 a(n) = largest k such that A000217(n+1) = A000217(n) + (A000217(n) mod k), or 0 if no such k exists.

Original entry on oeis.org

0, 0, 0, 0, 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
Offset: 1

Views

Author

Rémi Eismann, Jan 10 2011

Keywords

Comments

From the definition, a(n) = A000217(n) - (n + 1) if A000217(n) - (n + 1) > (n + 1), or 0 otherwise, where A000217 are the triangular numbers.

Examples

			For n = 3 we have A000217(3) = 6, A000217(4) = 10; there is no k such that 10 - 6 = 4 = (6 mod k), hence a(3) = 0.
For n = 5 we have A000217(5) = 15, A000217(6) = 21; 9 is the largest k such that 21 - 15 = 6 = (15 mod k), hence a(5) = 9; a(5) = A000217(5) - (5 + 1) = 15 - 6 = 9.
For n = 24 we have A000217(24) = 300, A000217(25) = 325; 275 is the largest k such that 325 - 300 = 25 = (300 mod k), hence a(24) = 275; a(24) = A000217(24) - (24 + 1) = 275.
		

Crossrefs

Cf. essentially the same as A000096, A000217, A000027, A130703, A184219, A118534, A117078, A117563, A001223.

Programs

  • Magma
    [0,0,0,0] cat [(n+1)*(n-2)/2: n in [5..60]]; // Vincenzo Librandi, Jun 22 2016
  • Mathematica
    Join[{0, 0, 0, 0}, LinearRecurrence[{3, -3, 1}, {9, 14, 20}, 100]] (* G. C. Greubel, Jun 22 2016 *)
    lim = 10^4; Table[SelectFirst[Reverse@ Range@ lim, Function[k, PolygonalNumber[n + 1] == # + Mod[#, k] &@ PolygonalNumber@ n]], {n, 53}] /. {k_ /; MissingQ@ k -> 0, k_ /; k == lim -> 0} (* Michael De Vlieger, Jun 30 2016, Version 10.4 *)

Formula

a(n) = (n+1)*(n-2)/2 = A000096(n-2) for n >= 5 and a(n) = 0 for n <= 4. - M. F. Hasler, Jan 10 2011
From Chai Wah Wu, Jun 21 2016: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 7.
G.f.: x^5*(5*x^2 - 13*x + 9)/(1 - x)^3. (End)
Showing 1-2 of 2 results.