OFFSET
1,2
COMMENTS
For any k > 0, let f_k be the lexicographically earliest sequence of distinct positive integers such that the product of two consecutive terms is always divisible by k:
- in particular:
f_1 = f_2 = A000027,
f_3 = A006368,
f_4 = a (this sequence),
f_6 = A330531,
- f_k is a permutation of the natural numbers,
- f_k(1) = 1, f_k(2) = max(2, k),
- if k is prime, then f_k corresponds to the integers that are not multiple of k interspersed with the integers that are multiple of k.
Apparently:
- for m > 0, the m-th run of consecutive terms such that gcd(a(n), 4) = 2 has A153893(m+1) terms,
- for m > 1, the m-th run of consecutive terms such that gcd(a(n), 4) = 1 or 4 has A068156(m+1) terms.
LINKS
EXAMPLE
The first terms, alongside their product with the next term, are:
n a(n) a(n)*a(n+1)
-- ---- -----------
1 1 4
2 4 8
3 2 12
4 6 48
5 8 24
6 3 36
7 12 60
8 5 80
9 16 112
10 7 140
PROG
(PARI) s=0; v=1; for (n=1, 10 000, print (n " " v); s+=2^v; for (w=1, oo, if (!bittest(s, w) && (v*w)%4==0, v=w; break)))
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Dec 17 2019
STATUS
approved