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.

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

A242755 Primes p such that pi(p)*q == 1 (mod p) for some prime q < p, where pi(p) is the number of primes not exceeding p.

Original entry on oeis.org

3, 5, 7, 13, 17, 29, 31, 41, 59, 61, 73, 127, 157, 173, 179, 199, 223, 227, 239, 241, 271, 281, 311, 317, 349, 353, 359, 367, 379, 419, 439, 479, 487, 503, 541, 557, 599, 643, 653, 709, 769, 773, 809, 823, 829, 839, 859, 941, 953, 1063
Offset: 1

Views

Author

Zhi-Wei Sun, May 22 2014

Keywords

Comments

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

Examples

			a(4) = 13 since 13 is prime with pi(13) = 6, and 6*11 == 1 (mod 13) with 11 prime, but pi(11)*9 == 1 (mod 11) with 9 not prime.
		

Crossrefs

Programs

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

A242950 Number of ordered ways to write n = k + m with k > 1 and m > 1 such that the least nonnegative residue of prime(k) modulo k is a square and the least nonnegative residue of prime(m) modulo m is a prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 27 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 7.
(ii) Any integer n > 9 can be written as k + m with k > 1 and m > 1 such that the least nonnegative residue of prime(k) modulo k and the least nonnegative residue of prime(m) modulo m are both prime.
We have verified a(n) > 0 for all n = 8, ..., 10^8.

Examples

			a(11) = 1 since 11 = 2 + 9, prime(2) = 3 == 1^2 (mod 2), and prime(9) = 23 == 5 (mod 9) with 5 prime.
a(16) = 1 since 16 = 12 + 4, prime(12) = 37 == 1^2 (mod 12), and prime(4) = 7 == 3 (mod 4) with 3 prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    s[k_]:=SQ[Mod[Prime[k],k]]
    p[k_]:=PrimeQ[Mod[Prime[k],k]]
    a[n_]:=Sum[Boole[s[k]&&p[n-k]],{k,2,n-2}]
    Table[a[n],{n,1,80}]

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