login
a(1)=1, a(2) = 2. a(n) = a(n-2) + (largest prime dividing a(n-1)).
1

%I #17 Jun 18 2018 15:26:38

%S 1,2,3,5,8,7,15,12,18,15,23,38,42,45,47,92,70,99,81,102,98,109,207,

%T 132,218,241,459,258,502,509,1011,846,1058,869,1137,1248,1150,1271,

%U 1191,1668,1330,1687,1571,3258,1752,3331,5083,3354,5126,3587,5337,4180,5356

%N a(1)=1, a(2) = 2. a(n) = a(n-2) + (largest prime dividing a(n-1)).

%H Ivan Neretin, <a href="/A112337/b112337.txt">Table of n, a(n) for n = 1..5000</a>

%e a(13) = a(11) + (largest prime dividing a(12)). a(12) is 38 and 19 is the largest prime dividing it. So a(13) = 23 + 19 = 42.

%t Nest[Append[#, FactorInteger[#[[-1]]][[-1, 1]] + #[[-2]]] &, {1, 2}, 51] (* _Ivan Neretin_, Jun 18 2018 *)

%o (MuPAD) A := array(1..100); A[1] := 1; A[2] := 2; for n from 3 to 100 do s := ifactor(A[n-1]); b := s[nops(s)-1]; A[n] := A[n-2] + b; print(A[n]); end_for; // _Stefan Steinerberger_, Dec 02 2005

%Y Cf. A078695, A006530.

%K nonn

%O 1,2

%A _Leroy Quet_, Dec 01 2005

%E More terms from _Stefan Steinerberger_, Dec 02 2005