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.

A333793 a(n) = A333794(n) - A073934(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 0, 1, 3, 3, 3, 3, 8, 5, 0, 0, 6, 6, 9, 12, 18, 18, 7, 9, 18, 6, 22, 22, 18, 18, 0, 30, 15, 24, 16, 16, 33, 28, 21, 21, 37, 37, 48, 24, 69, 69, 15, 37, 36, 29, 48, 48, 25, 54, 50, 49, 77, 77, 44, 44, 73, 49, 0, 56, 83, 83, 45, 113, 75, 75, 36, 36, 71, 54, 87, 87, 81, 81, 45, 25, 84, 84, 87, 57, 128, 119, 108, 108, 71
Offset: 1

Views

Author

Antti Karttunen, Apr 05 2020

Keywords

Crossrefs

Programs

Formula

a(n) = A333794(n) - A073934(n).
a(p) = a(p-1), for all primes p.
a(A000079(n)) = a(A019434(n)) = 0, for all applicable n.

A378524 Dirichlet inverse of A333794.

Original entry on oeis.org

1, -3, -6, 2, -12, 23, -20, 0, 14, 47, -36, -27, -40, 79, 102, 0, -48, -81, -64, -57, 174, 143, -96, 10, 68, 159, -24, -97, -112, -517, -116, 0, 314, 191, 360, 170, -128, 255, 350, 22, -144, -885, -176, -177, -400, 383, -240, 0, 218, -393, 414, -197, -216, 211, 656, 38, 566, 447, -284, 947, -232, 463, -696, 0, 724
Offset: 1

Views

Author

Antti Karttunen, Dec 01 2024

Keywords

Crossrefs

Cf. also A378523.

Programs

Formula

a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA333794(n/d) * a(d).

A332993 a(1) = 1, for n > 1, a(n) = n + a(A032742(n)).

Original entry on oeis.org

1, 3, 4, 7, 6, 10, 8, 15, 13, 16, 12, 22, 14, 22, 21, 31, 18, 31, 20, 36, 29, 34, 24, 46, 31, 40, 40, 50, 30, 51, 32, 63, 45, 52, 43, 67, 38, 58, 53, 76, 42, 71, 44, 78, 66, 70, 48, 94, 57, 81, 69, 92, 54, 94, 67, 106, 77, 88, 60, 111, 62, 94, 92, 127, 79, 111, 68, 120, 93, 113, 72, 139, 74, 112, 106, 134, 89, 131, 80, 156, 121
Offset: 1

Views

Author

Antti Karttunen, Apr 04 2020

Keywords

Comments

Sum of those divisors of n that can be obtained by repeatedly taking the largest proper divisor (of previous such divisor, starting from n, which is included in the sum), up to and including the terminal 1.

Examples

			a(18) = 18 + 18/2 + 9/3 + 3/3 = 18 + 9 + 3 + 1 = 31.
		

Crossrefs

Programs

Formula

a(1) = 1; and for n > 1, a(n) = n + a(A032742(n)).
a(n) = n + A006022(n).
a(n) = A332994(n) + A333791(n).
a(n) = A000203(n) - A333783(n).
It seems that for all n >= 1, a(n) <= A073934(n) <= A333794(n).

A332994 a(1) = 1, for n > 1, a(n) = n + a(A052126(n)).

Original entry on oeis.org

1, 3, 4, 7, 6, 9, 8, 15, 13, 13, 12, 19, 14, 17, 19, 31, 18, 27, 20, 27, 25, 25, 24, 39, 31, 29, 40, 35, 30, 39, 32, 63, 37, 37, 41, 55, 38, 41, 43, 55, 42, 51, 44, 51, 58, 49, 48, 79, 57, 63, 55, 59, 54, 81, 61, 71, 61, 61, 60, 79, 62, 65, 76, 127, 71, 75, 68, 75, 73, 83, 72, 111, 74, 77, 94, 83, 85, 87, 80, 111, 121
Offset: 1

Views

Author

Antti Karttunen, Apr 04 2020

Keywords

Crossrefs

Programs

Formula

a(1) = 1; and for n > 1, a(n) = n + a(A052126(n)).
a(n) = n + A322382(n).
a(n) = A332993(n) - A333791(n).
a(n) = A000203(n) - A333784(n).

A332904 Sum of distinct integers encountered on all possible paths from n to 1 when iterating with nondeterministic map k -> k - k/p, where p is any of the prime factors of k.

Original entry on oeis.org

1, 3, 6, 7, 12, 16, 23, 15, 25, 30, 41, 36, 49, 57, 66, 31, 48, 63, 82, 66, 105, 99, 122, 76, 91, 115, 90, 125, 154, 156, 187, 63, 222, 114, 240, 139, 176, 196, 217, 138, 179, 251, 294, 215, 264, 284, 331, 156, 300, 213, 258, 247, 300, 220, 345, 261, 334, 348, 407, 336, 397, 429, 395, 127, 492, 512, 579, 246, 650, 546, 617, 291, 364
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 numbers [1, 2, 3, 4, 6, 8, 12] present, therefore a(12) = 1+2+3+4+6+8+12 = 36.
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,
therefore a(15) = 1+2+3+4+5+6+8+10+12+15 = 66.
		

Crossrefs

Cf. A333790 (sum of the route with minimal sum), A333794.

Programs

  • Mathematica
    Total /@ Nest[Function[{a, n}, Append[a, Union@ Flatten@ Table[Append[a[[n - n/p]], n], {p, FactorInteger[n][[All, 1]]}]]] @@ {#, Length@ # + 1} &, {{1}}, 72] (* Michael De Vlieger, Apr 15 2020 *)
  • PARI
    up_to = 20000;
    A332904list(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(vecsum,v); }
    v332904 = A332904list(up_to);
    A332904(n) = v332904[n];

Formula

For all primes p, a(p) = a(p-1) + p.
For all n >= 1, A333000(n) >= a(n) >= A333794(n) >= A333790(n).

A333001 The average path sum (floored down) 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, 23, 34, 25, 38, 37, 39, 31, 48, 41, 60, 46, 60, 63, 86, 50, 71, 71, 68, 71, 100, 74, 105, 63, 104, 89, 108, 81, 118, 112, 116, 90, 131, 112, 155, 119, 122, 153, 200, 101, 161, 132, 148, 135, 188, 131, 179, 137, 178, 181, 240, 144, 205, 192, 181, 127, 206, 191, 258, 170, 251, 199, 270, 160, 233, 218, 216
Offset: 1

Views

Author

Antti Karttunen, Apr 06 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 path sums 27, 25, 24, whose average is 76/3 = 25.333..., therefore a(12) = 25.
For n=15 we have five alternative paths from 15 to 1 (illustrated below) with path sums 37, 40, 42, 40, 39, whose average is 198/5 = 39.6, therefore a(15) = 39.
        15
       / \
      /   \
    10     12
    / \   / \
   /   \ /   \
  5     8     6
   \_   |  __/|
     \__|_/   |
        4     3
         \   /
          \ /
           2
           |
           1.
		

Crossrefs

Cf. A333002/A333003 (average as exact rational, numerator/denominator in lowest terms), A333785 (where the average is an integer).
Cf. A333790 (smallest path sum), A333794 (conjectured largest path sum).

Programs

  • Mathematica
    Map[Floor@ 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}}}, 74] (* Michael De Vlieger, Apr 15 2020 *)
  • PARI
    up_to = 20000;
    A333001list(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, floor(v[n]/u[n])); };
    v333001 = A333001list(up_to);
    A333001(n) = v333001[n];

Formula

a(n) = floor(A333000(n)/A333123(n)) = floor(A333002(n)/A333003(n)).

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

A333792 a(1) = 0, then after the first differences of A333793.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, -1, 1, 2, 0, 0, 0, 5, -3, -5, 0, 6, 0, 3, 3, 6, 0, -11, 2, 9, -12, 16, 0, -4, 0, -18, 30, -15, 9, -8, 0, 17, -5, -7, 0, 16, 0, 11, -24, 45, 0, -54, 22, -1, -7, 19, 0, -23, 29, -4, -1, 28, 0, -33, 0, 29, -24, -49, 56, 27, 0, -38, 68, -38, 0, -39, 0, 35, -17, 33, 0, -6, 0, -36, -20, 59, 0, 3, -30, 71, -9, -11, 0, -37, 16
Offset: 1

Views

Author

Antti Karttunen, Apr 05 2020

Keywords

Crossrefs

Programs

Formula

a(1) = 0; and for n > 1, a(n) = A333793(n) - A333793(n-1).
a(p) = 0 for all primes p. (May obtain zero values also on some nonprimes).
Showing 1-8 of 8 results.