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

A242753 Number of ordered ways to write n = k + m with 0 < k <= m such that the inverse of k mod prime(k) among 1, ..., prime(k) - 1 is prime and the inverse of m mod prime(m) among 1, ..., prime(m) - 1 is also prime.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 1, 2, 2, 2, 1, 2, 3, 3, 2, 2, 3, 1, 2, 4, 3, 2, 3, 4, 2, 1, 2, 3, 1, 1, 2, 1, 1, 3, 2, 1, 1, 2, 2, 1, 2, 3, 3, 4, 1, 1, 3, 4, 2, 4, 4, 5, 3, 4, 5, 4, 3, 5, 6, 3, 3, 6, 4, 4, 3, 5, 4, 4, 4, 6, 5, 3, 5, 6, 5, 5, 9, 5, 6, 4
Offset: 1

Views

Author

Zhi-Wei Sun, May 22 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 3.
This implies that there are infinitely many positive integers k such that k*q == 1 (mod prime(k)) for some prime q < prime(k).

Examples

			a(11) = 1 since 11 = 4 + 7, 4*2 == 1 (mod prime(4)=7) with 2 prime, and 7*5 == 1 (mod Prime(7)=17) with 5 prime.
a(36) = 1 since 36 = 18 + 18, and 18*17 == 1 (mod 61) with 17 prime.
a(46) = 1 since 46 = 6 + 40, 6*11 == 1 (mod prime(6)= 13) with 11 prime, and 40*13 == 1 (mod prime(40)=173) with 13 prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[PowerMod[n,-1,Prime[n]]]
    Do[m=0;Do[If[p[k]&&p[n-k],m=m+1],{k,1,n/2}];Print[n," ",m];Continue,{n,1,80}]

A242754 Positive integers k such that k*p == 1 (mod prime(k)) for some prime p < prime(k).

Original entry on oeis.org

2, 3, 4, 6, 7, 10, 11, 13, 17, 18, 21, 31, 37, 40, 41, 46, 48, 49, 52, 53, 58, 60, 64, 66, 70, 71, 72, 73, 75, 81, 85, 92, 93, 96, 100, 102, 109, 117, 119, 127, 136, 137, 140, 143, 145, 146, 149, 160, 162, 179, 189, 194, 200, 206, 215, 232, 233, 243, 246, 247
Offset: 1

Views

Author

Zhi-Wei Sun, May 22 2014

Keywords

Comments

According to the conjecture in A242753, this sequence should have infinitely many terms.
Conjecture: The number of terms not exceeding x > 1 has the main term x/(log x) as x tends to infinity.

Examples

			a(4) = 6 since 6*11 == 1 (mod prime(6)=13) with 11 prime, but 5*9 == 1 (mod prime(5)=11) with 9 composite.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[PowerMod[n,-1,Prime[n]]]
    n=0;Do[If[p[k],n=n+1;Print[n," ",k]];Continue,{k,1,247}]

A242802 Number of primes p < n such that n - p is a term of A242754.

Original entry on oeis.org

0, 0, 0, 1, 2, 2, 2, 2, 4, 2, 2, 2, 4, 3, 4, 3, 3, 3, 3, 5, 4, 3, 5, 5, 3, 4, 2, 3, 3, 4, 2, 3, 4, 5, 3, 4, 2, 3, 3, 5, 3, 5, 4, 7, 3, 3, 5, 7, 4, 7, 6, 4, 5, 9, 5, 5, 5, 5, 6, 9, 4, 5, 8, 6, 8, 6, 4, 6, 8, 5, 10, 7, 6, 8, 9, 5, 14, 10, 6, 7
Offset: 1

Views

Author

Zhi-Wei Sun, May 23 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 3.

Examples

			a(4) = 1 since 2 is prime with 4 - 2 = 2 a term of A242754.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[PowerMod[n,-1,Prime[n]]]
    a[n_]:=Sum[Boole[p[n-Prime[k]]],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,80}]

A242879 Least positive integer k < n such that k*p == 1 (mod prime(k)) for some prime p < prime(k) and (n-k)*q == 1 (mod prime(n-k)) for some prime q < prime(n-k), or 0 if such a number k does not exist.

Original entry on oeis.org

0, 0, 0, 2, 2, 2, 3, 2, 2, 3, 4, 2, 2, 3, 2, 3, 4, 7, 2, 2, 3, 4, 2, 3, 4, 13, 6, 7, 11, 13, 10, 11, 2, 3, 4, 18, 6, 7, 2, 3, 4, 2, 2, 3, 4, 6, 6, 2, 3, 2, 2, 3, 4, 2, 2, 3, 4, 6, 6, 2, 3, 2, 3, 4, 7, 2, 3, 2, 3, 4, 7, 2, 2, 2, 2, 3, 2, 3, 4, 7
Offset: 1

Views

Author

Zhi-Wei Sun, May 25 2014

Keywords

Comments

According to the conjecture in A242753, a(n) should be positive for all n > 3.
We have verified that a(n) > 0 for all n = 4, ..., 10^8.

Examples

			a(4) = 2 since 4 = 2 + 2 and 2*2 == 1 (mod prime(2)=3).
a(7) = 3 since 7 = 3 + 4, 3*2 == 1 (mod prime(3)=5) with 2 prime, and also 4*2 == 1 (mod prime(4)=7) with 2 prime, but 5*9 == 1 (mod prime(5)=11) with 9 not prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[PowerMod[n,-1,Prime[n]]]
    Do[Do[If[p[k]&&p[n-k],Print[n," ",k];Goto[aa]];Continue,{k,1,n/2}];Print[n," ",0];Label[aa];Continue,{n,1,80}]
Showing 1-4 of 4 results.