login
A085156
Powers of primes or powers of semiprimes.
4
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23, 25, 26, 27, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 43, 46, 47, 49, 51, 53, 55, 57, 58, 59, 61, 62, 64, 65, 67, 69, 71, 73, 74, 77, 79, 81, 82, 83, 85, 86, 87, 89, 91, 93, 94, 95, 97, 100, 101
OFFSET
1,2
COMMENTS
m is a term iff A067029(m) = A071178(m) and A001221(m) <= 2.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
MATHEMATICA
q[n_] := Module[{e = FactorInteger[n][[;; , 2]]}, Length[e] == 1 || (Length[e] == 2 && Equal @@ e)]; Select[Range[100], q] (* Amiram Eldar, Apr 19 2025 *)
PROG
(PARI) is(n)=my(f=factor(n)[, 2]); #f<2 || (#f==2 && f[1]==f[2]) \\ Charles R Greathouse IV, Oct 19 2015
(Python)
from math import isqrt
from sympy import primepi, primerange, integer_nthroot
from oeis_sequences.OEISsequences import bisection
def A085156(n):
def f(x): return int(n+x-1+sum(((t:=primepi(s:=isqrt(y:=integer_nthroot(x, k)[0])))*(t-1)>>1)-sum(primepi(y//p) for p in primerange(s+1))-(primepi(y) if k&1 else 0) for k in range(1, x.bit_length())))
return bisection(f, n, n) # Chai Wah Wu, Jan 02 2026
CROSSREFS
Union of A000961 and A085155.
Sequence in context: A303554 A325328 A316521 * A342522 A102466 A354144
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jun 21 2003
STATUS
approved