%I #11 Jun 28 2024 12:48:28
%S 1,3,3,5,5,10,17,19,22,27,38,41,54,61,69,71,88,91,110,110,120,131,154,
%T 157,162,175,178,185,214,222,253,255,266,283,295,300,337,358,374,379,
%U 420,420,463,476,484,507,554,557,564,569,589,604,657,659,675,684,684,713,772,780,841,874,884,884
%N Starting with a(1) = 1, a(n) = a(n-1) + the sum of the distinct primes that divide n but not a(n-1).
%H Robert Israel, <a href="/A374075/b374075.txt">Table of n, a(n) for n = 1..10000</a>
%e a(9) = 22; the primes dividing 10 are 2 and 5, but 2 also divides 22, so a(10) = 22 + 5 = 27.
%p R:=1: v:= 1:
%p for n from 2 to 100 do
%p v:= v + convert(select(p -> v mod p <> 0, numtheory:-factorset(n)),`+`);
%p R:= R,v
%p od:
%p R;
%t n = 1; NestList[Function[k, n++; k + Total@ Select[FactorInteger[n][[All, 1]], CoprimeQ[#, k] &]], 1, 63] (* _Michael De Vlieger_, Jun 28 2024 *)
%Y Cf. A114707.
%K nonn
%O 1,2
%A _Robert Israel_, Jun 27 2024
|