OFFSET
1,2
COMMENTS
All terms from A095848 belong to this sequence.
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
FORMULA
a(1) = 1. If n > 1, a(n) = a(n-1) + A368777(a(n-1)). - Hal M. Switkay, Jan 26 2024
EXAMPLE
After 6, none of 7,8,9,10 or 11 are in the sequence since they are not divisible by 1,2 and 3 as 6 is. 12 is a term, but is now divisible by 1,2,3 and 4, adding a new constraint on subsequent terms.
After 24, 30 is not in the sequence because 24 is divisible by all numbers from 1 to 4 and 30 is not divisible by 4. But 36, which is divisible by all of 1 through 4, is a term.
PROG
(PARI) consecd(a) = {d = divisors(a); for (i=2, #d, if (d[i] - d[i-1] > 1, return(i-1)); ); return(a); }
findnext(a) = {nconsd = consecd(a); na = a + 1; while (consecd(na) < nconsd, na++); na; }
lista(nn) = {a = 1; print1(a, ", "); for (n=1, nn, a = findnext(a); print1(a, ", "); ); } \\ Michel Marcus, May 11 2014
(PARI)
first(n) = {
my(res = vector(n), step = 1, oldm = 1, newm = 1);
res[1] = 1;
for(i = 2, n,
while(res[i-1] % (newm+1) == 0,
newm++;
);
if(newm > oldm,
step = lcm([step, lcm([oldm..newm])]);
oldm = newm
);
res[i] = res[i-1]+step
);
res
} \\ David A. Corneth, Jan 28 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
J. Lowell, May 10 2014
EXTENSIONS
More terms from Michel Marcus, May 11 2014
STATUS
approved