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.

A111273 a(n) is the smallest divisor of triangular number T(n) := n(n+1)/2 not already in the sequence.

Original entry on oeis.org

1, 3, 2, 5, 15, 7, 4, 6, 9, 11, 22, 13, 91, 21, 8, 17, 51, 19, 10, 14, 33, 23, 12, 20, 25, 27, 18, 29, 87, 31, 16, 24, 187, 35, 30, 37, 703, 39, 26, 41, 123, 43, 86, 45, 69, 47, 94, 28, 49, 75, 34, 53, 159, 55, 44, 38, 57, 59, 118, 61, 1891, 63, 32, 40, 65, 67, 134, 46, 105
Offset: 1

Views

Author

N. J. A. Sloane, Nov 03 2005

Keywords

Comments

A permutation of the natural numbers. Proof: Let k be the smallest number that does not appear. Let n_0 be such that by term n_0 every number < k has appeared. Let m be smallest multiple of k > n_0. Then T(2m) is divisible by k and so a(2m) = k, a contradiction.
Known cycles are: (1), (2, 3), (4, 5, 15, 8, 6, 7), (9), (16, 17, 51, 34, 35, 30, 31), (25) and {28, 29, 87, 58, 59, 118, 119, 68, 46, 47, 94, 95, 48} and the additional fixed-points 49, 57, 65, 81, 85, 93, 121, 133, 153, 169, 185, 201, 209, 217, 225, 253, 261, 289, 297, ... - John W. Layman, Nov 09 2005
The trajectory of 10 begins {10, 11, 22, 23, 12, 13, 91, 161, 189, 285, 429, 473, 869, 957, 1437, 2157, 3237, 4857, 7287, 4164, 3470, 4511, 2256, 1464, 1172, 782, 783, 392, 294, 413, 531, 342, 343, 172, 173, 519, 346, 347, 694, 1735, 1388, 926, 927, 464, 248, 166, 167, 84, 70, 71, 36, 37, 703, 352, 353, 1059, 706, 2471, 1412, 1413, 2121, 7427, 6366, 6367, 3184, 1820, 1214, 1215, 608, 336, 337, 4381, 28483, ...) and cannot be further determined without calculating at least the first 28483 terms of {a(n)}. - John W. Layman, Nov 09 2005
Conjecture: For all odd primes p, a(p-1) = p. Equivalently, it appears that if an initial 0 is appended (the smallest divisor of 0, the zeroth triangular number), then the fixed points in this include the odd primes. - Enrique Navarrete, Jul 24 2019 [Wording of the equivalent property corrected by Peter Munn, Jul 27 2019]
From Peter Munn, Jul 27 2019: (Start)
The above conjecture is true.
For odd k, k appears by term k. Proof: choose m such that k-1 <= m <= k and T(m) is odd. k is a divisor of T(m) and (by induction) all smaller odd divisors have occurred earlier, so a(m) = k if k has not occurred earlier.
For even k, k appears by term 2k-1, as k divides T(2k-1) and by induction all smaller divisors have occurred earlier.
For odd prime p, the first triangular number p divides is T(p-1) = p*(p-1)/2. But (p-1)/2 and any smaller divisors have occurred by term (p-1)-1, so a(p-1) = p.
(End)
For a generalization of the construction, see A309200. - N. J. A. Sloane, Jul 25 2019
Regarding iteration cycles, for length 2 there are many additional ones after the mentioned (2,3): (50, 75), (122, 183), (174, 203), (194, 291), (338, 507), etc.; for length 3: (1734, 4335, 2312), (4804, 6005, 8407), (7494, 18735, 9992), (8994, 10493, 13491), (12548, 18822, 21959), etc.; for length 4: (84326, 126489, 149487, 91992), (94138, 98417, 135761, 141207), (255206, 382809, 638015, 364580), (345928, 487444, 609305, 680063), (384350, 422785, 499655, 399724), etc. The trajectories of 10 and other families (14, 40, 60, 72, 78, 88, 96, etc.) are best thought of as being continuations of sequences arriving from infinity: ..., 451160, 300774, 300775, 186140, 124094, 124095, 62048, 31304, 25044, 20870, 20871, 13914, 13915, 10934, 10935, 7290, 7291, 14582, 14583, 9722, 9723, 6482, 6483, 4322, 4323, 2882, 4061, 12183, 9138, 9139, 11882, 17823, 8912, 6684, 5570, 5571, 2786, 4179, 2090, 2091, 1394, 1395, 698, 1047, 524, 350, 351, 176, 132, 114, 115, 145, 365, 915, 458, 459, 414, 415, 208, 152, 102, 103, 52, 53, 159, 80, 54, 55, 44, 45, 69, 105, 265, 371, 186, 341, 589, 1121, 1947, 1298, 1299, 866, 867, 578, 579, 290, 435, 218, 219, 146, 147, 74, 111, 56, 38, 39, 26, 27, 18, 19, 10, 11, 22, 23, 12, 13, 91, 161, 189, 285, 429, 473, 869, 957, 1437, 2157, 3237, 4857, 7287, 4164, 3470, 4511, 2256, 1464, 1172, 782, 783, 392, 294, 413, 531, 342, 343, 172, 173, 519, 346, 347, 694, 1735, 1388, 926, 927, 464, 248, 166, 167, 84, 70, 71, 36, 37, 703, 352, 353, 1059, 706, 2471, 1412, 1413, 2121, 7427, 6366, 6367, 3184, 1820, 1214, 1215, 608, 336, 337, 4381, 28483, 49847, 28484, 35605, 89015, 74180, 74181, 101041, 210061, 8297449, ... - Hans Havermann, Jul 26 2019

Crossrefs

Cf. A000217, A111267, A113658 (inverse), A113659 (fixed points), A113702 (trajectory of 10), A309200, A309202, A309203.
For smallest missing numbers see A309195, A309196, A309197.
Indices of squares: A309199.

Programs

  • Maple
    S:= {}:
    for n from 1 to 1000 do
      A111273[n]:= min(numtheory:-divisors(n*(n+1)/2) minus S);
      S:= S union {A111273[n]};
    od:
    seq(A111273[n],n=1..1000); # Robert Israel, Jan 16 2019
  • Mathematica
    a[n_] := a[n] = Do[If[FreeQ[Array[a, n-1], d], Return[d]], {d, Divisors[n (n+1)/2]}]; Array[a, 100] (* Jean-François Alcover, Mar 22 2019 *)
  • PARI
    {m=69; v=Set([]); for(n=1,m,d=divisors(n*(n+1)/2); j=1; while(setsearch(v,d[j])>0,j++); a=d[j]; v=setunion(v,Set(a)); print1(a,","))} \\ Klaus Brockhaus, Nov 03 2005
    
  • Sage
    def A111273list(upto):
        A = []
        for n in (1..upto):
            D = divisors((n*(n+1)/2))
            A.append(next(d for d in D if d not in A))
        return A
    print(A111273list(69)) # Peter Luschny, Jul 26 2019

Extensions

More terms from Klaus Brockhaus, Nov 03 2005