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-5 of 5 results.

A090092 a(n) is the smallest composite number coprime to n, n+1 and n+2.

Original entry on oeis.org

25, 25, 49, 49, 121, 25, 25, 49, 49, 49, 25, 25, 121, 121, 49, 25, 25, 49, 121, 169, 25, 25, 49, 49, 49, 25, 25, 121, 49, 49, 25, 25, 169, 121, 121, 25, 25, 49, 49, 121, 25, 25, 49, 49, 49, 25, 25, 121, 121, 49, 25, 25, 49, 169, 169, 25, 25, 49, 49, 49, 25, 25, 121, 49, 49, 25
Offset: 1

Views

Author

Labos Elemer, Nov 26 2003

Keywords

Crossrefs

Programs

  • Mathematica
    m=0;Table[fla=1;Do[s=GCD[n, k];s1=GCD[n, k+1]; s2=GCD[n, k+2];s3=GCD[n, k+3]; If[Equal[s, 1]&&Equal[s1, 1]&&Equal[s2, 1] &&!PrimeQ[n]&&!Equal[n, 1] &&Equal[fla, 1], m=m+1;Print[n];fla=0], {n, 1, 1000}], {k, 1, 256}]
    nn=200;With[{c=Complement[Range[2,nn],Prime[Range[PrimePi[nn]]]]}, Flatten[ Table[ Select[c,And@@Thread[CoprimeQ[{n,n+1,n+2},#]]&,1],{n,nn}]]](* Harvey P. Dale, Sep 28 2013 *)

Formula

a(n) = A053671(n)^2.

A090095 a(n) is the smallest composite number coprime to n, n+1, n+2, n+3, n+4 and n+5.

Original entry on oeis.org

49, 121, 121, 121, 121, 169, 169, 49, 289, 289, 289, 121, 121, 121, 49, 121, 169, 169, 169, 169, 289, 49, 121, 121, 121, 121, 121, 169, 49, 169, 169, 169, 169, 121, 121, 49, 121, 121, 289, 169, 169, 169, 49, 169, 121, 121, 121, 121, 121, 49, 361, 289, 169, 169
Offset: 1

Views

Author

Labos Elemer, Nov 26 2003

Keywords

Crossrefs

Programs

  • Mathematica
    m=0;Table[fla=1;Do[s=GCD[n, k];s1=GCD[n, k+1]; s2=GCD[n, k+2];s3=GCD[n, k+3];s4=GCD[n, k+4];s5=GCD[n, k+5]; If[Equal[s, 1]&&Equal[s1, 1]&&Equal[s2, 1]&&Equal[s3, 1]&& Equal[s4, 1]&&Equal[s5, 1]&&!PrimeQ[n]&&!Equal[n, 1]&&Equal[fla, 1], m=m+1;Print[n];fla=0], {n, 1, 1000}], {k, 1, 256}]
    scn[n_]:=Module[{k=4,c=n+Range[0,5]},While[PrimeQ[k]||!AllTrue[c,CoprimeQ[ k,#]&],k++];k]; Array[scn,60] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 30 2020 *)

Formula

a(n) = A053674(n)^2.

A089090 a(n) is the smallest composite number coprime to n.

Original entry on oeis.org

4, 9, 4, 9, 4, 25, 4, 9, 4, 9, 4, 25, 4, 9, 4, 9, 4, 25, 4, 9, 4, 9, 4, 25, 4, 9, 4, 9, 4, 49, 4, 9, 4, 9, 4, 25, 4, 9, 4, 9, 4, 25, 4, 9, 4, 9, 4, 25, 4, 9, 4, 9, 4, 25, 4, 9, 4, 9, 4, 49, 4, 9, 4, 9, 4, 25, 4, 9, 4, 9, 4, 25, 4, 9, 4, 9, 4, 25, 4, 9, 4, 9, 4, 25, 4, 9, 4, 9, 4, 49, 4, 9, 4, 9, 4, 25, 4
Offset: 1

Views

Author

Labos Elemer, Nov 26 2003

Keywords

Comments

If n is the n-th primorial, then a(n) = prime(n+1)^2.

Examples

			n=30: below 30 coprimes to 30 phi(30)=8 numbers are relevant but each 1 or primes; so a(8)>30; the first suitable number is a(30)=49.
		

Crossrefs

Programs

  • Mathematica
    m=0;Table[fla=1;Do[s=GCD[n, k];If[Equal[s, 1]&&!PrimeQ[n]&&!Equal[n, 1]&& Equal[fla, 1], m=m+1;Print[n];fla=0], {n, 1, 130}], {k, 1, 256}]
  • PARI
    A089090(n) = forprime(p=2, , if(n%p, return(p*p))); \\ Antti Karttunen, Dec 19 2018

Formula

a(n) = A053669(n)^2.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime} ((p^2*(p-1)/Product_{q prime <= p} q)) = 10.3344588090... . - Amiram Eldar, Jul 25 2022

Extensions

Offset corrected by Antti Karttunen, Dec 19 2018

A090094 a(n) is the smallest composite number coprime to n, n+1, n+2, n+3 and n+4.

Original entry on oeis.org

49, 49, 121, 121, 121, 121, 169, 49, 49, 289, 289, 121, 121, 121, 49, 49, 121, 169, 169, 169, 169, 49, 49, 121, 121, 121, 121, 121, 49, 49, 169, 169, 169, 121, 121, 49, 49, 121, 121, 169, 169, 169, 49, 49, 121, 121, 121, 121, 121, 49, 49, 289, 169, 169, 169, 121, 49
Offset: 1

Views

Author

Labos Elemer, Nov 26 2003

Keywords

Crossrefs

Programs

  • Mathematica
    m=0;Table[fla=1;Do[s=GCD[n, k];s1=GCD[n, k+1]; s2=GCD[n, k+2];s3=GCD[n, k+3];s4=GCD[n, k+4];s5=GCD[n, k+5]; If[Equal[s, 1]&&Equal[s1, 1]&&Equal[s2, 1]&&Equal[s3, 1]&& Equal[s4, 1]&&!PrimeQ[n]&&!Equal[n, 1]&&Equal[fla, 1], m=m+1;Print[n];fla=0], {n, 1, 1000}], {k, 1, 256}]
    scn[n_]:=Module[{cn=4},While[!CompositeQ[cn]||!And@@CoprimeQ[ Range[ n,n+4], cn], cn++]; cn]; Array[scn,60] (* Harvey P. Dale, Aug 12 2014 *)

Formula

a(n) = A053673(n)^2.

A089091 a(n) is the smallest composite number coprime to n and n+1.

Original entry on oeis.org

9, 25, 25, 9, 49, 25, 9, 25, 49, 9, 25, 25, 9, 121, 49, 9, 25, 25, 9, 121, 25, 9, 25, 49, 9, 25, 25, 9, 49, 49, 9, 25, 25, 9, 121, 25, 9, 25, 49, 9, 25, 25, 9, 49, 49, 9, 25, 25, 9, 49, 25, 9, 25, 49, 9, 25, 25, 9, 49, 49, 9, 25, 25, 9, 49, 25, 9, 25, 121, 9, 25, 25, 9, 49, 49, 9, 25, 25
Offset: 1

Views

Author

Labos Elemer, Nov 26 2003

Keywords

Crossrefs

Programs

  • Mathematica
    m=0;Table[fla=1;Do[s=GCD[n, k]; s1=GCD[n, k+1];s2=GCD[n, k+2];s3=GCD[n, k+3]; If[Equal[s, 1]&&Equal[s1, 1]&&!PrimeQ[n]&&!Equal[n, 1]&& Equal[fla, 1], m=m+1;Print[n];fla=0], {n, 1, 1000}], {k, 1, 256}]
  • Python
    from math import gcd
    def a(n):
        k, m = 3, n*(n+1)
        while gcd(k, m) != 1: k += 2
        return k*k
    print([a(n) for n in range(1, 79)]) # Michael S. Branicky, Sep 25 2021

Formula

a(n) = A053670(n)^2.

Extensions

Offset corrected by Mohammed Yaseen, Aug 15 2023
Showing 1-5 of 5 results.