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

A214196 Unique terms in sequence A210144.

Original entry on oeis.org

2, 3, 5, 11, 23, 29, 37, 41, 47, 73, 131, 151, 199, 223, 271, 281, 353, 457, 641, 643, 659, 1259, 1531, 1747, 1951, 2671, 2953, 4259, 4967, 5419, 5839, 7013, 7963, 11261, 12653, 15733, 16189, 18367, 19237, 29129, 32381, 33161, 33247, 57653, 61723, 63823, 66739
Offset: 1

Views

Author

N. J. A. Sloane, Jul 07 2012

Keywords

Comments

The sequence is the set of numbers m which are the minimum m for some triple 1 <= i < j <= k such that m divides none of the differences A002110(i)-A002110(j). - R. J. Mathar, Jul 08 2012
In Sun (2012), these numbers are called "Primes of the first kind".
Conjecture: all the terms are prime. See Conjecture 1.5(i) in Sun 2012. - Jason Yuen, Feb 25 2024

Crossrefs

Programs

  • Maple
    A214196 := proc(n)
            local m ,i,j,ddvs;
            for m from 2 do
                    ddvs := false ;
                    for i from 1 to n-1 do
                            for j from i+1 to n do
                                    if (A002110(j)-A002110(i)) mod m = 0 then
                                            ddvs := true;
                                            break;
                                    end if;
                            end do:
                            if ddvs then
                                    break;
                            end if;
                    end do:
                    if ddvs = false then
                            return m;
                    end if;
            end do:
    end proc:
    # loop generates m multiples times (pipe through 'uniq')
    for n from 1 do
            printf("%d,\n",A214196(n)) ;
    end do: # R. J. Mathar, Jul 08 2012
  • Mathematica
    primorial[n_] := primorial[n] = Product[Prime[i], {i, 1, n}];
    p[0] = 1; p[n_] := p[n] = Module[{m, i, j, ddvs}, For[m = 2, True, m++, ddvs = False ; For[i = 1, i <= n - 1, i++, For[j = i + 1, j <= n, j++, If[Mod[primorial[j] - primorial[i], m] == 0, ddvs = True; Break[]]]; If[ddvs, Break[]]]; If[ddvs == False, Return[m]]]];
    A214196 = Reap[n = k = 1; While[n <= 400, If[p[n] != p[n - 1], a[k] = p[n]; Print[n, " a(", k, ") = ", a[k]]; Sow[a[k]]; k++]; n++]][[2, 1]] (* Jean-François Alcover, Jan 20 2018, after R. J. Mathar *)

Extensions

a(28)-a(34) from Jean-François Alcover, Jan 20 2018
Definition simplified and more terms from Jason Yuen, Feb 24 2024

A210186 a(n) = least integer m>1 such that m divides none of P_i + P_j with 0

Original entry on oeis.org

2, 3, 5, 7, 11, 19, 23, 23, 23, 47, 59, 61, 71, 71, 71, 101, 101, 101, 101, 101, 101, 113, 113, 113, 113, 113, 113, 113, 113, 113, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 487, 487, 661, 661, 661, 661, 661, 661, 661, 661, 661, 719, 719, 719, 719, 719, 719, 811, 811, 811, 811, 811, 811, 811, 811, 811, 811
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 18 2012

Keywords

Comments

Conjecture: all the terms are primes and a(n) < n^2 for all n > 1.

Examples

			We have a(3)=5 since 2+2*3, 2+2*3*5, 2*3+2*3*5 are pairwise distinct modulo m=5 but not pairwise distinct modulo m=2,3,4.
		

Crossrefs

Programs

  • Mathematica
    P[n_]:=Product[Prime[k],{k,1,n}]
    R[n_,m_]:=Product[If[Mod[P[k]+P[j],m]==0,0,1],{k,2,n},{j,1,k-1}]
    Do[Do[If[R[n,m]==1,Print[n," ",m];Goto[aa]],{m,2,Max[2,n^2]}]; Print[n];Label[aa];Continue,{n,1,300}]

A210393 a(n) = least integer m>1 such that S_k! for k=1,...,n are pairwise distinct modulo m where S_k is the sum of the first k primes.

Original entry on oeis.org

2, 3, 7, 13, 19, 29, 43, 61, 79, 101, 131, 167, 199, 239, 293, 331, 389, 443, 503, 571, 641, 719, 797, 877, 971, 1063, 1163, 1277, 1373, 1481, 1601, 1721, 1861, 1997, 2131, 2281, 2437, 2591, 2753, 2927, 3089, 3271, 3457, 3659, 3847, 4049, 4231, 4441, 4663, 4889
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 20 2012

Keywords

Comments

When n>1, we have S_n!=S_{n-1}!=0 (mod m) for all m=1,...,S_{n-1} and hence a(n)>S_{n-1}. Zhi-Wei Sun conjectured that a(n) is always a prime not exceeding S_n.

Examples

			a(3)=7 since 2!,(2+3)!,(2+3+5)! are pairwise distinct modulo m=7 but not pairwise distinct modulo m=2,3,4,5,6.
		

Crossrefs

Programs

  • Mathematica
    s[n_]:=s[n]=Sum[Prime[k],{k,1,n}]
    f[n_]:=f[n]=s[n]!
    R[n_,m_]:=Union[Table[Mod[f[k],m],{k,1,n}]]
    Do[Do[If[Length[R[n,m]]==n,Print[n," ",m];Goto[aa]],{m,Max[2,s[n-1]],s[n]}];
       Print[n];Label[aa];Continue,{n,1,720}]

A210394 a(n) = least integer m>1 such that m divides none of S_i!+S_j! with 0

Original entry on oeis.org

2, 3, 7, 11, 19, 31, 43, 67, 79, 101, 131, 163, 199, 241, 283, 331, 383, 443, 503, 571, 641, 719, 797, 877, 967, 1061, 1163, 1277, 1373, 1481, 1597, 1721, 1871, 1999, 2129, 2281, 2437, 2593, 2749, 2927, 3089, 3271, 3457, 3643, 3833, 4057, 4229, 4441, 4673, 4889
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 20 2012

Keywords

Comments

When n>1, we have S_n!+S_{n-1}!=0 (mod m) for all m=1,...,S_{n-1} and hence a(n)>S_{n-1}. Zhi-Wei Sun conjectured that a(n) is always a prime not exceeding S_n.

Examples

			We have a(3)=7, since  m=7 divides none of 2!+(2+3)!,2!+(2+3+5)!,(2+3)!+(2+3+5)! but this fails for m=2,3,4,5,6.
		

Crossrefs

Programs

  • Mathematica
    s[n_]:=s[n]=Sum[Prime[k],{k,1,n}]
    f[n_]:=s[n]!
    R[n_,m_]:=Product[If[Mod[f[k]+f[j],m]==0,0,1],{k,2,n},{j,1,k-1}]
    Do[Do[If[R[n,m]==1,Print[n," ",m];Goto[aa]],{m,Max[2,s[n-1]],s[n]}];
       Print[n];Label[aa];Continue,{n,1,225}]

A181901 a(n) = least positive integer m such that 2(s_k)^2 for k=1,...,n are pairwise distinct modulo m where s_k = Sum_{j=1..k} (-1)^(k-j)*p_j and p_j is the j-th prime.

Original entry on oeis.org

1, 4, 7, 9, 13, 17, 19, 23, 25, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 31 2012

Keywords

Comments

On Mar 28 2012, Zhi-Wei Sun conjectured that a(n) is the (n+1)-th prime p_{n+1} with the only exceptions being a(1)=1, a(2)=4, a(4)=9 and a(9)=25. He has shown that 2(s_k)^2 (k=1,...,n) are indeed pairwise distinct modulo p_{n+1} and hence a(n) does not exceed p_{n+1}.
Note that the sequence 0,s_1,s_2,s_3,... is A008347 introduced by N. J. A. Sloane and J. H. Conway.
Compare a(n) with the sequence A210640.
The conjecture was verified for n up to 2*10^5 by the author in 2018, and for n up to 3*10^5 by Chang Zhang (a student at Nanjing Univ.) in June 2020. - Zhi-Wei Sun, Jun 22 2020

Examples

			We have a(4)=9 since 2(s_1)^2=8, 2(s_2)^2=2, 2(s_3)^2=32, 2(s_4)^2=18 are pairwise distinct modulo 9 but not pairwise distinct modulo any of 1,...,8.
		

Crossrefs

Programs

  • Mathematica
    s[n_]:=Sum[(-1)^k*Prime[k],{k,1,n}]
    f[n_]:=2*s[n]^2
    R[n_,m_]:=Union[Table[Mod[f[k],m],{k,1,n}]]
    Do[Do[If[Length[R[n,m]]==n,Print[n," ",m];Goto[aa]],{m,1,Prime[n+1]}];
       Print[n];Label[aa];Continue,{n,1,600}]

A210640 a(n) = least integer m > 1 such that 2S_k^2 (k=1,...,n) are pairwise distinct modulo m, where S_k is the sum of the first k primes.

Original entry on oeis.org

2, 4, 9, 13, 17, 28, 37, 37, 37, 37, 37, 61, 61, 61, 151, 151, 151, 151, 151, 151, 151, 227, 227, 227, 227, 227, 307, 307, 307, 337, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 509, 509, 509, 509, 509, 643, 727, 727, 761, 761, 761, 971, 971, 971
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 26 2012

Keywords

Comments

If a(n) is an odd prime p_k then a(n)|2(S_k^2-S_{k-1}^2) and hence k>n. Zhi-Wei Sun conjectured that a(n) is a prime smaller than n^2 unless n divides 6.

Examples

			We have a(3)=9, because 2*2^2=8, 2*(2+3)^2=50, 2(2+3+5)^2=200 are pairwise distinct modulo m=9 but not pairwise distinct modulo any of 2, 3, 4, 5, 6, 7, 8.
		

Crossrefs

Programs

  • Mathematica
    s[n_] := s[n] = Sum[Prime[k], {k,1,n}]; f[n_] := f[n] = 2*s[n]^2; R[n_,m_] := Union[Table[Mod[f[k],m], {k,1,n}]]; Do[Do[If[Length[R[n,m]] == n, Print[n," ",m]; Goto[aa]], {m,2,Max[2,n^2]}]; Print[n]; Label[aa]; Continue, {n,1,5000}]

A182003 a(n) = least prime p_k such that n = p_k - p_{k-1} + ... + (-1)^{k-j}p_j for some 1 <= j <= k, with p_k the k-th prime.

Original entry on oeis.org

3, 2, 3, 5, 5, 11, 7, 11, 11, 17, 11, 17, 13, 23, 17, 23, 17, 31, 19, 41, 23, 41, 23, 47, 29, 47, 37, 59, 29, 59, 31, 59, 43, 67, 37, 67, 37, 67, 43, 73, 41, 83, 43, 83, 47, 101, 47, 97, 53, 97, 59, 97, 53, 103, 61, 109, 67, 127, 59, 131
Offset: 1

Views

Author

Zhi-Wei Sun, Apr 05 2012

Keywords

Comments

a(n) is obviously at least n. In March 2012, Zhi-Wei Sun conjectured that a(n) always exists and does not exceed 2.2*n for n > 1; he even thought that 2.2*n might be replaced by 2*n + 2.5*sqrt(n) for n > 1.
IFF n=p, a(n)=1.
For odd n's, lim_{n->inf.} a(n)/n = 1; for even n's, lim_{n->inf.} a(n)/n = 2.

Examples

			We have a(4) = 5 since 4 = 5 - 3 + 2 and 3 - 2 < 4.
		

Crossrefs

Programs

  • Mathematica
    s[0_]:=0; s[n_]:=s[n]=Prime[n]-s[n-1]; Do[Do[If[s[j]-(-1)^(j-i)*s[i]==n, Print[n," ",Prime[j]]; Goto[aa]], {j, 1, PrimePi[3n]}, {i, 0, j-1}]; Print[n]; Label[aa]; Continue, {n, 1, 5000}]
    f[n_] := Block[{j = PrimePi[n]}, While[ !MemberQ[ Accumulate@ Table[(-1)^(j - i) Prime[i], {i, j, 1, -1}], n], j++]; Prime[j]]; Array[f, 60] (* Robert G. Wilson v, Apr 06 2012 *)

A210642 a(n) = least integer m > 1 such that k! == n! (mod m) for no 0 < k < n.

Original entry on oeis.org

2, 2, 3, 4, 5, 9, 7, 13, 17, 17, 11, 13, 13, 19, 23, 17, 17, 29, 19, 23, 31, 31, 23, 41, 31, 29, 31, 37, 29, 31, 31, 37, 41, 41, 59, 37, 37, 59, 43, 41, 41, 59, 43, 67, 53, 53, 47, 53, 67, 59, 61, 53, 53, 79, 59, 59, 67, 73, 59, 67
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 26 2012

Keywords

Comments

Conjecture: a(n) is a prime not exceeding 2n with the only exceptions a(4)=4 and a(6)=9.
Note that a(n) is at least n and there is at least a prime in the interval [n,2n] by the Bertrand Postulate first confirmed by Chebyshev.
Compare this sequence with A208494.

Examples

			We have a(4)=4, because 4 divides none of 4!-1!=23, 4!-2!=22, 4!-3!=18, and both 2 and 3 divide 4!-3!=18.
		

Crossrefs

Programs

  • Mathematica
    R[n_,m_]:=If[n==1,1,Product[If[Mod[n!-k!, m]==0, 0, 1], {k, 1, n-1}]] Do[Do[If[R[n,m]==1, Print[n, " ", m]; Goto[aa]], {m,Max[2,n],2n}]; Print[n]; Label[aa]; Continue,{n,1,2500}]
Showing 1-8 of 8 results.