login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A299442
Lexicographically earliest sequence of distinct positive terms such that, for any n > 1, if prime(k) is the greatest prime factor of a(n) then k divides a(n+1) (where prime(k) denotes the k-th prime).
3
1, 2, 3, 4, 5, 6, 8, 7, 12, 10, 9, 14, 16, 11, 15, 18, 20, 21, 24, 22, 25, 27, 26, 30, 33, 35, 28, 32, 13, 36, 34, 42, 40, 39, 48, 38, 56, 44, 45, 51, 49, 52, 54, 46, 63, 60, 57, 64, 17, 70, 68, 77, 50, 66, 55, 65, 72, 58, 80, 69, 81, 62, 88, 75, 78, 84, 76
OFFSET
1,2
COMMENTS
In other words, for any n > 1, A061395(a(n)) divides a(n+1).
See also A299441 for the variant involving least prime factors.
LINKS
Rémy Sigrist, Colored scatterplot of the first 100000 terms (where the color is function of A006530(a(n-1)))
EXAMPLE
The first terms, alongside A061395(a(n)), are:
n a(n) A061395(a(n))
-- ---- -------------
1 1 0
2 2 1
3 3 2
4 4 1
5 5 3
6 6 2
7 8 1
8 7 4
9 12 2
10 10 3
11 9 2
12 14 4
13 16 1
14 11 5
15 15 3
16 18 2
17 20 3
18 21 4
19 24 2
20 22 5
MAPLE
N:= 1000: # to get terms before the first term > N
with(numtheory):
V:= Vector(N):
A[1]:= 1: A[2]:= 2: V[1]:= 1: V[2]:= 1:
found:= true:
for n from 2 while found do
found:= false;
k:= pi(max(factorset(A[n])));
for v from k to N by k do
if V[v] = 0 then
V[v]:= 1;
A[n+1]:= v;
found:= true;
break
fi
od
od:
seq(A[i], i=1..n-1); # Robert Israel, Feb 18 2018
MATHEMATICA
max = 100; Clear[a, V]; a[_] = 0; V[_] = 0; a[1] = 1; a[2] = 2; V[1] = 1; V[2] = 1; found = True; For[n = 2, found, n++, found = False; k = PrimePi[ FactorInteger[a[n]][[-1, 1]]]; For[v = k, v <= max, v += k, If[V[v] == 0, V[v] = 1; a[n+1] = v; found = True; Break[]]]]; DeleteCases[ Array[a, max], 0] (* Jean-François Alcover, Feb 23 2018, after Robert Israel *)
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Feb 10 2018
STATUS
approved