OFFSET
1,2
COMMENTS
Number of distinct primes dividing n but not a(n-1) is A114708(n).
a(10^k), k=0..6: 1, 11, 130, 1691, 19819, 220501, 2398245. - Robert G. Wilson v, Dec 28 2005
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
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.
MAPLE
R:= 1: v:= 1:
for n from 2 to 100 do
v:= v + nops(select(p -> v mod p <> 0, numtheory:-factorset(n)));
R:= R, v;
od:
R; # Robert Israel, Jun 27 2024
MATHEMATICA
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 *)
a[1] = 1; a[n_] := (m = a[n - 1]; PrimeNu[n*m] - PrimeNu[m] + m); Array[a, 100] (* Jon Maiga, Jan 09 2019 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Dec 26 2005
EXTENSIONS
More terms from Klaus Brockhaus and Robert G. Wilson v, Dec 27 2005
STATUS
approved