login
A145108
Multiples of 4 that are primally tight and have strictly ascending powers.
2
4, 8, 16, 32, 64, 108, 128, 256, 324, 512, 648, 972, 1024, 1944, 2048, 2916, 3888, 4096, 5832, 8192, 8748, 11664, 16384, 17496, 23328, 26244, 32768, 34992, 52488, 65536, 67500, 69984, 78732, 104976, 131072, 139968, 157464, 209952, 236196, 262144
OFFSET
1,1
COMMENTS
All numbers of the form 2^k0*p_1^k1*p_2^k2*...*p_n^k_n, where 2 <= k0 < k1 < k2 < ... < k_n and the p_i are n successive primes.
LINKS
PROG
(Haskell)
a145108 n = a145108_list !! (n-1)
a145108_list = filter ((== 0) . (`mod` 4)) a133809_list
-- Reinhard Zumkeller, Apr 14 2015
(Python)
from math import prod
from itertools import count
from functools import lru_cache
from sympy import prime, integer_log
from oeis_sequences.OEISsequences import bisection
def A145108(n):
@lru_cache(maxsize=None)
def h(n): return prod(prime(k)**(k+1) for k in range(1, n+1))
@lru_cache(maxsize=None)
def g(x, m, j): return sum(g(x//(prime(m)**i), m-1, i) for i in range(1, min(j-1, integer_log(x, prime(m))[0])+1)) if m-1 else max(0, min(j, x.bit_length())-2)
def f(x):
c = n+x
for k in count(1):
if h(k)>x:
break
c -= g(x, k, integer_log(x, prime(k))[0]+1)
return c
return bisection(f, n, n) # Chai Wah Wu, Apr 04 2026
(Python)
from itertools import islice
from heapq import heappop, heappush
from sympy import nextprime
def A145108_gen(): # generator of terms if the first n terms are desired.
h, hset = [(4, {2:2})], {4}
while True:
m, ps = heappop(h)
yield m
pf = sorted(ps.keys())
l = len(pf)
for i, p in enumerate(pf):
if i == l-1 or ps[pf[i+1]]>ps[p]+1:
mp = m*p
pt = ps.copy()
pt[p]+=1
if mp not in hset:
heappush(h, (mp, pt))
hset.add(mp)
q = nextprime(p)
pt = ps.copy()
pt[q]=pt[p]+1
mp = m*q**pt[q]
if mp not in hset:
heappush(h, (mp, pt))
hset.add(mp)
A145108_list = list(islice(A145108_gen(), 40)) # Chai Wah Wu, Apr 04 2026
KEYWORD
nonn
AUTHOR
Reikku Kulon, Oct 02 2008
STATUS
approved