OFFSET
1,1
COMMENTS
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
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
LINKS
Jens Kruse Andersen, Table of n, a(n) for n = 1..10000
MATHEMATICA
Take[Union[Flatten[Table[Prime[n]^(k + 1), {n, 100}, {k, 0, 14, 2}]]], 100] (* Vincenzo Librandi, Jan 10 2019 *)
PROG
(PARI) for(n=1, 10^4, my(e=isprimepower(n)); if(e%2==1, print1(n, ", ")))
(Magma) [n:n in [2..1000]| #PrimeDivisors(n) eq 1 and IsSquare(n-EulerPhi(n))]; // Marius A. Burtea, May 15 2019
(Python)
from sympy import primepi, integer_nthroot
def A246551(n):
def f(x): return int(n-1+x-sum(primepi(integer_nthroot(x, k)[0])for k in range(1, x.bit_length(), 2)))
kmin, kmax = 1, 2
while f(kmax) >= kmax:
kmax <<= 1
while True:
kmid = kmax+kmin>>1
if f(kmid) < kmid:
kmax = kmid
else:
kmin = kmid
if kmax-kmin <= 1:
break
return kmax # Chai Wah Wu, Aug 13 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Joerg Arndt, Aug 29 2014
STATUS
approved