cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A328384 If n is of the form p^p, a(n) = 0, otherwise a(n) gives the number of iterations of x -> A003415(x) needed to reach the first number different from n which is either a prime, or whose degree (A051903) differs from the degree of n. If the degree of the final number is <= that of n, then a(n) = -1 * iteration count.

Original entry on oeis.org

-1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -2, -1, -1, -1, -1, 2, 0, 1, -1, -1, -1, -1, 2, -1, 1, 3, -1, -3, 1, -1, -1, -1, -1, 1, -1, 1, -1, 3, -1, -2, 1, 1, -1, 1, 1, -1, -2, -1, -1, 2, -1, 3, -1, 2, 1, -1, -1, 1, 3, -1, -1, -1, -1, 2, -1, 1, 1, -1, -1, 5, -1, -1, -1, 2, -2, 1, 1, -1, -1, -1, 1, 1, -2, 1
Offset: 1

Views

Author

Antti Karttunen, Oct 15 2019

Keywords

Comments

The records -1, 0, 1, 2, 3, 5, 8, 10, 11, 13, ... occur at n = 1, 4, 12, 26, 36, 80, 108, 4887, 18688, 22384, ...

Examples

			For n = 21 = 3*7, A051903(21) = 1, A003415(21) = 10 = 2*5, is of the same degree as A051903(10) = 1, but then A003415(10) = 7, which is a prime, having degree <= of the starting value (as we have A051903(7) <= A051903(21)), thus a(21) = -1 * 2 = -2.
For n = 33 = 3*11, A051903(33) = 1, A003415(33) = 14 = 2*7, is of the same degree, but on the second iteration, A003415(14) = 9 = 3^2, with A051903(9) = 2, which is larger than the initial degree, thus a(33) = +2.
		

Crossrefs

Cf. A328385 (the number found in the iteration).
Cf. A256750, A328248, A328383 for similar counts.

Programs

  • PARI
    A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
    A051903(n) = if((n<=1),n-1,vecmax(factor(n)[, 2]));
    A328384(n) = { my(d=A051903(n), u=A003415(n), k=1); if(u==n,return(0)); while(u && (u!=n) && !isprime(u) && A051903(u)==d, k++; n = u; u = A003415(u)); if(A051903(u)<=d,-k,k); };

Formula

a(1) = -1 as 0 is here considered having a smaller degree than 1.
a(p) = -1 for all primes.
a(A051674(n)) = 0.
a(A157037(n)) = -1.
a(A328252(n)) = -1.
a(A328320(n)) = -1.