A333978 Numbers of the form b_1 * b_2 * ... * b_t, where b_1 = 1 and b_(i + 1) - b_i = 0 or 1.
1, 2, 4, 6, 8, 12, 16, 18, 24, 32, 36, 48, 54, 64, 72, 96, 108, 120, 128, 144, 162, 192, 216, 240, 256, 288, 324, 360, 384, 432, 480, 486, 512, 576, 600, 648, 720, 768, 864, 960, 972, 1024, 1080, 1152, 1200, 1296, 1440, 1458, 1536, 1728, 1800, 1920, 1944, 2048
Offset: 1
Examples
The first 11 terms can be written as 1 = 1 2 = 1 * 2 4 = 1 * 2 * 2 6 = 1 * 2 * 3 8 = 1 * 2 * 2 * 2 12 = 1 * 2 * 2 * 3 16 = 1 * 2 * 2 * 2 * 2 18 = 1 * 2 * 3 * 3 24 = 1 * 2 * 3 * 4 or 1 * 2 * 2 * 2 * 3 32 = 1 * 2 * 2 * 2 * 2 * 2 36 = 1 * 2 * 2 * 3 * 3
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Peter Kagey)
Programs
-
PARI
is(n) = if(n==1, return(1)); my(f = factor(n), p = f[#f~, 1]); n%p! == 0 \\ David A. Corneth, Sep 05 2022
-
Python
import heapq from math import factorial from sympy import nextprime from itertools import islice def agen(): # generator of terms oldv, h, primes, nextp, nextfact = 0, [(1, 1)], [], 0, 0 while True: v, maxp = heapq.heappop(h) if v != oldv: yield v; oldv = v while nextfact < v: nextp = nextprime(nextp); nextfact = factorial(nextp) primes.append(nextp); heapq.heappush(h, (nextfact, nextp)) for p in primes: if p <= maxp: heapq.heappush(h, (v*p, max(maxp, p))) else: break print(list(islice(agen(), 60))) # Michael S. Branicky, Aug 20 2022
Comments