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.

A062062 Smallest increasing sequence where each term is coprime to preceding three terms.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Jun 12 2001

Keywords

Comments

a(n+125) = a(n) + 210, n >= 7. Also maximal term difference is 4 = a(68)-a(67). - David W. Wilson, Jun 18 2001

Examples

			After 19, 22, 23 the next term is 25 as 24 has 2 as common divisor with 22.
		

Crossrefs

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