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

A237578 a(n) = |{0 < k < n: pi(k*n) is prime}|, where pi(.) is given by A000720.

Original entry on oeis.org

0, 0, 2, 2, 1, 3, 2, 1, 2, 2, 4, 4, 1, 4, 2, 5, 5, 6, 2, 5, 4, 6, 3, 7, 3, 3, 7, 5, 5, 5, 10, 9, 3, 7, 6, 5, 12, 3, 3, 9, 10, 11, 12, 7, 3, 5, 11, 9, 7, 10, 12, 9, 10, 8, 12, 11, 10, 17, 15, 13, 14, 18, 4, 17, 10, 9, 15, 11, 14, 11, 23, 11, 9, 13, 12, 12, 12, 11, 14, 16
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 09 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 2, and a(n) = 1 only for n = 5, 8, 13. Moreover, for each n = 1, 2, 3, ..., there is a positive integer k < 3*sqrt(n) + 3 with pi(k*n) prime.
Note that the least positive integer k with pi(k*38) prime is 21 < 3*sqrt(38) + 3 < 21.5.

Examples

			a(5) = 1 since pi(1*5) = 3 is prime.
a(8) = 1 since pi(4*8) = 11 is prime.
a(13) = 1 since pi(10*13) = pi(130) = 31 is prime.
a(38) = 3 since pi(21*38) = pi(798) = 139, pi(28*38) = pi(1064) = 179 and pi(31*38) = pi(1178) = 193 are all prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[PrimePi[k*n]],1,0],{k,1,n-1}]
    Table[a[n],{n,1,80}]

A237453 Number of primes p < n with p*n + pi(p) prime, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 08 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 4, and a(n) = 1 for no n > 144. Moreover, for any positive integer n, there is a prime p < sqrt(2*n)*log(5n) with p*n + pi(p) prime.
(ii) For each integer n > 8, there is a prime p <= n + 1 with (p-1)*n - pi(p-1) prime.
(iii) For every n = 1, 2, 3, ... there is a positive integer k < 3*sqrt(n) with k*n + prime(k) prime.
(iv) For each n > 13, there is a positive integer k < n with k*n + prime(n-k) prime.
We have verified that a(n) > 0 for all n = 5, ..., 10^8.

Examples

			a(3) = 1 since 2 and 2*3 + pi(2) = 6 + 1 = 7 are both prime.
a(10) = 1 since 5 and 5*10 + pi(5) = 50 + 3 = 53 are both prime.
a(107) = 1 since 89 and 89*107 + pi(89) = 9523 + 24 = 9547 are both prime.
a(144) = 1 since 59 and 59*144 + pi(59) = 8496 + 17 = 8513 are both prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[Prime[k]*n+k],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,80}]
  • PARI
    vector(100, n, sum(k=1, primepi(n-1), isprime(prime(k)*n+k))) \\ Colin Barker, Feb 08 2014

A237496 Number of ordered ways to write n = k + m (0 < k <= m) with pi(k) + pi(m) - 2 prime, where pi(.) is given by A000720.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 2, 4, 4, 3, 2, 3, 3, 3, 5, 3, 1, 4, 5, 5, 7, 4, 1, 2, 1, 1, 1, 1, 1, 3, 6, 7, 8, 8, 8, 8, 8, 9, 11, 11, 11, 11, 9, 7, 7, 4, 1, 2, 1, 2, 3, 5, 7, 10, 14, 14, 14, 10, 6, 10, 14, 16, 19, 16, 13, 12, 11, 10, 7, 6, 5, 3, 3, 4, 3, 6, 9, 13, 17, 18
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 08 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 5.
(ii) Any integer n > 23 can be written as k + m (k > 0 and m > 0) with pi(k) + pi(m) prime. Also, each integer n > 25 can be written as k + m (k > 0 and m > 0) with pi(k) + pi(m) - 1 prime.

Examples

			a(6) = 1 since 6 = 3 + 3 with pi(3) + pi(3) - 2 = 2 + 2 - 2 = 2 prime.
a(17) = 1 since 17 = 2 + 15 with pi(2) + pi(15) - 2 = 1 + 6 - 2 = 5 prime.
a(99) = 1 since 99 = 1 + 98 with pi(1) + pi(98) - 2 = 0 + 25 - 2 = 23 prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=n>0&&PrimeQ[n]
    p[k_,m_]:=PQ[PrimePi[k]+PrimePi[m]-2]
    a[n_]:=Sum[If[p[k,n-k],1,0],{k,1,n/2}]
    Table[a[n],{n,1,80}]

A243164 Number of primes p < n such that p*n is a primitive root modulo prime(n).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 31 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 6.
(ii) Any integer n > 6 can be written as k + m with k > 0 and m > 0 such that k*m is a primitive root modulo prime(n).
We have verified part (i) for all n = 7, ..., 2*10^5.

Examples

			a(4) = 1 since 3 is prime with 3*4 = 12 a primitive root modulo prime(4) = 7.
a(9) = 1 since 7 is prime with 7*9 = 63 a primitive root modulo prime(9) = 23.
a(10) = 1 since 5 is prime with 5*10 = 50 a primitive root modulo prime(10) = 29.
a(12) = 1 since 2 is prime with 2*12 = 24 a primitive root modulo prime(12) = 37.
		

Crossrefs

Programs

  • Mathematica
    dv[n_]:=Divisors[n]
    Do[m=0;Do[Do[If[Mod[(Prime[k]*n)^(Part[dv[Prime[n]-1],i]),Prime[n]]==1,Goto[aa]],{i,1,Length[dv[Prime[n]-1]]-1}];m=m+1;Label[aa];Continue,{k,1,PrimePi[n-1]}];Print[n," ",m];Continue,{n,1,80}]

A237523 a(n) = |{0 < k < n/2: phi(k*(n-k)) + 1 is a square}|, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 08 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 7, and a(n) = 1 only for n = 8, 9, 13, 15, 20, 132.
(ii) If n > 5 is not among 10, 15, 20, 60, 105, then phi(k*(n-k)) is a square for some 0 < k < n/2.
See also A237524 for a similar conjecture involving higher powers.

Examples

			a(8) = 1 since phi(3*5) + 1 = 8 + 1 = 3^2.
a(9) = 1 since phi(4*5) + 1 = 8 + 1 = 3^2.
a(13) = 1 since phi(3*10) + 1 = 8 + 1 = 3^2.
a(15) = 1 since phi(7*8) + 1 = 24 + 1 = 5^2.
a(20) = 1 since phi(6*14) + 1 = 24 + 1 = 5^2.
a(132) = 1 since phi(46*(132-46)) + 1 = 1848 + 1 = 43^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    s[n_]:=SQ[EulerPhi[n]+1]
    a[n_]:=Sum[If[s[k(n-k)],1,0],{k,1,(n-1)/2}]
    Table[a[n],{n,1,80}]

A237582 a(n) = |{0 < k < n: pi(n + k^2) is prime}|, where pi(.) is given by A000720.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 2, 3, 2, 3, 4, 1, 2, 2, 3, 6, 6, 5, 5, 5, 5, 6, 7, 7, 6, 5, 6, 5, 6, 7, 8, 9, 8, 10, 9, 8, 6, 6, 6, 6, 7, 9, 9, 10, 11, 11, 13, 11, 9, 9, 10, 10, 8, 6, 6, 5, 4, 8, 9, 10, 12, 11, 14, 15, 15, 15, 12, 14, 15, 17, 16, 13, 11, 11, 13, 16, 18, 24, 25, 20
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 09 2014

Keywords

Comments

Conjecture: (i) For each a = 2, 3, ... there is a positive integer N(a) such that for any integer n > N(a) there is a positive integer k < n with pi(n + k^a) prime. In particular, we may take (N(2), N(3), ..., N(9)) = (1, 1, 9, 26, 8, 9, 18, 1).
(ii) If n > 6, then pi(n^2 + k^2) is prime for some 0 < k < n. If n > 27, then pi(n^3 + k^3) is prime for some 0 < k < n. In general, for each a = 2, 3, ..., if n is sufficiently large then pi(n^a + k^a) is prime for some 0 < k < n.
For any integer n > 1, it is easy to show that pi(n + k) is prime for some 0 < k < n.

Examples

			a(5) = 1 since pi(5 + 1^2) = 3 is prime.
a(6) = 1 since pi(6 + 5^2) = pi(31) = 11 is prime.
a(9) = 2 since pi(9 + 3^2) = pi(18) = 7 and pi(9 + 5^2) = pi(34) = 11 are both prime.
a(12) = 1 since pi(12 + 10^2) = pi(112) = 29 is prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[PrimePi[n]]
    a[n_]:=Sum[If[p[n+k^2],1,0],{k,1,n-1}]
    Table[a[n],{n,1,80}]

A237595 a(n) = |{1 <= k <= n: n + pi(k^2) is prime}|, where pi(.) is given by A000720.

Original entry on oeis.org

0, 1, 3, 0, 3, 1, 3, 3, 3, 1, 5, 2, 6, 3, 4, 2, 6, 3, 7, 3, 2, 6, 8, 1, 10, 3, 5, 8, 9, 2, 9, 6, 3, 5, 14, 5, 11, 6, 9, 3, 13, 8, 11, 8, 8, 6, 8, 8, 11, 9, 6, 12, 15, 10, 11, 5, 11, 12, 13, 9, 12, 9, 5, 17, 15, 9, 18, 13, 11, 12
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 09 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 4.
(ii) If n > 1 then n + pi(k*(k-1)) is prime for some k = 1, ..., n.
(iii) For any integer n > 1, there is a positive integer k <= (n+1)/2 such that pi(n + k*(k+1)/2) is prime.
(iv) Any integer n > 1 can be written as p + pi(k*(k+1)/2), where p is a prime and k is among 1, ..., n-1.

Examples

			a(2) = 1 since 2 + pi(1^2) = 2 is prime.
a(6) = 1 since 6 + pi(6^2) = 6 + 11 = 17 is prime.
a(10) = 1 since 10 + pi(5^2) = 10 + 9 = 19 is prime.
a(21) = 2 since 21 + pi(2^2) = 23 and 21 + pi(9^2) = 43 are both prime.
a(24) = 1 since 24 + pi(21^2) = 24 + 85 = 109 is prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[n+PrimePi[k^2]],1,0],{k,1,n}]
    Table[a[n],{n,1,70}]
Showing 1-7 of 7 results.