login
Exponent of the n-th prime power A000961(n).
30

%I #29 Aug 16 2024 08:37:15

%S 0,1,1,2,1,1,3,2,1,1,4,1,1,1,2,3,1,1,5,1,1,1,1,2,1,1,1,6,1,1,1,1,4,1,

%T 1,1,1,1,1,1,1,2,3,1,7,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,

%U 5,1,8,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,3,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1

%N Exponent of the n-th prime power A000961(n).

%C a(n) is the number of automorphisms on the field with order A000961(n). This group of automorphisms is cyclic of order a(n). - _Geoffrey Critzer_, Feb 23 2018

%H Reinhard Zumkeller, <a href="/A025474/b025474.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A100995(A000961(n)).

%F A000961(n) = A025473(n)^a(n); A056798(n) = A025473(n)^(2*a(n));

%F A192015(n) = a(n)*A025473(n)^(a(n)-1). - _Reinhard Zumkeller_, Jun 24 2011

%F a(n) = A001222(A000961(n)). - _David Wasserman_, Feb 16 2006

%t Prepend[Table[ FactorInteger[q][[1, 2]], {q,

%t Select[Range[1, 1000], PrimeNu[#] == 1 &]}], 0] (* _Geoffrey Critzer_, Feb 23 2018 *)

%o (Haskell)

%o a025474 = a001222 . a000961 -- _Reinhard Zumkeller_, Aug 13 2013

%o (PARI) A025474_upto(N)=apply(bigomega, A000961_list(N)) \\ _M. F. Hasler_, Jun 16 2022

%o (Python) A025474_upto = lambda N: [A001222(n) for n in A000961_list(N)] # _M. F. Hasler_, Jun 16 2022

%o (Python)

%o from sympy import prime, integer_nthroot, factorint

%o def A025474(n):

%o if n == 1: return 0

%o def f(x): return int(n+x-1-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))

%o m, k = n, f(n)

%o while m != k:

%o m, k = k, f(k)

%o return list(factorint(m).values())[0] # _Chai Wah Wu_, Aug 15 2024

%Y Cf. A000961 (the prime powers), A025473 (prime root of these), A100995 (exponent of prime powers or 0 otherwise), A001222 (bigomega), A056798 (prime powers with even exponents).

%Y Cf. A117331.

%K easy,nonn

%O 1,4

%A _David W. Wilson_

%E Edited by _M. F. Hasler_, Jun 16 2022