OFFSET
1,2
COMMENTS
By avoiding arithmetic progressions, at most 2/3 of the numbers up to a(n) are in the sequence. The sequence doesn't contain 3 consecutive powers in arithmetic progression for any base c.
Where a(n)+1 = a(n+1): 1, 3, 5, 7, 9, 12, 17, 21, 23, 26, 30, 32, 37, 39, etc. - Robert G. Wilson v, Jul 02 2017
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
Math StackExchange, A sequence that avoids both arithmetic and geometric progression (2014)
FORMULA
a(n) >= 3n/2 for n > 2.
EXAMPLE
5 is in the sequence because 1,2,5 is neither an arithmetic progression nor a geometric progression.
PROG
(PARI) {my(a=[1, 2]);
for(x=3, 100,
if(#select(r->#select(q->q==2*r, b)==0, b=vecsort(apply(r->x-r, a)))==#a && #select(r->#select(q->q==r^2, b)==0, b=vecsort(apply(r->x/r, a)))==#a, a=concat(a, x))); a
}
(PARI) first(n)=my(v=vector(n)); v[1]=1; for(k=2, n, my(avoid=List(), t, last=v[k-1]); for(i=2, k-1, for(j=1, i-1, t=2*v[i]-v[j]; if(t>last, listput(avoid, t)); if(denominator(t=v[i]^2/v[j])==1 && t>last, listput(avoid, t)))); avoid=Set(avoid); for(i=v[k-1]+1, v[k-1]+#avoid+1, if(!setsearch(avoid, i), v[k]=i; break))); v \\ Charles R Greathouse IV, Jun 29 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Roderick MacPhee, Jun 28 2017
EXTENSIONS
More terms from Alois P. Heinz, Jun 28 2017
STATUS
approved