OFFSET
1,2
COMMENTS
A variant of the sequence A267758 where the relation has to hold for prime numbers rather than for squarefree numbers. In contrast to that sequence we have many "lines" here (when the property occurs for consecutive terms), roughly proportional to n, 2n, 3n, ... Here we also have duplicate terms (which we could exclude explicitly), for n <= 1000 this happens 19 times.
LINKS
M. F. Hasler, Table of n, a(n) for n = 1..1000
PROG
(PARI) {a(n, show=0, is=x->issquarefree(x), a=[1], L=0, U=[])->while(#a<n, show&&if(type(show)=="t_STR", write(show, #a, " ", a[#a]), print1(a[#a]", ")); if(a[#a]>L+1, U=setunion(U, [a[#a]]), L++; while(#U&&U[1]<=L+1, U=U[^1]; L++)); a=concat(a, if(is(a[#a]), L+1, a[#a]+a[#a-1]))); if(type(show)=="t_VEC", a, a[#a])}
CROSSREFS
KEYWORD
nonn,look
AUTHOR
M. F. Hasler, Jan 26 2016
STATUS
approved