OFFSET
1,2
COMMENTS
a(n) is either 1, prime, or of form 2a(m), m<n.
1 and Heinz numbers of hook integer partitions. The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k). A hook is a partition of the form (n,1,1,...,1). - Gus Wiseman, Sep 15 2018
Numbers whose odd part is noncomposite. - Peter Munn, Aug 06 2020
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
A001227(a(n)) <= 2. - Reinhard Zumkeller, May 01 2012
Number A(x) of a(n) not exceeding x equals 1 + pi(x) + pi(x/2) + pi(x/4) + ..., where pi(x) is the number of primes <= x. If x goes to infinity, A(x)~2*x/log(x) and a(n)~n*log(n)/2 (n-->infinity). - Vladimir Shevelev, Feb 06 2014
EXAMPLE
55 is not a member, as 5*11 is not of the form 2^i * prime.
MATHEMATICA
hookQ[n_]:=MatchQ[DeleteCases[FactorInteger[n], {2, _}], {}|{{_, 1}}];
Select[Range[100], hookQ] (* Gus Wiseman, Sep 15 2018 *)
PROG
(PARI) upTo(lim)=my(v=List([1])); for(e=0, log(lim)\log(2), forprime(p=2, lim>>e, listput(v, p<<e))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Aug 21 2011
(PARI) isok(m) = my(k=m/2^valuation(m, 2)); (k == 1) || isprime(k); \\ Michel Marcus, Mar 16 2023
(Haskell)
a093641 n = a093641_list !! (n-1)
a093641_list = filter ((<= 2) . a001227) [1..]
-- Reinhard Zumkeller, May 01 2012
CROSSREFS
See also A105442.
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Apr 07 2004
STATUS
approved