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.

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

This page as a plain text file.
%I A333794 #27 Oct 05 2021 21:07:15
%S A333794 1,3,6,7,12,13,20,15,22,25,36,27,40,41,42,31,48,45,64,51,66,73,96,55,
%T A333794 76,81,72,83,112,85,116,63,118,97,120,91,128,129,130,103,144,133,176,
%U A333794 147,136,193,240,111,182,153,162,163,216,145,208,167,202,225,284,171,232,233,208,127,236,237,304,195,306,241,312,183,256,257
%N A333794 a(1) = 1, for n > 1, a(n) = n + a(n-A052126(n)).
%C A333794 Conjecturally, also the largest path sum when iterating from n to 1 with nondeterministic map k -> k - k/p, where p is any prime factor of k.
%H A333794 Antti Karttunen, <a href="/A333794/b333794.txt">Table of n, a(n) for n = 1..16384</a>
%H A333794 Antti Karttunen, <a href="/A333794/a333794.txt">Data supplement: n, a(n) computed for n = 1..65537</a>
%H A333794 Michael De Vlieger, <a href="/A333794/a333794.png">Graph montage</a> of k -> k - k/p, with prime p|k for 2 <= k <= 211, red line showing path of greatest sum, blue the path of least sum (cf. A333790), and purple where the two paths coincide, with other paths in gray.
%F A333794 a(1) = 1; and for n > 1, a(n) = n + a(A171462(n)) = n + a(n-A052126(n)).
%F A333794 a(n) = A073934(n) + A333793(n).
%F A333794 a(n) = n + Max a(n - n/p), for p prime and dividing n. [Conjectured, holds at least up to n=2^24]
%F A333794 For all n >= 1, A333790(n) <= a(n) <= A332904(n).
%F A333794 For all n >= 1, a(n) >= A332993(n). [Apparently, have to check!]
%e A333794 For n=119, the graph obtained is this:
%e A333794               119
%e A333794              _/\_
%e A333794             /    \
%e A333794           102    112
%e A333794          _/|\_    | \_
%e A333794        _/  |  \_  |   \_
%e A333794       /    |    \ |     \
%e A333794     51     68    96     56
%e A333794     /|   _/ |   _/|   _/ |
%e A333794    / | _/   | _/  | _/   |
%e A333794   /  |/     |/    |/     |
%e A333794 (48) 34    64     48    28
%e A333794      |\_    |    _/|   _/|
%e A333794      |  \_  |  _/  | _/  |
%e A333794      |    \_|_/    |/    |
%e A333794     17     32     24    14
%e A333794       \_    |    _/|   _/|
%e A333794         \_  |  _/  | _/  |
%e A333794           \_|_/    |/    |
%e A333794            16      12    7
%e A333794             |    _/|    _/
%e A333794             |  _/  |  _/
%e A333794             |_/    |_/
%e A333794             8     _6
%e A333794             |  __/ |
%e A333794             |_/    |
%e A333794             4      3
%e A333794              \     /
%e A333794               \_ _/
%e A333794                 2
%e A333794                 |
%e A333794                 1.
%e A333794 If we always subtract A052126(n) (i.e., n divided by its largest prime divisor), i.e., iterate with A171462 (starting from 119), we obtain 119-(119/17) = 112 -> 112-(112/7) -> 96-(96/3) -> 64-(64/2) -> 32-(32/2) -> 16-(16/2) -> 8-(8/2) -> 4-(4/2) -> 2-(2/2) -> 1, with sum 119+112+96+64+32+16+8+4+2+1 = 554, thus a(119) = 554. This happens also to be maximal sum of any path in above diagram.
%t A333794 Array[Total@ NestWhileList[# - #/FactorInteger[#][[-1, 1]] &, #, # > 1 &] &, 74] (* _Michael De Vlieger_, Apr 14 2020 *)
%o A333794 (PARI) A333794(n) = if(1==n,n,n + A333794(n-(n/vecmax(factor(n)[, 1]))));
%Y A333794 Cf. A052126, A073934, A171462, A332994, A333790, A333793.
%K A333794 nonn
%O A333794 1,2
%A A333794 _Antti Karttunen_, Apr 05 2020