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.

A205138 Least k such that n divides s(k)-s(j) for some j satisfying 1<=j where s(j)=j(3j-1)/2, the j-th pentagonal number.

This page as a plain text file.
%I A205138 #9 Apr 09 2015 14:21:29
%S A205138 2,2,4,2,4,5,3,6,10,4,3,7,5,8,5,6,4,10,7,8,4,8,5,7,6,13,28,9,6,5,11,
%T A205138 22,9,5,7,10,13,18,6,8,8,11,15,15,13,6,9,7,13,6,13,15,10,29,10,9,8,7,
%U A205138 11,15
%N A205138 Least k such that n divides s(k)-s(j) for some j satisfying 1<=j<k, where s(j)=j(3j-1)/2, the j-th pentagonal number.
%C A205138 See A204892 for a discussion and guide to related sequences.
%t A205138 s[n_] := s[n] = n (3 n - 1)/2; z1 = 500; z2 = 60;
%t A205138 Table[s[n], {n, 1, 30}]   (* A000326, pentagonal *)
%t A205138 u[m_] := u[m] = Flatten[Table[s[k] - s[j], {k, 2, z1}, {j, 1, k - 1}]][[m]]
%t A205138 Table[u[m], {m, 1, z1}]    (* A205136 *)
%t A205138 v[n_, h_] := v[n, h] = If[IntegerQ[u[h]/n], h, 0]
%t A205138 w[n_] := w[n] = Table[v[n, h], {h, 1, z1}]
%t A205138 d[n_] := d[n] = First[Delete[w[n], Position[w[n], 0]]]
%t A205138 Table[d[n], {n, 1, z2}]    (* A205137 *)
%t A205138 k[n_] := k[n] = Floor[(3 + Sqrt[8 d[n] - 1])/2]
%t A205138 m[n_] := m[n] = Floor[(-1 + Sqrt[8 n - 7])/2]
%t A205138 j[n_] := j[n] = d[n] - m[d[n]] (m[d[n]] + 1)/2
%t A205138 Table[k[n], {n, 1, z2}]        (* A205138 *)
%t A205138 Table[j[n], {n, 1, z2}]        (* A205139 *)
%t A205138 Table[s[k[n]], {n, 1, z2}]     (* A205140 *)
%t A205138 Table[s[j[n]], {n, 1, z2}]     (* A205141 *)
%t A205138 Table[s[k[n]] - s[j[n]], {n, 1, z2}]      (* A205142 *)
%t A205138 Table[(s[k[n]] - s[j[n]])/n, {n, 1, z2}]  (* A205143 *)
%Y A205138 Cf. A000326, A204892, A205143.
%K A205138 nonn
%O A205138 1,1
%A A205138 _Clark Kimberling_, Jan 25 2012