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.

Previous Showing 11-20 of 22 results. Next

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 *)

A333790 Smallest path sum when iterating from n to 1 with nondeterministic map k -> k - k/p, where p is any prime factor of k.

Original entry on oeis.org

1, 3, 6, 7, 12, 12, 19, 15, 21, 22, 33, 24, 37, 33, 37, 31, 48, 39, 58, 42, 54, 55, 78, 48, 67, 63, 66, 61, 90, 67, 98, 63, 88, 82, 96, 75, 112, 96, 102, 82, 123, 96, 139, 99, 112, 124, 171, 96, 145, 117, 133, 115, 168, 120, 154, 117, 153, 148, 207, 127, 188, 160, 159, 127, 180, 154, 221, 150, 193, 166, 237, 147, 220, 186, 192, 172, 231
Offset: 1

Views

Author

Antti Karttunen, Apr 06 2020

Keywords

Comments

Note that although in many cases a simple heuristics of always subtracting the largest proper divisor (i.e., iterating with A060681) gives the path with the minimal sum, this does not hold for the following numbers 119, 143, 187, 209, 221, ..., A333789, on which this sequence differs from A073934.

Examples

			For n=119, the graph obtained is this:
              119
             _/\_
            /    \
          102    112
         _/|\_    | \_
       _/  |  \_  |   \_
      /    |    \ |     \
    51     68    96     56
    /|   _/ |   _/|   _/ |
   / | _/   | _/  | _/   |
  /  |/     |/    |/     |
(48) 34    64     48    28
     |\_    |    _/|   _/|
     |  \_  |  _/  | _/  |
     |    \_|_/    |/    |
    17     32     24    14
      \_    |    _/|   _/|
        \_  |  _/  | _/  |
          \_|_/    |/    |
           16      12    7
            |    _/|    _/
            |  _/  |  _/
            |_/    |_/
            8     _6
            |  __/ |
            |_/    |
            4      3
             \     /
              \_ _/
                2
                |
                1.
By choosing the path that follows the right edge of the above diagram, we obtain the smallest sum for any such path that goes from 119 to 1, thus a(119) = 119+112+56+28+14+7+6+3+2+1 = 348.
Note that if we always subtracted the largest proper divisor (A032742), i.e., iterated with A060681 (starting from 119), we would obtain 119-(119/7) = 102 -> 102-(102/2) -> 51-(51/3) -> 34-(34/2) -> 17-(17/17) -> 16-(16/2) -> 8-(8/2) -> 4-(4/2) -> 2-(2/2) -> 1, with sum 119+102+51+34+17+16+8+4+2+1 = 354 = A073934(119), which is NOT minimal sum in this case.
		

Crossrefs

Differs from A073934 for the first time at n=119, where a(119) = 348, while A073934(119) = 354. (See A333789).

Programs

  • Mathematica
    Min@ Map[Total, #] & /@ Nest[Function[{a, n}, Append[a, Join @@ Table[Flatten@ Prepend[#, n] & /@ a[[n - n/p]], {p, FactorInteger[n][[All, 1]]}]]] @@ {#, Length@ # + 1} &, {{{1}}}, 76]   (* Michael De Vlieger, Apr 14 2020 *)
  • PARI
    up_to = 65537; \\ 2^20;
    A333790list(up_to) = { my(v=vector(up_to)); v[1] = 1; for(n=2, up_to, v[n] = n+vecmin(apply(p -> v[n-n/p], factor(n)[, 1]~))); (v); };
    v333790 = A333790list(up_to);
    A333790(n) = v333790[n];

Formula

a(n) = n + Min a(n - n/p), for p prime and dividing n.
For n >= 1, a(n) <= A333794(n) <= A332904(n), a(n) <= A333001(n).

A332810 Number of integers in range 1..n that are not encountered on any of the possible paths from n to 1 when iterating with nondeterministic map k -> k - k/p, where p is any prime factor of k.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 1, 4, 3, 4, 4, 5, 5, 5, 5, 11, 11, 9, 9, 12, 9, 12, 12, 15, 16, 15, 17, 16, 16, 16, 16, 26, 16, 26, 17, 24, 24, 24, 24, 30, 30, 25, 25, 31, 27, 31, 31, 37, 31, 38, 37, 38, 38, 40, 39, 41, 40, 41, 41, 42, 42, 42, 43, 57, 43, 43, 43, 58, 43, 46, 46, 57, 57, 57, 54, 58, 47, 58, 58, 68, 66, 68, 68, 62, 69, 62, 62, 72, 72
Offset: 1

Views

Author

Antti Karttunen, Apr 04 2020

Keywords

Examples

			a(12): we have three alternative paths: {12, 8, 4, 2, 1}, {12, 6, 4, 2, 1} or {12, 6, 3, 2, 1}, with [5, 7, 9, 10, 11] being the only numbers in range 1..12 that do not occur in any of those paths, therefore a(12) = 5.
		

Crossrefs

Programs

  • PARI
    up_to = 105;
    A332809list(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); apply(length,v); }
    v332809 = A332809list(up_to);
    A332810(n) = (n-v332809[n]);

Formula

a(n) = n - A332809(n).

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); };

A333003 Denominator of the average path sum when iterating from n to 1 with nondeterministic map k -> k - k/p, where p is any prime factor of k.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 3, 3, 1, 5, 1, 1, 5, 5, 1, 5, 5, 5, 4, 1, 7, 5, 9, 9, 12, 12, 1, 17, 2, 7, 9, 9, 7, 4, 4, 4, 7, 7, 3, 7, 7, 7, 5, 7, 1, 7, 6, 6, 7, 8, 7, 7, 23, 23, 21, 21, 33, 7, 1, 11, 47, 47, 1, 61, 28, 28, 7, 7, 23, 14, 2, 103, 3, 3, 5, 7, 1, 1, 1, 4, 21, 79, 7, 7, 7, 7, 7, 89, 7, 14, 2, 2, 21, 103, 1, 1, 16, 16, 18, 84
Offset: 1

Views

Author

Antti Karttunen, Apr 06 2020

Keywords

Crossrefs

See A333002 for numerator.
Cf. A333000, A333001, A333123, A333785 (positions of ones).

Programs

  • Mathematica
    Map[Denominator@ Mean[Total /@ #] &, #] &@ Nest[Function[{a, n}, Append[a, Join @@ Table[Flatten@ Prepend[#, n] & /@ a[[n - n/p]], {p, FactorInteger[n][[All, 1]]}]]] @@ {#, Length@ # + 1} &, {{{1}}}, 104] (* Michael De Vlieger, Apr 15 2020 *)
  • PARI
    up_to = 20000;
    A333003list(up_to) = { my(u=vector(up_to), v=vector(up_to)); u[1] = v[1] = 1; for(n=2,up_to, my(ps=factor(n)[, 1]~); u[n] = vecsum(apply(p -> u[n-n/p], ps)); v[n] = (u[n]*n)+vecsum(apply(p -> v[n-n/p], ps))); vector(up_to, n, denominator(v[n]/u[n])); };
    v333003 = A333003list(up_to);
    A333003(n) = v333003[n];

Formula

a(n) = denominator(A333000(n)/A333123(n)).

A333785 Numbers m such that the average path sum is an integer when iterating from m to 1 with nondeterministic map k -> k - k/p, where p is any prime factor of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 14, 16, 17, 20, 25, 32, 50, 64, 68, 82, 83, 84, 100, 101, 125, 128, 162, 163, 170, 235, 243, 256, 257, 272, 289, 456, 457, 512, 548, 621, 1024, 1028, 1040, 2048, 4096, 4112, 7225, 8192, 8738, 9248, 13058, 16384, 16480, 16481, 17476, 17477, 32128, 32768, 65536, 65537, 131072, 132098, 262144, 262148, 264196
Offset: 1

Views

Author

Antti Karttunen, Apr 06 2020

Keywords

Comments

Numbers m such that A333123(m) divides A333000(m).
Positions of ones in A333003.

Crossrefs

Subsequences: A000079, A019434.

Programs

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).

A333002 Numerator of the average path sum when iterating from n to 1 with nondeterministic map k -> k - k/p, where p is any prime factor of k.

Original entry on oeis.org

1, 3, 6, 7, 12, 25, 39, 15, 43, 47, 69, 76, 115, 37, 198, 31, 48, 209, 304, 46, 302, 317, 432, 203, 71, 500, 344, 640, 901, 899, 1271, 63, 1777, 179, 758, 736, 1069, 786, 465, 361, 525, 789, 1090, 358, 860, 1075, 1404, 506, 1132, 132, 1042, 815, 1133, 918, 1439, 965, 1251, 4165, 5522, 3026, 4307, 6343, 1273, 127
Offset: 1

Views

Author

Antti Karttunen, Apr 06 2020

Keywords

Crossrefs

See A333003 for denominator.

Programs

  • Mathematica
    Map[Numerator@ Mean[Total /@ #] &, #] &@ Nest[Function[{a, n}, Append[a, Join @@ Table[Flatten@Prepend[#, n] & /@ a[[n - n/p]], {p, FactorInteger[n][[All, 1]]}]]] @@ {#, Length@ # + 1} &, {{{1}}}, 63] (* Michael De Vlieger, Apr 15 2020 *)
  • PARI
    up_to = 20000;
    A333002list(up_to) = { my(u=vector(up_to), v=vector(up_to)); u[1] = v[1] = 1; for(n=2,up_to, my(ps=factor(n)[, 1]~); u[n] = vecsum(apply(p -> u[n-n/p], ps)); v[n] = (u[n]*n)+vecsum(apply(p -> v[n-n/p], ps))); vector(up_to, n, numerator(v[n]/u[n])); };
    v333002 = A333002list(up_to);
    A333002(n) = v333002[n];

Formula

a(n) = numerator(A333000(n)/A333123(n)).
Previous Showing 11-20 of 22 results. Next