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.

A126287 a(1) = 1, a(2) = 1, a(n) = n * LeastPrimeFactor(n-1) / LeastPrimeFactor(n).

Original entry on oeis.org

1, 1, 2, 6, 2, 15, 2, 28, 6, 15, 2, 66, 2, 91, 10, 24, 2, 153, 2, 190, 14, 33, 2, 276, 10, 65, 18, 42, 2, 435, 2, 496, 22, 51, 14, 90, 2, 703, 26, 60, 2, 861, 2, 946, 30, 69, 2, 1128, 14, 175, 34, 78, 2, 1431, 22, 140, 38, 87, 2, 1770, 2, 1891, 42, 96, 26, 165, 2, 2278, 46, 105
Offset: 1

Views

Author

Lior Manor, Dec 25 2006

Keywords

Examples

			a(6) = 6 * LeastPrimeFactor(5) / LeastPrimeFactor(6) = 6 * 5 / 2 = 15
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get a(1) to a(n)
    a[1]:= 1: a[2]:= 1:
    b:= 2:
    for n from 3 to N do
    c:= min(numtheory:-factorset(n));
    a[n]:= n*b/c;
    b:= c;
    od:
    seq(a[n],n=1..N); # Robert Israel, May 20 2015
  • Mathematica
    a[1] := 1; a[2] := 1; a[n_] := n*FactorInteger[n - 1][[1, 1]]/FactorInteger[n][[1, 1]]; Table[a[n], {n, 70}] (* Ivan Neretin, May 20 2015 *)

Formula

a(n) = A032742(n)*A020639(n-1), for n>2. - Michel Marcus, May 20 2015