A126287 a(1) = 1, a(2) = 1, a(n) = n * LeastPrimeFactor(n-1) / LeastPrimeFactor(n).
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
Examples
a(6) = 6 * LeastPrimeFactor(5) / LeastPrimeFactor(6) = 6 * 5 / 2 = 15
Links
- Ivan Neretin, Table of n, a(n) for n = 1..10000
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 *)