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.

Previous Showing 11-13 of 13 results.

A190911 Least number coprime to n and n+3.

Original entry on oeis.org

3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3, 7, 3, 3, 7, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3, 7, 3, 3, 7, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3, 11, 3, 3, 7, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3, 7, 3, 3, 11, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3, 7, 3, 3, 7, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3
Offset: 1

Views

Author

Jonathan Vos Post, May 26 2011

Keywords

Comments

This is to n+3 as A053670 is to n+1. This is the 3rd row of the array A(k,n) = Least number coprime to n and n+k where A053670 is the 1st row. First n for which a(n) = (3, 5, 7, 11, 13, 17, 19, ...) are A191112 = (1, 3, 12, 42, 165, 3000, 2142, ...).

Examples

			a(12) = 7 because the prime factors of 12 and 12+3 = 15 are {2, 3, 5} and the next available prime is 7.
		

Crossrefs

Programs

  • Maple
    A190911 := proc(n) local k: for k from 3 by 2 do if(gcd(k,n)=1 and gcd(k,n+3)=1)then return k: fi: od: end: seq(A190911(n),n=1..100); # Nathaniel Johnston, May 26 2011

Extensions

a(15) corrected by Nathaniel Johnston, May 26 2011

A135376 a(n) is the smallest prime that does not divide n(n+1)/2.

Original entry on oeis.org

2, 2, 5, 3, 2, 2, 3, 5, 2, 2, 5, 5, 2, 2, 7, 3, 2, 2, 3, 11, 2, 2, 5, 7, 2, 2, 5, 3, 2, 2, 3, 5, 2, 2, 11, 5, 2, 2, 7, 3, 2, 2, 3, 7, 2, 2, 5, 5, 2, 2, 5, 3, 2, 2, 3, 5, 2, 2, 7, 7, 2, 2, 5, 3, 2, 2, 3, 5, 2, 2, 5, 5, 2, 2, 7, 3, 2, 2, 3, 7, 2, 2, 5, 11, 2, 2, 5, 3, 2, 2, 3, 5, 2, 2, 7, 5, 2, 2, 7, 3, 2, 2, 3
Offset: 1

Views

Author

Leroy Quet, Dec 09 2007

Keywords

Comments

The sums of the first 10^k terms, for k = 1, 2, ..., are 28, 354, 3596, 36026, 360402, 3604134, 36041392, 360413970, 3604140072, 36041400856, ... . Apparently, the asymptotic mean of this sequence is limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3.604140... . - Amiram Eldar, Sep 10 2022

Examples

			The 11th triangular number is 66 = 2*3*11. 5 is the smallest prime that is coprime to 66, so a(11) = 5.
		

Crossrefs

Programs

  • Maple
    A135376 := proc(n) local T,p ; T := n*(n+1)/2 ; p := 2 ; while T mod p = 0 do p := nextprime(p) ; od: RETURN(p) ; end: seq(A135376(n),n=1..120) ; # R. J. Mathar, Dec 11 2007
  • Mathematica
    a = {}; For[n = 1, n < 80, n++, j = 1; While[Mod[n*(n + 1)/2, Prime[j]] == 0, j++ ]; AppendTo[a, Prime[j]]]; a (* Stefan Steinerberger, Dec 10 2007 *)
    sp[n_]:=Module[{p=2},While[Mod[n,p]==0,p=NextPrime[p]];p]; sp[#]&/@ Accumulate[ Range[110]] (* Harvey P. Dale, Jul 26 2018 *)

Formula

a(4n+1) = a(4n+2) = 2 for all nonnegative integers n.
a(n) = A053670(n) for all n congruent to 0 or 3 (mod 4).
a(n) = A053669(A000217(n)). - R. J. Mathar, Dec 11 2007

Extensions

More terms from Stefan Steinerberger and R. J. Mathar, Dec 10 2007

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
Previous Showing 11-13 of 13 results.