Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #26 Jun 27 2024 15:23:46
%S 1,2,3,4,5,7,7,8,9,11,11,13,13,15,15,16,17,19,19,21,21,23,23,25,25,27,
%T 27,29,29,32,33,34,36,37,39,40,41,43,45,46,47,50,51,53,55,57,58,59,60,
%U 60,61,63,64,65,66,67,69,71,72,73,74,75,76,76,78,79,80,81,82,84,85,87
%N a(1)=1. For n>1, a(n) = a(n-1) + (number of distinct primes dividing n but not a(n-1)).
%C Number of distinct primes dividing n but not a(n-1) is A114708(n).
%C a(10^k), k=0..6: 1, 11, 130, 1691, 19819, 220501, 2398245. - _Robert G. Wilson v_, Dec 28 2005
%H Robert Israel, <a href="/A114707/b114707.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A001221(n*a(n-1)) - A001221(a(n-1)) + a(n-1). - _Jon Maiga_, Jan 09 2019
%e a(11) = 11. Since 2 and 3 are the 2 distinct primes that divide 12 and neither divides 11, a(12) is 2 greater than a(11), a(12) = 13.
%p R:= 1: v:= 1:
%p for n from 2 to 100 do
%p v:= v + nops(select(p -> v mod p <> 0, numtheory:-factorset(n)));
%p R:= R,v;
%p od:
%p R; # _Robert Israel_, Jun 27 2024
%t a[1] = 1; a[n_] := a[n] = a[n - 1] + Length@Complement[First /@ FactorInteger@n, First /@ FactorInteger@a[n - 1]]; Array[a, 72] (* _Robert G. Wilson v_, Dec 27 2005 *)
%t a[1] = 1; a[n_] := (m = a[n - 1]; PrimeNu[n*m] - PrimeNu[m] + m); Array[a, 100] (* _Jon Maiga_, Jan 09 2019 *)
%o (PARI) {print1(a=1,",");for(n=2,72,print1(a=a+#setminus(Set(factor(n)[,1]),Set(factor(a)[,1])),","))} \\ _Klaus Brockhaus_, Dec 27 2005
%Y Cf. A001221, A114708.
%K nonn
%O 1,2
%A _Leroy Quet_, Dec 26 2005
%E More terms from _Klaus Brockhaus_ and _Robert G. Wilson v_, Dec 27 2005