OFFSET
1,1
COMMENTS
The asymptotic density of this sequence is Product_{k>=1} (1 - 1/prime(k)^k) - Product_{k>=1} (1 - 1/prime(k)^(k-1)) = 0.2803209124521781114031... . - Amiram Eldar, Sep 30 2023
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..5000
EXAMPLE
14 = 2*7 = prime(1)^1 * prime(4)^1 is a member as the first prime factor (2) satisfies the first condition, and neither prime factor violates the second condition.
36 = 4*9 = prime(1)^2 * prime(2)^2 is NOT a member because prime(1)^2 does not satisfy the second condition.
45 = 5*9 = prime(3)^1 * prime(2)^2 is a member as the latter prime factor satisfies the first condition, and neither prime factor violates the second condition.
MATHEMATICA
p[n_]:=FactorInteger[n][[All, 1]]; f[n_]:=PrimePi/@p[n];
yQ[n_]:=Select[n/(Prime[f[n]]^f[n]), IntegerQ]!={};
nQ[n_]:=Select[n/(Prime[f[n]]^(f[n]+1)), IntegerQ]=={};
Select[Range[2, 250], yQ[#]&&nQ[#]&] (* Ivan N. Ianakiev, Sep 28 2016 *)
PROG
(Scheme, with Antti Karttunen's IntSeq-library)
(define A276937 (MATCHING-POS 1 1 (lambda (n) (and (not (zero? (A276935 n))) (zero? (A276077 n))))))
(PARI) is(n) = {my(f = factor(n), c = 0, k); for (i=1, #f~, k = primepi(f[i, 1]); if(f[i, 2] > k, return(0), if( f[i, 2] == k, c++))); c > 0; } \\ Amiram Eldar, Sep 30 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Sep 24 2016
STATUS
approved