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.

A213918 a(n) = smallest possible element of a set of n positive integers s_1, s_2, ..., s_n such that for i != j, |s_i - s_j| = gcd(s_i, s_j), where |x| denotes absolute value.

Original entry on oeis.org

1, 1, 2, 6, 36, 210, 14976, 552720, 309582000
Offset: 1

Views

Author

Phil Scovis, Mar 04 2013

Keywords

Examples

			Examples of sets for the first few cases:
{1},
{1,2},
{2, 3, 4},
{6, 8, 9, 12},
{36, 40, 42, 45, 48},
{210, 216, 220, 224, 225, 240},
{14976, 14980, 14994, 15000, 15008, 15015, 15120},
{552720, 552825, 552960, 553000, 553014, 553140, 553280, 554400},
{309582000, 309583680, 309583800, 309583872, 309583890, 309584000, 309584025, 309584100, 309584160}.
		

Crossrefs

Programs

  • Mathematica
    ok[v_, n_] := v == Select[v, GCD[#, n] == Abs[n - #] &];
    ric[p_, cc_, k_] :=
    If[Length@p == k, sol = p; True,
      Block[{c = cc, x, r = False},
       While[c != {}, x = First@c; c = Rest@c;
        If[p == Select[p, GCD[#, x] == Abs[x - #] &] &&
         ric[Append[p, x], c, k], r = True; Break[]]]; r]];
    a[k_] := Block[{n = 1, d}, While[Length[d = Divisors@n] < k - 1 ||
    !ric[{n}, n + d, k], n++]; n];
    Do[Print[n, " ", a[n], " ", sol], {n, 7}]

Extensions

Corrected (with Mathematica program) by Giovanni Resta, Mar 05 2013. Entry revised by N. J. A. Sloane, Mar 05 2013
a(8) from Robert Gerbicz, Mar 05 2013
a(9) from Robert Gerbicz, Mar 06 2013