login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Prime powers p^e where p is a prime and e is odd.
15

%I #55 Sep 24 2024 09:28:01

%S 2,3,5,7,8,11,13,17,19,23,27,29,31,32,37,41,43,47,53,59,61,67,71,73,

%T 79,83,89,97,101,103,107,109,113,125,127,128,131,137,139,149,151,157,

%U 163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,243,251,257,263,269,271,277,281,283,293,307,311,313

%N Prime powers p^e where p is a prime and e is odd.

%C These are the integers with only one prime factor whose cototient is square, so this sequence is a subsequence of A063752. Indeed, cototient(p^(2k+1)) = (p^k)^2 and cototient(p) = 1 = 1^2. - _Bernard Schott_, Jan 08 2019

%C With 1 prepended, this sequence is the lexicographically earliest sequence of distinct numbers whose partial products are all numbers whose exponents in their prime power factorization are squares (A197680). - _Amiram Eldar_, Sep 24 2024

%H Jens Kruse Andersen, <a href="/A246551/b246551.txt">Table of n, a(n) for n = 1..10000</a>

%t Take[Union[Flatten[Table[Prime[n]^(k + 1), {n, 100}, {k, 0, 14, 2}]]], 100] (* _Vincenzo Librandi_, Jan 10 2019 *)

%o (PARI) for(n=1, 10^4, my(e=isprimepower(n)); if(e%2==1, print1(n, ", ")))

%o (Magma) [n:n in [2..1000]| #PrimeDivisors(n) eq 1 and IsSquare(n-EulerPhi(n))]; // _Marius A. Burtea_, May 15 2019

%o (Python)

%o from sympy import primepi, integer_nthroot

%o def A246551(n):

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

%o kmin, kmax = 1,2

%o while f(kmax) >= kmax:

%o kmax <<= 1

%o while True:

%o kmid = kmax+kmin>>1

%o if f(kmid) < kmid:

%o kmax = kmid

%o else:

%o kmin = kmid

%o if kmax-kmin <= 1:

%o break

%o return kmax # _Chai Wah Wu_, Aug 13 2024

%Y Cf. A000961, A246547, A246549, A168363, A197680, subsequence of A171561.

%Y Cf. also A056798 (prime powers with even exponents >= 0).

%Y Subsequence of A063752.

%K nonn

%O 1,1

%A _Joerg Arndt_, Aug 29 2014