OFFSET
1,1
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, C program for A145278
PROG
(PARI) {m=2000; v=vector(m); z=2*m; u=vectorsmall(z); k=1; for(n=1, m, while(u[k], k++); v[n]=k; u[k]=1; j=n-1; p=k; while(j>0&&(p=p*v[j])<=z, u[p]=1; j--)); h=1; i=1; while(i<=m, if(h==v[i], i++, print1(h, ", ")); h++)}
(C) /* See Links section. */
(Python)
from operator import mul
from itertools import count, accumulate, islice
from collections import deque
def A145278_gen(): # generator of terms
aset, alist = set(), deque()
for k in count(1):
if k in aset:
aset.remove(k)
yield k
else:
aset |= set(k*d for d in accumulate(alist, mul))
alist.appendleft(k)
CROSSREFS
KEYWORD
nonn
AUTHOR
Klaus Brockhaus, Oct 06 2008
STATUS
approved
