A293460 a(n) = Sum_{k=1..n} sign(omega(n+1) - omega(n)) (where omega(m) = A001221(m), the number of distinct primes dividing m).
0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 1, 2, 3, 2, 3, 3, 4, 3, 4, 3, 4, 4, 4, 4, 5, 4, 5, 4, 5, 4, 5, 4, 4, 4
Offset: 0
Keywords
Examples
The following table shows the first terms of the sequence, alongside sign(omega(n+1)-omega(n)), omega(n+1) and omega(n): n a(n) sign w(n+1) w(n) - ---- ---- ------ ---- 0 0 1 1 1 1 0 2 1 0 1 1 3 1 0 1 1 4 1 0 1 1 5 2 1 2 1 6 1 -1 1 2 7 1 0 1 1 8 1 0 1 1 9 2 1 2 1 10 1 -1 1 2 11 2 1 2 1 12 1 -1 1 2 13 2 1 2 1 14 2 0 2 2 15 1 -1 1 2 16 1 0 1 1 17 2 1 2 1 18 1 -1 1 2 19 2 1 2 1 20 2 0 2 2
Links
- Georg Fischer, Table of n, a(n) for n = 0..1000
- Rémy Sigrist, Line graph of the first 10000 terms
- Rémy Sigrist, Line graph of the first 100000000 terms
- Rémy Sigrist, Line graph of the first 1000000000 terms
- Rémy Sigrist, Line graph of the first 10000000000 terms
Programs
-
Mathematica
Accumulate[Join[{0},Sign[Differences[PrimeNu[Range[90]]]]]] (* Harvey P. Dale, Dec 25 2024 *)
-
PARI
s = 0; for (n=1, 87, print1 (s ", "); s += sign(omega(n+1)-omega(n)))
Comments