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.

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