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.

A320672 a(n) is the smallest divisor of (n+2)*(n+3) not yet in the sequence.

Original entry on oeis.org

1, 2, 4, 3, 6, 7, 8, 5, 10, 11, 12, 13, 14, 15, 16, 9, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 17, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 33, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 44, 56, 57, 58, 59, 60, 61, 62, 63, 64, 55, 66, 67, 68, 69, 70
Offset: 0

Views

Author

Enrique Navarrete, Oct 19 2018

Keywords

Comments

a(n) is the smallest divisor of A002378(n+2) not yet in the sequence.
The numbers that are smaller than the preceding terms are: 3, 5, 9, 17, 33, 44, 55, 65, 90, 99, 143, 208, ...

Examples

			For n = 0, a(0) = 1 since 1 is the smallest divisor of 6 not yet in the sequence.
For n = 3, a(3) = 3 since 3 is the smallest divisor of 30 not yet in the sequence.
		

Crossrefs

Programs

  • Mathematica
    s = {}; Do[d = Divisors[(n + 2)(n + 3)]; Do[d1 = d[[k]]; If[FreeQ[s, d1], AppendTo[s, d1]; Break[]], {k, Length[d]}], {n, 0, 100}]; s (* Amiram Eldar, Nov 14 2018 *)
  • PARI
    toadd(n, v) = {fordiv(n, d, if (!vecsearch(v, d), return(d)); ); }
    lista(nn) = {v = []; for (n = 0, nn, newt = toadd((n+2)*(n+3), v); print1(newt, ", "); v = vecsort(concat(v, newt)); ); } \\ Michel Marcus, Nov 20 2018