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

A334238 Rows n in A334184 that are not unimodal.

Original entry on oeis.org

57, 63, 171, 258, 266, 294, 301, 329, 342, 343, 354, 361, 377, 378, 379, 381, 387, 399, 423, 437, 441, 462, 463, 469, 474, 481, 483, 489, 506, 513, 529, 567, 603, 621, 642, 643, 689, 798, 817, 889, 903, 931, 978, 1026, 1083, 1141, 1143, 1161, 1169, 1197, 1204
Offset: 1

Views

Author

Keywords

Comments

Consider the mappings k -> (k - (k/p)), across primes p | k. a(n) = rank levels of antichains in the poset resulting from taking distinct terms generated by the mapping and preserving the order of their generation.
We deem a series of rank levels, such as those of n = 15, i.e., row 15 of A334184 = [1, 2, 3, 2, 1, 1], as unimodal, as the terms increase to a point, then decrease.
Early terms may suggest that 2^i +/- 1 appear often in a(n). Given 10000 terms, the only such instances are {63, 513, 2047, 16383} for i = {6, 9, 11, 14}.
a(n) for 1 <= n <= 710 are bimodal. Are there rows n > 710 in A334184 that increase and decrease more than twice?

Examples

			Example: n = 57 is the smallest number for which rank levels of antichains is not unimodal, under the poset formed from distinct terms resulting from the mapping f(n) := n -> n - n/p across primes p | n.
    Hasse diagram     Row 57 of A334184
    -------------     -----------------
        57            1
        | \
        |  \
        54  38        2
        | \/  \
        | /\   \
        36  27  19    3
        | \ |  /
        |  \| /
       24   18        2
       /|  /|
      / | / |
    16  12  9         3
     | /|  /
     |/ |_/
     8  6             2
     | /|
     |/ |
     4  3             2
     | /
     |/
     2                1
     |
     |
     1                1
		

Crossrefs

Cf. A334184.

Programs

  • Mathematica
    Select[Range[2, 600], Function[k, Which[IntegerQ@ Log2@ k, False, And[PrimeQ@ k, IntegerQ@ Log2[k - 1]], False, True, ! AllTrue[Drop[#,  FirstPosition[#, _?(# < 0 &)][[1]] - 1 ], # <= 0 &] &@ Sign@ Differences@ Map[Length@ Union@ # &, Transpose@ If[k == 1, {{1}}, NestWhile[If[Length[#] == 0, Map[{k, #} &, # - # /FactorInteger[#][[All, 1]] ], Union[Join @@  Map[Function[{w, n}, Map[Append[w, If[n == 0, 0, n - n/#]] &, FactorInteger[n][[All, 1]] ]] @@ {#, Last@ #} &, #]] ] &, k, If[ListQ[#], AllTrue[#, Last[#] > 1 &], # > 1] &]]]]]]

A333123 Consider the mapping k -> (k - (k/p)), where p is any of k's prime factors. a(n) is the number of different possible paths from n to 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 3, 3, 5, 5, 1, 1, 5, 5, 3, 10, 5, 5, 4, 3, 7, 5, 9, 9, 12, 12, 1, 17, 2, 21, 9, 9, 14, 16, 4, 4, 28, 28, 9, 21, 14, 14, 5, 28, 7, 7, 12, 12, 14, 16, 14, 28, 23, 23, 21, 21, 33, 42, 1, 33, 47, 47, 3, 61, 56, 56, 14, 14, 23, 28, 28, 103, 42, 42, 5
Offset: 1

Views

Author

Ali Sada and Robert G. Wilson v, Mar 09 2020

Keywords

Comments

The iteration always terminates at 1, regardless of the prime factor chosen at each step.
Although there may exist multiple paths to 1, their path lengths (A064097) are the same! See A064097 for a proof. Note that this behavior does not hold if we allow any divisor of k.
First occurrence of k or 0 if no such value exists: 1, 6, 12, 24, 14, 96, 26, 85, 28, 21, 578, 30, 194, 38, 164, 39, 33, 104, 1538, 112, 35, 328, 58, 166, ..., .
Records: 1, 2, 3, 5, 10, 12, 17, 21, 28, 33, 42, 47, 61, 103, 168, ..., .
Record indices: 1, 6, 12, 14, 21, 30, 33, 35, 42, 62, 63, 66, 69, ..., .
When viewed as a graded poset, the paths of the said graph are the chains of the corresponding poset. This poset is also a lattice (see Ewan Delanoy's answer to Peter Kagey's question at the Mathematics Stack Exchange link). - Antti Karttunen, May 09 2020

Examples

			a(1): {1}, therefore a(1) = 1;
a(6): {6, 4, 2, 1} or {6, 3, 2, 1}, therefore a(6) = 2;
a(12): {12, 8, 4, 2, 1}, {12, 6, 4, 2, 1} or {12, 6, 3, 2, 1}, therefore a(12) = 3;
a(14): {14, 12, 8, 4, 2, 1}, {14, 12, 6, 4, 2, 1}, {14, 12, 6, 3, 2, 1}, {14, 7, 6, 4, 2, 1} or {14, 7, 6, 3, 2, 1}, therefore a(14) = 5.
From _Antti Karttunen_, Apr 05 2020: (Start)
For n=15 we have five alternative paths from 15 to 1: {15, 10, 5, 4, 2, 1}, {15, 10, 8, 4, 2, 1}, {15, 12, 8, 4, 2, 1},  {15, 12, 6, 4, 2, 1},  {15, 12, 6, 3, 2, 1}, therefore a(15) = 5. These form a graph illustrated below:
        15
       / \
      /   \
    10     12
    / \   / \
   /   \ /   \
  5     8     6
   \_   |  __/|
     \__|_/   |
        4     3
         \   /
          \ /
           2
           |
           1
(End)
		

Crossrefs

Cf. A064097, A332809 (size of the lattice), A332810.
Cf. A332904 (sum of distinct integers present in such a graph/lattice), A333000 (sum over all paths), A333001, A333785.
Cf. A332992 (max. outdegree), A332999 (max. indegree), A334144 (max. rank level).
Cf. A334230, A334231 (meet and join).
Partial sums of A332903.
Cf. also tables A334111, A334184.

Programs

  • Mathematica
    a[n_] := Sum[a[n - n/p], {p, First@# & /@ FactorInteger@n}]; a[1] = 1; (* after PARI coding by Rémy Sigrist *) Array[a, 70]
    (* view the various paths *)
    f[n_] := Block[{i, j, k, p, q, mtx = {{n}}}, Label[start]; If[mtx[[1, -1]] != 1, j = Length@ mtx;  While[j > 0, k = mtx[[j, -1]]; p = First@# & /@ FactorInteger@k; q = k - k/# & /@ p; pl = Length@p; If[pl > 1, Do[mtx = Insert[mtx, mtx[[j]], j], {pl - 1}]]; i = 1;  While[i < 1 + pl, mtx[[j + i - 1]] = Join[mtx[[j + i - 1]], {q[[i]]}]; i++]; j--]; Goto[start], mtx]]
  • PARI
    for (n=1, #a=vector(80), print1 (a[n]=if (n==1, 1, vecsum(apply(p -> a[n-n/p], factor(n)[,1]~)))", ")) \\ Rémy Sigrist, Mar 11 2020

Formula

a(n) = 1 iff n is a power of two (A000079) or a Fermat Prime (A019434).
a(p) = a(p-1) if p is prime.
a(n) = Sum_{p prime and dividing n} a(n - n/p) for any n > 1. - Rémy Sigrist, Mar 11 2020

A334144 Consider the mapping k -> (k - (k/p)), where prime p | k. a(n) = maximum distinct terms at any position j among the various paths to 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 3, 1, 1, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 1, 4, 2, 4, 3, 3, 3, 3, 2, 2, 4, 4, 3, 4, 3, 3, 2, 4, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 1, 5, 5, 5, 2, 5, 5, 5, 3, 3, 3, 4, 3, 6, 4, 4, 2, 3, 2, 2, 4, 3, 4, 4, 3, 3, 5, 5, 3, 5, 3, 5, 2, 2, 4, 6, 3, 3, 3, 3, 3, 6, 3
Offset: 1

Views

Author

Keywords

Comments

Let i = A064097(n) be the common path length and let 1 <= j <= i. Given a path P, we find for any j relatively few distinct values. Regarding a common path length i, see A333123 comment 2, and proof at A064097.
Maximum term in row n of A334184.

Examples

			For n=15, the paths are shown vertically at left, and the graph obtained appears at right:
  15   15   15   15   15  =>         15
   |    |    |    |    |            _/ \_
   |    |    |    |    |           /     \
  10   10   12   12   12  =>     10       12
   |    |    |    |    |         | \_   _/ |
   |    |    |    |    |         |   \ /   |
   5    8    6    6    8  =>     5    8    6
   |    |    |    |    |          \_  |  _/|
   |    |    |    |    |            \_|_/  |
   4    4    3    4    4  =>          4    3
   |    |    |    |    |              |  _/
   |    |    |    |    |              |_/
   2    2    2    2    2  =>          2
   |    |    |    |    |              |
   |    |    |    |    |              |
   1    1    1    1    1  =>          1
Because the maximum number of distinct terms in any row is 3, a(15) = 3.
		

Crossrefs

Programs

  • Mathematica
    Max[Length@ Union@ # & /@ Transpose@ #] & /@ Nest[Function[{a, n}, Append[a, Join @@ Table[Flatten@ Prepend[#, n] & /@ a[[n - n/p]], {p, FactorInteger[n][[All, 1]]}]]] @@ {#, Length@ # + 1} &, {{{1}}}, 105]
    (* Second program: *)
    g[n_] := Block[{lst = {{n}}}, While[lst[[-1]] != {1}, lst = Join[lst, {Union@ Flatten[# - #/(First@ # & /@ FactorInteger@ #) & /@ lst[[-1]] ]}]]; Max[Length /@ lst]]; Array[g, 105] (* Robert G. Wilson v, May 08 2020 *)

A332992 Maximum outdegree in the graph formed by a subset of numbers in range 1 .. n with edge relation k -> k - k/p, where p can be any of the prime factors of k.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 1, 3, 2, 3, 2, 2, 2, 2, 2, 2, 3, 3, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 1, 3, 3, 3, 2, 3, 3, 3, 2, 2, 2, 3, 2, 3, 3, 3, 2, 2, 2, 2, 3, 2, 3, 3, 2, 2, 3, 3, 2, 3, 2, 3, 2, 2, 3, 3, 2, 2, 3, 3, 2, 3
Offset: 1

Views

Author

Antti Karttunen, Apr 04 2020

Keywords

Comments

Maximum number of distinct prime factors of any one integer encountered on all possible paths from n to 1 when iterating with nondeterministic map k -> k - k/p, where p can be any of the prime factors of k.

Examples

			For n=15 we have five alternative paths from 15 to 1: {15, 10, 5, 4, 2, 1}, {15, 10, 8, 4, 2, 1}, {15, 12, 8, 4, 2, 1},  {15, 12, 6, 4, 2, 1},  {15, 12, 6, 3, 2, 1}. These form a lattice illustrated below:
        15
       / \
      /   \
    10     12
    / \   / \
   /   \ /   \
  5     8     6
   \__  |  __/|
      \_|_/   |
        4     3
         \   /
          \ /
           2
           |
           1
With edges going from 15 towards 1, the maximum outdegree is 2, which occurs at nodes 15, 12, 10 and 6, therefore a(15) = 2.
		

Crossrefs

Cf. A002110 (positions of records and the first occurrence of each n).

Programs

  • Mathematica
    With[{s = Nest[Function[{a, n}, Append[a, Join @@ Table[Flatten@ Prepend[#, n] & /@ a[[n - n/p]], {p, FactorInteger[n][[All, 1]]}]]] @@ {#, Length@ # + 1} &, {{{1}}}, 105]}, Array[If[# == 1, 0, Max@ Tally[#][[All, -1]] &@ Union[Join @@ Map[Partition[#, 2, 1] &, s[[#]] ]][[All, 1]] ] &, Length@ s]] (* Michael De Vlieger, May 02 2020 *)
  • PARI
    up_to = 105;
    A332992list(up_to) = { my(v=vector(up_to)); v[1] = 0; for(n=2,up_to, v[n] = max(omega(n),vecmax(apply(p -> v[n-n/p], factor(n)[, 1]~)))); (v); };
    v332992 = A332992list(up_to);
    A332992(n) = v332992[n];

Formula

a(n) = max(A001221(n), {Max a(n - n/p), for p prime and dividing n}).
For all odd primes p, a(p) = a(p-1).
For all n >= 0, a(A002110(n)) = n.

A332999 Maximum indegree in the graph formed by a subset of numbers in range 1 .. n with edge relation k -> k - k/p, where p is any of the prime factors of k.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 05 2020

Keywords

Examples

			For n=15 we have five alternative paths from 15 to 1: {15, 10, 5, 4, 2, 1}, {15, 10, 8, 4, 2, 1}, {15, 12, 8, 4, 2, 1},  {15, 12, 6, 4, 2, 1},  {15, 12, 6, 3, 2, 1}. These form a lattice illustrated below:
        15
       / \
      /   \
    10     12
    / \   / \
   /   \ /   \
  5     8     6
   \__  |  __/|
      \_|_/   |
        4     3
         \   /
          \ /
           2
           |
           1
With edges going from 15 towards 1, the maximum indegree is 3, which occurs at node 4, therefore a(15) = 3.
		

Crossrefs

Cf. A332992 (max. outdegree), A333123, A334144, A334184.
Cf. A067513 for the maximal indegree in the whole semilattice (see A334111).

Programs

  • Mathematica
    With[{s = Nest[Function[{a, n}, Append[a, Join @@ Table[Flatten@ Prepend[#, n] & /@ a[[n - n/p]], {p, FactorInteger[n][[All, 1]]}]]] @@ {#, Length@ # + 1} &, {{{1}}}, 105]}, Array[If[# == 1, 0, Max@ Tally[#][[All, -1]] &@ Union[Join @@ Map[Partition[#, 2, 1] &, s[[#]] ]][[All, -1]] ] &, Length@ s]] (* Michael De Vlieger, May 02 2020 *)
  • PARI
    A332999(n) = { my(m = Map(), nodes = List([n]), x, xps, s=0, u, v); while(#nodes, x = nodes[#nodes]; listpop(nodes); xps = factor(x)[, 1]~; for(i=1,#xps, u=x-(x/xps[i]); if(!mapisdefined(m,u,&v), v=0; listput(nodes,u)); mapput(m,u,v+1); s = max(s,v+1))); (s); };

A334230 Triangle read by rows: T(n,k) gives the meet of n and k in the graded lattice of the positive integers defined by covering relations "n covers (n - n/p)" for all divisors p of n.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 2, 2, 4, 1, 2, 2, 4, 5, 1, 2, 3, 4, 4, 6, 1, 2, 3, 4, 4, 6, 7, 1, 2, 2, 4, 4, 4, 4, 8, 1, 2, 3, 4, 4, 6, 6, 4, 9, 1, 2, 2, 4, 5, 4, 4, 8, 4, 10, 1, 2, 2, 4, 5, 4, 4, 8, 4, 10, 11, 1, 2, 3, 4, 4, 6, 6, 8, 6, 8, 8, 12, 1, 2, 3, 4, 4, 6, 6, 8
Offset: 1

Views

Author

Keywords

Comments

Any row with prime index p is a copy of row p-1 followed by that prime p.

Examples

			The interval [1,15] illustrates that, for example, T(12, 10) = 8, T(12, 4) = T(5, 6) = 4, T(8, 3) = 2, etc.
      15
     _/ \_
    /     \
  10       12
  | \_   _/ |
  |   \ /   |
  5    8    6
   \_  |  _/|
     \_|_/  |
       4    3
       |  _/
       |_/
       2
       |
       |
       1
Triangle begins:
  n\k| 1 2 3 4 5 6 7 8 9 10 11 12 13 14
  ---+---------------------------------
   1 | 1
   2 | 1 2
   3 | 1 2 3
   4 | 1 2 2 4
   5 | 1 2 2 4 5
   6 | 1 2 3 4 4 6
   7 | 1 2 3 4 4 6 7
   8 | 1 2 2 4 4 4 4 8
   9 | 1 2 3 4 4 6 6 4 9
  10 | 1 2 2 4 5 4 4 8 4 10
  11 | 1 2 2 4 5 4 4 8 4 10 11
  12 | 1 2 3 4 4 6 6 8 6  8  8 12
  13 | 1 2 3 4 4 6 6 8 6  8  8 12 13
  14 | 1 2 3 4 4 6 7 8 6  8  8 12 12 14
		

Crossrefs

Programs

  • PARI
    \\ This just returns the largest (in a normal sense) number x from the intersection of the set of descendants of n and k:
    up_to = 105;
    buildWdescsets(up_to) = { my(v=vector(up_to)); v[1] = Set([1]); for(n=2,up_to, my(f=factor(n)[, 1]~, s=Set([n])); for(i=1,#f,s = setunion(s,v[n-(n/f[i])])); v[n] = s); (v); }
    vdescsets = buildWdescsets(up_to);
    A334230tr(n,k) = vecmax(setintersect(vdescsets[n],vdescsets[k]));
    A334230list(up_to) = { my(v = vector(up_to), i=0); for(n=1,oo, for(k=1,n, i++; if(i > up_to, return(v)); v[i] = A334230tr(n,k))); (v); };
    v334230 = A334230list(up_to);
    A334230(n) = v334230[n]; \\ Antti Karttunen, Apr 19 2020

Formula

T(n, k) = m*T(n/m, k/m) for m = gcd(n, k).

A334231 Triangle read by rows: T(n,k) gives the join of n and k in the graded lattice of the positive integers defined by covering relations "n covers (n - n/p)" for all divisors p of n.

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 4, 4, 6, 4, 5, 5, 15, 5, 5, 6, 6, 6, 6, 15, 6, 7, 7, 7, 7, 35, 7, 7, 8, 8, 12, 8, 10, 12, 14, 8, 9, 9, 9, 9, 45, 9, 21, 18, 9, 10, 10, 15, 10, 10, 15, 35, 10, 45, 10, 11, 11, 33, 11, 11, 33, 77, 11, 99, 11, 11, 12, 12, 12, 12, 15, 12, 14, 12
Offset: 1

Views

Author

Peter Kagey, Apr 19 2020

Keywords

Comments

The poset of the positive integers is defined by covering relations "n covers (n - n/p)" for all divisors p of n.
n appears A332809(n) times in row n.

Examples

			The interval [1,15] illustrates that, for example, T(12, 10) = T(6, 5) = 15, T(12, 4) = 12, T(8, 5) = 10, T(3, 1) = 3, etc.
      15
     _/ \_
    /     \
  10       12
  | \_   _/ |
  |   \ /   |
  5    8    6
   \_  |  _/|
     \_|_/  |
       4    3
       |  _/
       |_/
       2
       |
       |
       1
Triangle begins:
  n\k|  1  2  3  4  5  6  7  8  9 10  11 12 13 14
  ---+-------------------------------------------
   1 |  1
   2 |  2  2
   3 |  3  3  3
   4 |  4  4  6  4
   5 |  5  5 15  5  5
   6 |  6  6  6  6 15  6
   7 |  7  7  7  7 35  7  7
   8 |  8  8 12  8 10 12 14  8
   9 |  9  9  9  9 45  9 21 18  9
  10 | 10 10 15 10 10 15 35 10 45 10
  11 | 11 11 33 11 11 33 77 11 99 11  11
  12 | 12 12 12 12 15 12 14 12 18 15  33 12
  13 | 13 13 13 13 65 13 91 13 39 65 143 13 13
  14 | 14 14 14 14 35 14 14 14 21 35  77 14 91 14
		

Crossrefs

Programs

  • PARI
    \\ This just returns the least (in a normal sense) number x such that both n and k are in its set of descendants:
    up_to = 105;
    buildWdescsets(up_to) = { my(v=vector(up_to)); v[1] = Set([1]); for(n=2,up_to, my(f=factor(n)[, 1]~, s=Set([n])); for(i=1,#f,s = setunion(s,v[n-(n/f[i])])); v[n] = s); (v); }
    vdescsets = buildWdescsets(100*up_to); \\ XXX - Think about a safe limit here!
    A334231tr(n,k) = for(i=max(n,k),oo,if(setsearch(vdescsets[i],n)&&setsearch(vdescsets[i],k),return(i)));
    A334231list(up_to) = { my(v = vector(up_to), i=0); for(n=1,oo, for(k=1,n, i++; if(i > up_to, return(v)); v[i] = A334231tr(n,k))); (v); };
    v334231 = A334231list(up_to);
    A334231(n) = v334231[n]; \\ Antti Karttunen, Apr 19 2020

Formula

T(n,1) = T(n,n) = n. T(n, 2) = n for n >= 2.
T(x,y) <= lcm(x,y) for any x,y because x is in same chain with lcm(x,y), and y is in same chain with lcm(x,y).
Moreover, empirically it looks like T(x,y) divides lcm(x,y).

A333959 First occurrence of n in A334144.

Original entry on oeis.org

1, 6, 15, 33, 65, 77, 154, 161, 217, 231, 455, 469, 483, 693, 957, 987, 1001, 1449, 1463, 2021, 2717, 2093, 2415, 2967, 3003, 4147, 3059, 4853, 4945, 4899, 6083, 8533, 4991, 7161, 9982, 8987, 9177, 10787, 10857, 10465, 10199, 12857, 14539, 20355, 18753, 20398
Offset: 1

Views

Author

Keywords

Comments

Consider the mappings f(m) := m -> m - m/p across primes p | m.
Row m of A334184, read as a triangle T(m, k), lists the number of distinct values that proceed from the mapping after exactly k iterations.
A334144(m) is the largest value in row m of A334184.
The smallest term in this sequence that is not an index of a record in A334144 is a(22) = 2093.
From Robert G. Wilson v, Jun 14 2020: (Start)
All terms are nonprimes, but not necessarily squarefree. They are: 693, 1449, 91791, 13126113, 46334057, ..., .
Even terms: 6, 154, 9982, 20398, 29946, 812630, 1366666, 4263182, 17766658, 22866158, 34688186, 80633294, ..., .
Except for the initial even term, all even terms divided by 2 are also terms.
(End)

Examples

			1 is the first term since 1 is the empty product.
6 follows 1 since 2 <= m <= 5 have total order, thus the maximum number in A333184 is 1. For m = 6, the mapping f(m) has two distinct results {4, 3}, which generate chains {4, 2, 1} and {3, 2, 1}, respectively, with the last two terms in both chains coincident. Since the largest number of terms in an antichain is 2, a(2) = 6.
15 follows 6 since row 15 of A334184 = [1, 2, 3, 2, 1, 1] is the smallest m for which n = 3 appears.
Hasse diagrams of the 3 smallest terms, with brackets around the widest row.
[1]        6           15
          / \          /\
         /   \        /  \
        [4   3]     12  __10
         |  /       | \/   |
         | /        |_/\   |
         2         [8  _6  5]
         |          | /_|_/
         |          |// |
         1          4   3
                    |  /
                    |_/
                    2
                    |
                    |
                    1
		

Crossrefs

Programs

  • Mathematica
    With[{s = Table[Max[Length@ Union@ # & /@ Transpose@ #] &@ If[n == 1, {{1}}, NestWhile[If[Length[#] == 0, Map[{n, #} &, # - # /FactorInteger[#][[All, 1]] ], Union[Join @@ Map[Function[{w, n}, Map[Append[w, If[n == 0, 0, n - n/#]] &, FactorInteger[n][[All, 1]] ]] @@ {#, Last@ #} &, #]] ] &, n, If[ListQ[#], AllTrue[#, Last[#] > 1 &], # > 1] &]], {n, 10^3}]}, TakeWhile[Array[FirstPosition[s, #][[1]] &, Max@ s], IntegerQ]]
    f[n_] := Block[{lst = {{n}}}, While[lst[[-1]] != {1}, lst = Join[ lst, {Union[ Flatten[# - #/(First@# & /@ FactorInteger@#) & /@ lst[[-1]]] ]}]]; Max[Length@# & /@ lst]]; t[] := 0; k = 1; While[k < 21001, a = f@k; If[ t[a] == 0, t[a] = k]; k++]; t@# & /@ Range@ 46 (* _Robert G. Wilson v, Jun 14 2020 *)
Showing 1-8 of 8 results.