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.

A337687 a(1) = 2; for n > 1, a(n) = smallest number not occurring earlier which shares a prime factor with a(n-1) and also has a prime factor which is not a factor of a(n-1).

Original entry on oeis.org

2, 6, 10, 12, 14, 18, 15, 20, 22, 24, 21, 28, 26, 30, 33, 36, 34, 38, 40, 35, 42, 39, 45, 48, 44, 46, 50, 52, 54, 51, 57, 60, 55, 65, 70, 58, 56, 62, 66, 63, 69, 72, 68, 74, 76, 78, 75, 80, 82, 84, 77, 88, 86, 90, 85, 95, 100, 92, 94, 96, 87, 93, 99, 102, 98, 91, 104, 106, 108, 105, 110, 112
Offset: 1

Views

Author

Scott R. Shannon, Nov 28 2020

Keywords

Comments

Like A336957 no prime or prime power can be a term as if it shared a prime factor with the previous term it would then not contain a prime factor not in the previous term. It is likely all other composite numbers appear.

Examples

			a(2) = 6 as 2*3 = 6, where 2 is a prime factor shared with a(1) = 2 and 3 is a prime factor which is not a factor of a(1).
a(3) = 10 as 2*5 = 10, where 2 is a prime factor shared with a(2) = 6 and 5 is a prime factor which is not a factor of a(2).
a(4) = 12 as 2*2*3 = 12, where 2 is a prime factor shared with a(3) = 10 and 3 is a prime factor which is not a factor of a(3).
		

Crossrefs

Programs

  • PARI
    isok(k, fprec, v) = {if (#select(x->(x==k), v) == 0, my(f = Set(factor(k)[,1]), finter = setintersect(f, fprec)); #setintersect(f, fprec) && #setminus(f, fprec););}
    lista(nn) = {my(va= vector(nn)); va[1] = 2; for (n=2, nn, my(k=2, fprec = Set(factor(va[n-1])[,1])); while (! isok(k, fprec, va), k++); va[n] = k;); va;} \\ Michel Marcus, Nov 30 2020