OFFSET
1,1
COMMENTS
a(10^k): 2, 40, 1264, 36892, 1067320, 34896904, 1108981540, ... and a(2^k): 2, 4, 12, 38, 70, 218, 796, 2162, 4286, 11714, 37782, 120362, 298796, 843674, 2571822, 6451768, 19197744, 50986622, 143390054, 439876796, 1183838920, ..., . - Robert G. Wilson v
Least term k such that there are just n consecutive terms: 2, 25, 38, 133, 1172, 25141, 19378160, 768173, 196130, 1929805, 15078410, 7017361, ???, 66719843, ..., . - Robert G. Wilson v
MAPLE
A139557 := proc(n) option remember ; local a, i; if n = 1 then RETURN(2) ; fi ; for a from A139557(n-1)+1 do if gcd(a, n+1) = 1 and gcd(a, n) <> 1 then RETURN(a) ; fi ; od: a ; end: seq(A139557(n), n=1..100) ; # R. J. Mathar, May 20 2008
MATHEMATICA
f[1] = 2; f[n_] := f[n] = Block[{k = f[n - 1] + 1}, While[ GCD[n, k] == 1 || GCD[n + 1, k] > 1, k++ ]; k]; Array[f, 57] (* Robert G. Wilson v *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Apr 27 2008
EXTENSIONS
More terms from R. J. Mathar and Robert G. Wilson v, May 20 2008
STATUS
approved