A333794 a(1) = 1, for n > 1, a(n) = n + a(n-A052126(n)).
1, 3, 6, 7, 12, 13, 20, 15, 22, 25, 36, 27, 40, 41, 42, 31, 48, 45, 64, 51, 66, 73, 96, 55, 76, 81, 72, 83, 112, 85, 116, 63, 118, 97, 120, 91, 128, 129, 130, 103, 144, 133, 176, 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
Offset: 1
Keywords
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. 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.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..16384
- Antti Karttunen, Data supplement: n, a(n) computed for n = 1..65537
- Michael De Vlieger, Graph montage 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.
Programs
-
Mathematica
Array[Total@ NestWhileList[# - #/FactorInteger[#][[-1, 1]] &, #, # > 1 &] &, 74] (* Michael De Vlieger, Apr 14 2020 *)
-
PARI
A333794(n) = if(1==n,n,n + A333794(n-(n/vecmax(factor(n)[, 1]))));
Formula
a(n) = n + Max a(n - n/p), for p prime and dividing n. [Conjectured, holds at least up to n=2^24]
For all n >= 1, a(n) >= A332993(n). [Apparently, have to check!]
Comments