login
A229125
Numbers of the form p * m^2, where p is prime and m > 0: union of A228056 and A000040.
20
2, 3, 5, 7, 8, 11, 12, 13, 17, 18, 19, 20, 23, 27, 28, 29, 31, 32, 37, 41, 43, 44, 45, 47, 48, 50, 52, 53, 59, 61, 63, 67, 68, 71, 72, 73, 75, 76, 79, 80, 83, 89, 92, 97, 98, 99, 101, 103, 107, 108, 109, 112, 113, 116, 117, 124, 125, 127, 128, 131, 137, 139, 147, 148, 149
OFFSET
1,1
COMMENTS
No term is the product of two other terms.
Squares of terms and pairwise products of distinct terms form a subsequence of A028260.
Numbers n such that A162642(n) = 1. - Jason Kimberley, Oct 10 2016
Numbers k such that A007913(k) is a prime number. - Amiram Eldar, Jul 27 2020
FORMULA
The number of terms not exceeding x is (Pi^2/6) * x/log(x) + O(x/(log(x))^2) (Cohen, 1962). - Amiram Eldar, Jul 27 2020
For all n, A384210(a(n)) = n. - Antti Karttunen, Dec 29 2025
MATHEMATICA
With[{nn=70}, Take[Union[Flatten[Table[p*m^2, {p, Prime[Range[nn]]}, {m, nn}]]], nn]] (* Harvey P. Dale, Dec 02 2014 *)
PROG
(PARI) test(n)=isprime(core(n))
for(n=1, 200, if(test(n), print1(n", ")))
(Python)
from math import isqrt
from sympy import primepi
def A229125(n):
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
kmin = kmax >> 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return n+x-sum(primepi(x//y**2) for y in range(1, isqrt(x)+1))
return bisection(f, n, n) # Chai Wah Wu, Jan 30 2025
CROSSREFS
Subsequence of A026424, and of A265640 (its nonsquare terms).
Cf. A028260, A162642, A229153, A233182 (complement), A358769 (characteristic function), A384210 (its partial sums, a left inverse of this sequence).
Subsequences: (A000040 U A228056), A000396\{6}, A030078, A050997, A054753, A092759, A179643, A179665, A228058, (A246551 U A388983) [terms that are/are not prime powers], A249370 (with p an odd prime), A253653 (triangular terms), A336615 (with p coprime to m), A377820 (powerful terms), A387160, A388980 (even terms).
Cf. also A377816 and array A388982.
Cf. A391733 (numbers k such that A005940(1+k) is in this sequence).
Sequence in context: A026424 A298207 A347453 * A228853 A141832 A066680
KEYWORD
nonn
AUTHOR
Chris Boyd, Sep 14 2013
STATUS
approved