cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A330531 Lexicographically earliest sequence of distinct positive integers such that the product of two consecutive terms is always divisible by 6.

Original entry on oeis.org

1, 6, 2, 3, 4, 9, 8, 12, 5, 18, 7, 24, 10, 15, 14, 21, 16, 27, 20, 30, 11, 36, 13, 42, 17, 48, 19, 54, 22, 33, 26, 39, 28, 45, 32, 51, 34, 57, 38, 60, 23, 66, 25, 72, 29, 78, 31, 84, 35, 90, 37, 96, 40, 63, 44, 69, 46, 75, 50, 81, 52, 87, 56, 93, 58, 99, 62
Offset: 1

Views

Author

Rémy Sigrist, Dec 17 2019

Keywords

Comments

This sequence is a permutation of the natural numbers with inverse A330577.
Apparently:
- for m > 1, the m-th run of consecutive terms such that gcd(6, a(n)) = 1 or 6 has 4*m-3 terms,
- for m > 1, the m-th run of consecutive terms such that gcd(6, a(n)) = 2 or 3 has 4*m-1 terms.

Examples

			The first terms, alongside their product with the next term, are:
  n   a(n)  a(n)*a(n+1)
  --  ----  -----------
   1     1            6
   2     6           12
   3     2            6
   4     3           12
   5     4           36
   6     9           72
   7     8           96
   8    12           60
   9     5           90
  10    18          126
		

Crossrefs

See A330530 for a similar sequence and additional comments.
Cf. A330577 (inverse).

Programs

  • 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)%6==0, v=w; break)))