login
A067019
Odd numbers with an odd number of prime factors (counted with multiplicity).
24
3, 5, 7, 11, 13, 17, 19, 23, 27, 29, 31, 37, 41, 43, 45, 47, 53, 59, 61, 63, 67, 71, 73, 75, 79, 83, 89, 97, 99, 101, 103, 105, 107, 109, 113, 117, 125, 127, 131, 137, 139, 147, 149, 151, 153, 157, 163, 165, 167, 171, 173, 175, 179, 181, 191, 193, 195, 197, 199
OFFSET
1,1
COMMENTS
Subsequence of odd terms of A026424. - Michel Marcus, Jul 04 2015
The sequence a(1)=0, for n>1 a(n) is smallest number such that for all s,t,m<n a(n) != a(s)*a(t)+a(m) is the same as this one from a(3). - Anders Hellström, Jul 08 2015
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000 (first 1000 terms from Harry J. Smith)
FORMULA
a(n) = A369966(n)/2. - Antti Karttunen, Jan 21 2026
EXAMPLE
a(9) = 27, which is odd with an odd number of prime factors, i.e., 3.
MATHEMATICA
Select[Range[1, 301, 2], OddQ[PrimeOmega[#]]&] (* Harvey P. Dale, Feb 15 2025 *)
PROG
(PARI) isok(k) = { k%2 == 1 && bigomega(k)%2 == 1 } \\ Harry J. Smith, Apr 25 2010
(Python)
from math import isqrt, prod
from sympy import primerange, integer_nthroot, primepi
from oeis_sequences.OEISsequences import bisection
def A067019(n):
def g(x, a, b, c, m): yield from (((d, ) for d in enumerate(primerange(b, isqrt(x//c)+1), a)) if m==2 else (((a2, b2), )+d for a2, b2 in enumerate(primerange(b, integer_nthroot(x//c, m)[0]+1), a) for d in g(x, a2, b2, c*b2, m-1)))
def f(x): return int(n+2+sum(sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x, 0, 1, 1, m)) for m in range(2, x.bit_length()+1, 2))+sum(sum(primepi((x>>1)//prod(c[1] for c in a))-a[-1][0] for a in g(x>>1, 0, 1, 1, m)) for m in range(2, x.bit_length(), 2)))
return bisection(f, n, n) # Chai Wah Wu, Dec 19 2025
CROSSREFS
Intersection of A005408 and A026424.
Disjoint union of A359151 and A359153.
Half A369966.
Setwise difference A005408 \ A046337.
Setwise difference A335657 \ A036348.
Setwise difference A359772 \ A063745.
Cf. A353558 (characteristic function), A369258 (its inverse Möbius transform).
Positions of the terms of the form 4u+2 (A016825) in A358669 (and in A358765).
Positions of negative terms in A166698.
Positions of odd terms in A366371.
Odd terms of A373142, subsequence of A359373.
Subsequences: A002556, A056912, A381218.
Cf. also A098903.
Sequence in context: A385757 A309203 A176847 * A381218 A132106 A242393
KEYWORD
nonn
AUTHOR
Shyam Sunder Gupta, Feb 16 2002
STATUS
approved