A177961 a(1)=2. Otherwise the average of the smallest prime divisors of 2n-1 and 2n+1.
2, 4, 6, 5, 7, 12, 8, 10, 18, 11, 13, 14, 4, 16, 30, 17, 4, 21, 20, 22, 42, 23, 25, 27, 5, 28, 29, 4, 31, 60, 32, 4, 36, 35, 37, 72, 38, 5, 43, 41, 43, 44, 4, 46, 48, 5, 4, 51, 50, 52, 102, 53, 55, 108, 56, 58, 59, 4, 5, 9, 7, 4, 66, 65, 67, 69, 5, 70, 138, 71, 7, 8, 4, 76, 150, 77, 4, 81
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[2] cat [1/2*(Min(PrimeFactors(2*n-1))+ Min(PrimeFactors(2*n+1))):n in [2..80]]; // Vincenzo Librandi, Feb 07 2016
-
Maple
N:= 100: # to get a(1) to a(N) S:= [1,seq(min(numtheory:-factorset(2*i-1)),i=2..N+1)]: (S[2..-1]+S[1..-2])/2; # Robert Israel, Jul 31 2015
-
Mathematica
Table[If[n == 1, 2, Mean[{FactorInteger[2 n - 1][[1, 1]], FactorInteger[2 n + 1][[1, 1]]}]], {n, 78}] (* Michael De Vlieger, Aug 02 2015 *)
-
PARI
a(n) = if (n==1, 2, (vecmin(factor(2*n-1)[,1]) + vecmin(factor(2*n+1)[,1]))/2); \\ Michel Marcus, Feb 07 2016
Formula
Extensions
More terms from R. J. Mathar, May 31 2010
Comments