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-10 of 11 results. Next

A208643 Least positive integer m such that those k*(k-1) mod m with k=1,...,n are pairwise distinct.

Original entry on oeis.org

1, 3, 5, 7, 11, 11, 13, 16, 17, 19, 23, 23, 29, 29, 29, 31, 37, 37, 37, 41, 41, 43, 47, 47, 53, 53, 53, 59, 59, 59, 61, 64, 67, 67, 71, 71, 73, 79, 79, 79, 83, 83, 89, 89, 89, 97, 97, 97, 97, 101, 101, 103, 107, 107, 109, 113, 113, 127, 127, 127
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 29 2012

Keywords

Comments

On Feb. 29, 2012, Zhi-Wei Sun proved that a(n) = min{m>2n-2: m is a prime or a power of two}. He also showed that if we replace k(k-1) in the definition of a(n) by 2k(k-1) then a(n) is the least prime greater than 2n-2 for every n=2,3,4,....

Crossrefs

Programs

  • Mathematica
    R[n_,i_] := Union[Table[Mod[k(k-1),i], {k,1,n}]]; Do[Do[If[Length[R[n,i]]==n, Print[n," ",i]; Goto[aa]], {i,1,4n}]; Print[n]; Label[aa]; Continue, {n,1,1000}]

A210144 a(n) = least integer m>1 such that the product of the first k primes for k=1,...,n are pairwise distinct modulo m.

Original entry on oeis.org

2, 3, 5, 11, 11, 23, 29, 37, 37, 41, 47, 47, 47, 47, 47, 73, 131, 131, 131, 131, 131, 151, 151, 151, 151, 199, 223, 223, 271, 271, 271, 281, 281, 281, 281, 281, 281, 281, 281, 281, 353, 353, 457, 457, 457, 457, 457, 457, 457, 457, 457, 641, 641, 641, 641, 641, 643, 643, 643, 643
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 17 2012

Keywords

Comments

Conjecture: all the terms are primes and a(n) 1.

Examples

			a(3)=5 because 2, 2*3=6, 2*3*5=30 are distinct modulo m=5 but not distinct modulo m=2,3,4.
		

Crossrefs

Programs

  • Mathematica
    R[n_,m_]:=Union[Table[Mod[Product[Prime[j],{j,1,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,1000}]

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}]

A273064 Discriminator of the factorials A000142.

Original entry on oeis.org

1, 2, 3, 7, 10, 13, 13, 13, 31, 37, 37, 37, 61, 61, 61, 83, 83, 83, 127, 127, 127, 127, 127, 179, 179, 179, 179, 179, 193, 193, 193, 193, 193, 193, 193, 193, 277, 277, 277, 277, 277, 277, 383, 383, 383, 383, 383, 479, 479, 479, 479, 479, 479, 479, 541, 541, 541, 541, 541, 541, 541, 541, 541, 641, 641, 641, 641, 641, 641, 641
Offset: 1

Views

Author

Jeffrey Shallit, May 14 2016

Keywords

Comments

The discriminator of a sequence is the least positive integer k such that the first n terms of the sequence are incongruent, modulo k.
Here we take the factorials starting with 1! = 1.
Differs from A208494 only at n=1. - R. J. Mathar, May 15 2016

Crossrefs

Cf. A000142.
Showing 1-10 of 11 results. Next