A362071 a(1) = 1, and thereafter a(n) is the number of terms with index m < n such that gpf(a(m)) = gpf(a(n-1)), where gpf(k) = A006530(k) is the greatest prime factor of k (or 1 if k=1).
1, 1, 2, 1, 3, 1, 4, 2, 3, 2, 4, 5, 1, 5, 2, 6, 3, 4, 7, 1, 6, 5, 3, 6, 7, 2, 8, 9, 8, 10, 4, 11, 1, 7, 3, 9, 10, 5, 6, 11, 2, 12, 12, 13, 1, 8, 13, 2, 14, 4, 15, 7, 5, 8, 16, 17, 1, 9, 14, 6, 15, 9, 16, 18, 17, 2, 19, 1, 10, 10, 11, 3, 18, 19, 2
Offset: 1
Keywords
Examples
a(3) = 2, because gpf(a(2)) = 1 and there are 2 terms where index m < 3 and gpf(a(m)) = 1, i.e., a(1) and a(2). a(12) = 5 because gpf(a(11)) = 2 and there are 5 terms where index m < 12 and gpf(a(m)) = 2, i.e., a(3), a(7), a(8), a(10), and a(11).
Crossrefs
Cf. A006530.
Programs
-
PARI
gpf(n) = if(n == 1, 1, vecmax(factor(n)[,1])) \\ returns the first n terms of the sequence: A362071UpTon(n) = { my(m = matrix(n,2,a,b,if(b==1,1))); for(i = 2, n, g = gpf(m[i-1,1]); m[i,1] = m[primepi(g)+1,2]++); return(m[,1])}
Comments