A339746 Positive integers of the form 2^i*3^j*k, gcd(k,6)=1, and i == j (mod 3).
1, 5, 6, 7, 8, 11, 13, 17, 19, 23, 25, 27, 29, 30, 31, 35, 36, 37, 40, 41, 42, 43, 47, 48, 49, 53, 55, 56, 59, 61, 64, 65, 66, 67, 71, 73, 77, 78, 79, 83, 85, 88, 89, 91, 95, 97, 101, 102, 103, 104, 107, 109, 113, 114, 115, 119, 121, 125, 127, 131, 133, 135
Offset: 1
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Sequences of positive integers in a multiplicative subgroup of positive rationals generated by a set S and A215848: S={}: A007310, S={6}: A064615, S={3,4}: A003159, S={2,9}: A007417, S={4,6}: A036668, S={3,8}: A191257, S={4,9}: A339690, S={6,8}: this sequence.
Programs
-
Maple
N:= 1000: # for terms <= N R:= {}: for k1 from 0 to floor(N/6) do for k0 in [1,5] do k:= k0 + 6*k1; for j from 0 while 3^j*k <= N do for i from (j mod 3) by 3 do x:= 2^i * 3^j * k; if x > N then break fi; R:= R union {x} od od od od: sort(convert(R,list)); # Robert Israel, Apr 08 2021
-
Mathematica
Select[Range[130], Mod[IntegerExponent[#, 2] - IntegerExponent[#, 3], 3] == 0 &]
-
PARI
isA339746 = A372573; \\ Antti Karttunen, Jun 04 2024
-
Python
from sympy import factorint def ok(n): f = factorint(n, limit=4) i, j = 0 if 2 not in f else f[2], 0 if 3 not in f else f[3] return (i-j)%3 == 0 def aupto(limit): return [m for m in range(1, limit+1) if ok(m)] print(aupto(200)) # Michael S. Branicky, Mar 26 2021
-
Python
from itertools import count def A339746(n): def bisection(f,kmin=0,kmax=1): while f(kmax) > kmax: kmax <<= 1 kmin = kmax >> 1 while kmax-kmin > 1: kmid = kmax+kmin>>1 if f(kmid) <= kmid: kmax = kmid else: kmin = kmid return kmax def f(x): c = n+x for i in range(x.bit_length()+1): i2 = 1<x: break m = x//k c -= (m-1)//6+(m-5)//6+2 return c return bisection(f,n,n) # Chai Wah Wu, Feb 12 2025
Formula
a(n) ~ (91/43)*n.
Comments