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.

A206824 Number of solutions (n,k) of s(k) = s(n) (mod n), where 1 <= k < n and s(k) = k(k+1)/2.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 1, 2, 1, 4, 1, 1, 3, 2, 3, 2, 1, 2, 3, 2, 1, 4, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1, 4, 1, 2, 3, 1, 3, 4, 1, 2, 3, 4, 1, 2, 1, 2, 3, 2, 3, 4, 1, 2, 1, 2, 1, 4, 3, 2, 3, 2, 1, 4, 3, 2, 3, 2, 3, 2, 1, 2, 3, 2
Offset: 2

Views

Author

Clark Kimberling, Feb 12 2012

Keywords

Comments

Records at indices {(1), 2, 6, 15, 30, 105, 210, 1155, 2310, 15015, 30030, ...}. - Michael De Vlieger, Sep 22 2017

Examples

			s(6) = 21, and 6 divides exactly two of the numbers 21 - s(k) = {20, 18, 15, 11, 6} for k = 1, 2, ..., 5, so that a(6) = 2.
		

Crossrefs

Programs

  • Mathematica
    s[k_] := k (k + 1)/2;
    f[n_, k_] := If[Mod[s[n] - s[k], n] == 0, 1, 0];
    t[n_] := Flatten[Table[f[n, k], {k, 1, n - 1}]]
    a[n_] := Count[Flatten[t[n]], 1]
    Table[a[n], {n, 2, 120}]   (* A206824 *)
    (* Second program: *)
    Table[Total@ Flatten@ Table[Boole@ Divisible[Subtract @@ Thread[PolygonalNumber[{n, k}]], n ], {k, n - 1}], {n, 2, 105}] (* Michael De Vlieger, Sep 22 2017 *)

Formula

From Michael De Vlieger, Sep 22 2017: (Start)
Conjectures:
a(p^e) = 1, with e > 0.
a(A002110(n)) = 2^(n - 1) and a(A002110(n)/2) = 2^(n - 1) - 1 for n > 0.
a(n) = 2^(A001221(n) - 1) for n even, a(n) = 2^A001221(n) - 1 for n odd. (End)