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.

A256189 a(n) = n if n <= 3, otherwise a(n) is the smallest number not occurring earlier such that gcd(a(n-2), a(n)) is a prime and gcd(a(n-1), a(n)) = 1.

Original entry on oeis.org

1, 2, 3, 4, 9, 10, 21, 5, 6, 25, 8, 15, 14, 27, 7, 12, 35, 22, 45, 11, 20, 33, 26, 51, 13, 17, 39, 34, 57, 16, 19, 18, 95, 28, 55, 38, 65, 24, 85, 46, 75, 23, 36, 115, 58, 69, 29, 30, 203, 32, 49, 50, 63, 44, 87, 62, 81, 31, 42, 155, 52, 93, 70, 99, 64, 77, 54
Offset: 1

Views

Author

Vladimir Shevelev, Mar 19 2015

Keywords

Comments

The sequence is infinite because the term P*p is always a candidate for a(n), where p is a prime factor of a(n-2) and P is a prime not dividing any of a(1),..., a(n-1).
Moreover, this sequence conjecturally is a permutation of the positive integers: the proof i-v for A098550 applies with essentially no changes, while vi still has a difficulty.

Crossrefs

Programs

  • Mathematica
    a[1]=1; a[2]=2; a[3]=3;
    A256189 = {1, 2, 3};
    a[n_] := a[n] = For[k=4, True, k++, If[FreeQ[A256189, k], If[PrimeQ[GCD[ a[n-2], k]] && GCD[a[n-1], k] == 1, AppendTo[A256189, k]; Return[k]]]];
    A256189 = Array[a, 100] (* Jean-François Alcover, Aug 02 2018 *)

Extensions

More terms from Peter J. C. Moses, Mar 24 2015