login
A330530
Lexicographically earliest sequence of distinct positive integers such that the product of two consecutive terms is always divisible by 4.
3
1, 4, 2, 6, 8, 3, 12, 5, 16, 7, 20, 9, 24, 10, 14, 18, 22, 26, 28, 11, 32, 13, 36, 15, 40, 17, 44, 19, 48, 21, 52, 23, 56, 25, 60, 27, 64, 29, 68, 30, 34, 38, 42, 46, 50, 54, 58, 62, 66, 70, 72, 31, 76, 33, 80, 35, 84, 37, 88, 39, 92, 41, 96, 43, 100, 45, 104
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.
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
Cf. A006368, A068156, A153893, A330531 (f_6), A330576 (inverse).
Sequence in context: A306874 A114478 A367882 * A302659 A363705 A134239
KEYWORD
nonn,easy,look
AUTHOR
Rémy Sigrist, Dec 17 2019
STATUS
approved