A271621 a(1) = 2, a(2) = 3, a(n) = A020639(a(n-2)) + A006530(a(n-1)).
2, 3, 5, 8, 7, 9, 10, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Offset: 1
Keywords
Examples
a(1) = 13; a(2) = 46. lpf(13) = 13; gpf(46) = 23. a(3) = 13 + 23 = 36.
Programs
-
Mathematica
a[1] = 2; a[2] = 3; a[n_] := a[n] = FactorInteger[a[n - 2]][[1, 1]] + FactorInteger[a[n - 1]][[-1, 1]]; Array[a, {120}] (* Michael De Vlieger, Apr 12 2016 *)
-
PARI
spf(n) = if (n==1, 1, vecmin(factor(n)[,1])); gpf(n) = if (n==1, 1, vecmax(factor(n)[,1])); lista(nn) = {print1(x=2, ", "); print1(y=3, ", "); for (n=1, nn, ny = spf(x) + gpf(y); print1(ny, ", "); x = y; y = ny;);} \\ Michel Marcus, Apr 15 2016
Formula
a(n) = lpf(a(n-2)) + gpf(a(n-1)), where lpf(n) is the least prime dividing n and gpf(n) is the greatest prime dividing n.
Comments