A062062 Smallest increasing sequence where each term is coprime to preceding three terms.
1, 2, 3, 5, 7, 8, 9, 11, 13, 14, 15, 17, 19, 22, 23, 25, 27, 28, 29, 31, 33, 34, 35, 37, 39, 41, 43, 44, 45, 47, 49, 52, 53, 55, 57, 58, 59, 61, 63, 64, 65, 67, 69, 71, 73, 74, 75, 77, 79, 82, 83, 85, 87, 88, 89, 91, 93, 94, 95, 97, 99, 101, 103, 104, 105, 107, 109, 113
Offset: 1
Examples
After 19, 22, 23 the next term is 25 as 24 has 2 as common divisor with 22.
Links
- T. D. Noe, Table of n, a(n) for n=1..1000
- Hsien-Kuei Hwang, Mihyun Kang, Guan-Huei Duh, Asymptotic Expansions for Sub-Critical Lagrangean Forms, LIPIcs Proceedings of Analysis of Algorithms 2018, Vol. 110. Schloss Dagstuhl-Leibniz-Zentrum für Informatik, 2018.
Programs
-
Mathematica
a[ 1 ]=1; a[ 2 ]=2; a[ 3 ]=3; a[ n_ ] := a[ n ]=Module[ {}, b=a[ n-1 ]; While[ GCD[ b, a[ n-1 ] ]>1||GCD[ b, a[ n-2 ] ]> 1||GCD[ b, a[ n-3 ] ]>1, b++ ]; b ] Array[ a, 100 ]
-
PARI
{ for (n=1, 1000, if (n>3, until (gcd(a, a1)==1 && gcd(a, a2)==1 && gcd(a, a3)==1, a++); a3=a2; a2=a1; a1=a, if (n==1, a=a3=1, if (n==2, a=a2=2, a=a1=3))); write("b062062.txt", n, " ", a) ) } \\ Harry J. Smith, Jul 31 2009
Extensions
More terms from Erich Friedman, Jun 15 2001
Clarified by Charles R Greathouse IV, Aug 02 2010
Comments