This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A093641 #42 Feb 02 2025 20:13:45 %S A093641 1,2,3,4,5,6,7,8,10,11,12,13,14,16,17,19,20,22,23,24,26,28,29,31,32, %T A093641 34,37,38,40,41,43,44,46,47,48,52,53,56,58,59,61,62,64,67,68,71,73,74, %U A093641 76,79,80,82,83,86,88,89,92,94,96,97,101,103,104,106,107,109,112 %N A093641 Numbers of form 2^i * prime(j), i>=0, j>0, together with 1. %C A093641 a(n) is either 1, prime, or of form 2a(m), m<n. %C A093641 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 %C A093641 Numbers whose odd part is noncomposite. - _Peter Munn_, Aug 06 2020 %H A093641 Charles R Greathouse IV, <a href="/A093641/b093641.txt">Table of n, a(n) for n = 1..10000</a> %F A093641 A001227(a(n)) <= 2. - _Reinhard Zumkeller_, May 01 2012 %F A093641 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 %e A093641 55 is not a member, as 5*11 is not of the form 2^i * prime. %t A093641 hookQ[n_]:=MatchQ[DeleteCases[FactorInteger[n],{2,_}],{}|{{_,1}}]; %t A093641 Select[Range[100],hookQ] (* _Gus Wiseman_, Sep 15 2018 *) %o A093641 (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 %o A093641 (PARI) isok(m) = my(k=m/2^valuation(m,2)); (k == 1) || isprime(k); \\ _Michel Marcus_, Mar 16 2023 %o A093641 (Haskell) %o A093641 a093641 n = a093641_list !! (n-1) %o A093641 a093641_list = filter ((<= 2) . a001227) [1..] %o A093641 -- _Reinhard Zumkeller_, May 01 2012 %o A093641 (Python) %o A093641 from sympy import primepi %o A093641 def A093641(n): %o A093641 def bisection(f,kmin=0,kmax=1): %o A093641 while f(kmax) > kmax: kmax <<= 1 %o A093641 kmin = kmax >> 1 %o A093641 while kmax-kmin > 1: %o A093641 kmid = kmax+kmin>>1 %o A093641 if f(kmid) <= kmid: %o A093641 kmax = kmid %o A093641 else: %o A093641 kmin = kmid %o A093641 return kmax %o A093641 def f(x): return n-1+x-sum(primepi(x>>i) for i in range(x.bit_length())) %o A093641 return bisection(f,n,n) # _Chai Wah Wu_, Feb 02 2025 %Y A093641 A093640(a(n)) = A000005(a(n)); A000040 and A000079 are subsequences. %Y A093641 A105440 is a subsequence, see also A105442. - _Reinhard Zumkeller_, Apr 09 2005 %Y A093641 Cf. A078822, A007088. %Y A093641 Complement of A105441; A001221(a(n))<=2; A005087(a(n))<=1; A087436(a(n))<=1. %Y A093641 See also A105442. %Y A093641 Union of A038550 and A000079, see also A008578. %Y A093641 Cf. A082733, A153452, A296188, A296561, A300121, A304438, A305940, A317554. %Y A093641 Cf. A000265 (odd part), A008578 (noncomposite). %K A093641 nonn,easy %O A093641 1,2 %A A093641 _Reinhard Zumkeller_, Apr 07 2004