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 12 results. Next

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

A349459 Least positive integer m such that the n numbers k^2*(k^2-1) (k=1..n) are pairwise distinct modulo m.

Original entry on oeis.org

1, 5, 7, 11, 13, 23, 23, 23, 23, 41, 41, 41, 41, 41, 41, 101, 101, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 229, 239, 239, 239, 383, 383, 383, 383, 383, 383, 383, 383, 401, 401, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 733, 733, 733, 733, 733, 733, 733
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 18 2021

Keywords

Comments

Conjecture: For any integer n > 1, the term a(n) is the least prime p > 2*n with p dividing a^2 + b^2 - 1 for no 1 <= a < b <= n.
This has been verified for all n = 2..15000.
Note that a^2*(a^2-1)-b^2*(b^2-1) = (a-b)*(a+b)*(a^2+b^2-1). For any positive integers m and n > 1, if k^2*(k^2-1) (k=1..n) are pairwise distinct modulo m, then it is easy to see that m > 2*n.

Examples

			a(2) = 5 since the two numbers 1^2*(1^2-1)=0 and 2^2*(2^2-1) = 12 are distinct modulo 5, but they are congruent modulo each of 1,2,3,4.
		

Crossrefs

Programs

  • Mathematica
    f[k_]:=f[k]=k^2*(k^2-1);
    U[m_,n_]:=U[m,n]=Length[Union[Table[Mod[f[k],m],{k,1,n}]]]
    tab={};s=1;Do[m=s;Label[bb];If[U[m,n]==n,s=m;tab=Append[tab,s];Goto[aa]];m=m+1;Goto[bb];Label[aa],{n,1,70}];Print[tab]

A349530 Least positive integer m such that the n numbers k*(k^4+1) (k=1..n) are pairwise distinct modulo m^2.

Original entry on oeis.org

1, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 25, 25, 25, 25, 25
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 21 2021

Keywords

Comments

Conjecture 1: Suppose that 5^a < sqrt(n) <= 5^(a+1). Then a(n) = 3*5^a if sqrt(n) <= sqrt(3)*5^a, and a(n) = 5^(a+1) otherwise.
Conjecture 2: Let f(n) be the least positive integer m such that the n numbers 18k*(k^4+1) (k=1..n) are pairwise distinct modulo m^2. Then f(n) is the least power of 5 not smaller than sqrt(n), except for 25 < n <= 45 (and in this case f(n) = 19).
Conjecture 3: Let n be a positive integer not among 26, 27, 28, 626, 627, 628, 629, 630, and define D(n) as the least positive integer m such that the n numbers k*(k^4+1) (k=1..n) are pairwise distinct modulo m. If 5^a < n <= 3*5^a, then D(n) = 3*5^a. If 3*5^a < n <= 5^(a+1), then D(n) = 5^(a+1).
We have verified the above conjectures for n up to 10^5.

Examples

			a(2) = 3 since the two numbers 1*(1^4+1) = 2 and 2*(2^4+1) = 34 are distinct modulo 3^2, but they are congruent modulo each of 1^2 and 2^2.
		

Crossrefs

Programs

  • Mathematica
    f[k_]:=f[k]=k*(k^4+1);
    U[m_,n_]:=U[m,n]=Length[Union[Table[Mod[f[k],m^2],{k,1,n}]]]
    tab={};s=1;Do[m=s;Label[bb];If[U[m,n]==n,s=m;tab=Append[tab,s];Goto[aa]];m=m+1;Goto[bb];Label[aa],{n,1,80}];Print[tab]

A349537 Least positive integer m such that the n numbers 33*k^2*(k^3+1) (k = 1..n) are pairwise distinct modulo m.

Original entry on oeis.org

1, 4, 7, 7, 13, 13, 13, 13, 13, 31, 41, 41, 61, 61, 61, 61, 61, 61, 61, 73, 101, 137, 137, 137, 137, 137, 137, 137, 137, 233, 233, 233, 233, 233, 233, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, 859, 859, 859, 859, 859, 859
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 21 2021

Keywords

Comments

Conjecture: a(n) is prime for each n > 2.
We have verified this for n up to 10^4.

Examples

			a(2) = 4 since 33*1^2*(1^3+1) = 66 and 33*2^2*(2^3+1) = 1188 are incongruent modulo 4, but they are congruent modulo each of 1, 2 and 3.
		

Crossrefs

Programs

  • Mathematica
    f[k_]:=f[k]=33*k^2*(k^3+1);
    U[m_,n_]:=U[m,n]=Length[Union[Table[Mod[f[k],m],{k,1,n}]]]
    tab={};s=1;Do[m=s;Label[bb];If[U[m,n]==n,s=m;tab=Append[tab,s];Goto[aa]];m=m+1;Goto[bb];Label[aa],{n,1,70}];Print[tab]

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 *)
Showing 1-10 of 12 results. Next