login
A114707
a(1)=1. For n>1, a(n) = a(n-1) + (number of distinct primes dividing n but not a(n-1)).
4
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, 27, 29, 29, 32, 33, 34, 36, 37, 39, 40, 41, 43, 45, 46, 47, 50, 51, 53, 55, 57, 58, 59, 60, 60, 61, 63, 64, 65, 66, 67, 69, 71, 72, 73, 74, 75, 76, 76, 78, 79, 80, 81, 82, 84, 85, 87
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
FORMULA
a(n) = A001221(n*a(n-1)) - A001221(a(n-1)) + a(n-1). - Jon Maiga, Jan 09 2019
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
Sequence in context: A373397 A343271 A363897 * A000015 A306369 A291784
KEYWORD
nonn
AUTHOR
Leroy Quet, Dec 26 2005
EXTENSIONS
More terms from Klaus Brockhaus and Robert G. Wilson v, Dec 27 2005
STATUS
approved