login
a(n) = A114707(n) - A114707(n-1) = the number of distinct primes dividing n but not A114707(n-1).
2

%I #15 Jan 10 2019 03:11:50

%S 1,1,1,1,2,0,1,1,2,0,2,0,2,0,1,1,2,0,2,0,2,0,2,0,2,0,2,0,3,1,1,2,1,2,

%T 1,1,2,2,1,1,3,1,2,2,2,1,1,1,0,1,2,1,1,1,1,2,2,1,1,1,1,1,0,2,1,1,1,1,

%U 2,1,2,1,1,2,2,2,3,1,2,1,1,1,2,2,1,2,2,1,1,2,2,2,2,2,2,1,1,1,0,1,3,1,2,3,1

%N a(n) = A114707(n) - A114707(n-1) = the number of distinct primes dividing n but not A114707(n-1).

%C First occurrence of k=0..8: 7, 2, 6, 30, 330, 4620, 46410, 570570, ..., . - _Robert G. Wilson v_, Dec 28 2005

%e A114707(11) = 11. Since 2 and 3 are the 2 distinct primes that divide 12 and neither divides 11, a(12) is 2 (and A114707(12) is 2 + A114707(11) = 13).

%t a[1] = 1; a[n_] := a[n] = a[n - 1] + Length@Complement[First /@ FactorInteger@n, First /@ FactorInteger@a[n - 1]]; b = Array[a, 100]; Drop[b, 1] - Drop[b, -1] (* _Robert G. Wilson v_, Dec 28 2005 *)

%o (PARI) {a=1;for(n=2,106,print1(d=#setminus(Set(factor(n)[,1]),Set(factor(a)[,1])),",");a=a+d)} \\ _Klaus Brockhaus_, Dec 27 2005

%Y Cf. A114707.

%K nonn

%O 2,5

%A _Leroy Quet_, Dec 26 2005

%E More terms from _Klaus Brockhaus_ and _Robert G. Wilson v_, Dec 27 2005