A100376 a(n) is the largest number x such that for m=n to n+x-1, A006530(m) increases.
2, 1, 2, 1, 2, 1, 4, 3, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 4, 3, 2, 1, 3, 2, 1, 3, 2, 1, 2, 1, 3, 2, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 3, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 4, 3, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 3, 2, 1, 1, 3, 2, 1, 3, 2, 1, 1, 2, 1, 5, 4, 3, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 3
Offset: 2
Keywords
Examples
a(8)=4 because the largest prime factors of 8,9,10,11 are 2,3,5,11; but gpf(12)=3. From _Michael De Vlieger_, Jul 30 2017: (Start) Value First position 1 3 2 2 3 9 4 8 5 90 6 168 7 9352 8 46189 9 721971 10 721970 (End)
Links
- Michel Marcus, Table of n, a(n) for n = 2..10000
Programs
-
Mathematica
With[{s = Differences@ Array[FactorInteger[#][[-1, 1]] &, 115]}, Table[1 + LengthWhile[Drop[s, n], # > 0 &], {n, Length@ s - 10}]] (* Michael De Vlieger, Jul 30 2017 *)
-
PARI
a(n) = {m = n+1; gpf = vecmax(factor(n)[,1]); while((ngpf=vecmax(factor(m)[,1])) > gpf, m++; gpf = ngpf;); m - n;} \\ Michel Marcus, Jul 25 2017
Extensions
Edited by Don Reble, Jun 13 2007
Comments