A335099 Lexicographically earliest sequence of distinct integers greater than 1 such that a(n) mod a(i)^2 >= a(i) for all i < n.
2, 3, 6, 7, 14, 15, 22, 23, 26, 30, 31, 34, 35, 42, 43, 58, 59, 62, 66, 67, 70, 71, 78, 79, 86, 87, 94, 95, 106, 107, 114, 115, 122, 123, 130, 131, 134, 138, 139, 142, 143, 158, 159, 166, 167, 170, 174, 175, 178, 179, 186, 187, 194, 195, 210, 211, 214, 215, 222
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
N:= 1000: # for terms <= N R:= NULL: Cands:= [$2..N]: while Cands <> [] do r:= Cands[1]; R:= R,r; Cands:= select(t -> t mod r^2 >= r, Cands[2..-1]); od: R; # Robert Israel, Sep 05 2024
-
PARI
seq(n)={my(a=vector(n), k=1); for(n=1, #a, while(1, k++; my(f=1); for(i=1, n-1, if(k%a[i]^2Andrew Howroyd, Sep 12 2020
-
Python3
from math import sqrt length=100 s=list(range(2,length)) for p in range(int(sqrt(length))): x = s[p] if x==0 : continue for i,e in enumerate(s): if e>x and e%(x*x)
Extensions
Terms a(29) and beyond from Andrew Howroyd, Sep 12 2020
Comments