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.

Showing 1-3 of 3 results.

A051884 Smallest number larger than the previous term which is not a prime but is relatively prime to the previous term.

Original entry on oeis.org

1, 4, 9, 10, 21, 22, 25, 26, 27, 28, 33, 34, 35, 36, 49, 50, 51, 52, 55, 56, 57, 58, 63, 64, 65, 66, 85, 86, 87, 88, 91, 92, 93, 94, 95, 96, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 143, 144, 145, 146, 147, 148, 153, 154, 155, 156, 161, 162, 169
Offset: 1

Views

Author

Felice Russo, Dec 15 1999

Keywords

Crossrefs

Sequences with related definitions: A072525, A085084, A126638, A131368, A163643.
Cf. A002808.

Programs

  • Haskell
    a051884 n = a051884_list !! (n-1)
    a051884_list =  1 : f 1 a002808_list where
       f x cs = y : f y (dropWhile (<= y) cs) where
         y = head [z | z <- cs, x `gcd` z == 1]
    -- Reinhard Zumkeller, Jun 03 2013
  • Maple
    with(numtheory); i:=4; k:=5; while(k < 100) do while(order(k, i) = FAIL or isprime(k)) do k:=k+1; end do; print(k); i:= k; k:=k+1; end do; # Ben Paul Thurston, Feb 08 2007
  • Mathematica
    rPrimeNext[n_]:=Module[{k},k=n+1;While[PrimeQ[k]||GCD[n,k]!=1,k++ ];k]; a=1;lst={a};Do[AppendTo[lst,a=rPrimeNext[a]],{n,0,5!}];lst (* Vladimir Joseph Stephan Orlovsky, May 15 2010 *)
    nxt[n_]:=Module[{k=n+1},While[PrimeQ[k]||!CoprimeQ[k,n],k++];k]; NestList[ nxt,1,60] (* Harvey P. Dale, Mar 12 2013 *)

Extensions

More terms from James Sellers, Dec 16 1999
Definition corrected by Franklin T. Adams-Watters, Sep 19 2006

A075570 Lexicographically earliest sequence of distinct composite numbers such that a(k) + a(k+1) is prime for all k.

Original entry on oeis.org

4, 9, 8, 15, 14, 27, 10, 21, 16, 25, 6, 35, 12, 49, 18, 55, 24, 65, 32, 39, 20, 33, 26, 45, 22, 51, 28, 69, 34, 63, 38, 75, 52, 57, 40, 87, 44, 93, 46, 81, 50, 77, 30, 119, 48, 91, 36, 95, 42, 85, 54, 125, 56, 111, 62, 105, 58, 99, 64, 115, 66, 133, 60, 121, 70, 123, 68, 129, 82
Offset: 1

Views

Author

Amarnath Murthy, Sep 25 2002

Keywords

Comments

Index of composite values: {1, 4, 3, 8, 7, 17, 5, 12, 9, 15, 2, 23, 6, 33, 10, 38, 14, 46, 20, 26, 11, 21, 16, 30, ...}. - Michael De Vlieger, Jul 18 2017

Crossrefs

Programs

  • Mathematica
    a = {4}; Do[k = 2 - Boole@ EvenQ@ n; While[Nand[! MemberQ[a, k], CompositeQ@ k, PrimeQ[a[[n - 1]] + k]], k += 2]; AppendTo[a, k], {n, 2, 69}]; a (* Michael De Vlieger, Jul 18 2017 *)

Extensions

More terms from David Wasserman, Jan 20 2005
Definition clarified by Peter Munn, Jul 20 2017

A163642 a(n) = the smallest composite positive integer that is not yet in the sequence and that is coprime to n.

Original entry on oeis.org

4, 9, 8, 15, 6, 25, 10, 21, 14, 27, 12, 35, 16, 33, 22, 39, 18, 49, 20, 51, 26, 45, 24, 55, 28, 57, 32, 65, 30, 77, 34, 63, 38, 69, 36, 85, 40, 75, 44, 81, 42, 95, 46, 87, 52, 91, 48, 115, 50, 93, 56, 99, 54, 119, 58, 111, 62, 105, 60, 121, 64, 117, 68, 123, 66, 125, 70, 129, 74
Offset: 1

Views

Author

Leroy Quet, Aug 02 2009

Keywords

Comments

This sequence is a permutation of the composite positive integers.
Indices of composites: {1, 4, 3, 8, 2, 15, 5, 12, 7, 17, 6, 23, 9, 21, 13, 26, 10, 33, 11, 35, 16, 30, 14, 38, 18, 40, 20, 46, ...}. - Michael De Vlieger, Jul 23 2017
Each composite k occurs in the sequence no later than a(k-1). Proof by induction. - Peter Munn, Sep 01 2017

Crossrefs

Programs

  • Mathematica
    a = {4}; Do[k = 6; While[Nand[CompositeQ@ k, ! MemberQ[a, k], CoprimeQ[k, n]], k++]; AppendTo[a, k], {n, 2, 69}]; a (* Michael De Vlieger, Jul 23 2017 *)

Extensions

More terms from Sean A. Irvine, Nov 11 2009
Showing 1-3 of 3 results.