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

A224965 Let p = prime(n). a(n) = number of primes q less than p, such that both p*q+p+q and p*q-p-q are primes.

Original entry on oeis.org

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

Views

Author

Jayanta Basu, Apr 21 2013

Keywords

Examples

			For n=3, p=5, there are a(3)=2 solutions 2,3 since 5*2+5+2=17, 5*2-5-2=3 and 5*3+5+3=23, 5*3-5-3=7. Also for n=5, p=11, there is a(5)=1 solution in the form of 11*3+11+3=47, 11*3-11-3=19.
		

Crossrefs

Programs

  • Mathematica
    Table[p = Prime[n]; c = 0; i = 1; While[i < n, q1 = p*Prime[i]; q2 = p + Prime[i]; If[PrimeQ[q1 + q2] && PrimeQ[q1 - q2], c = c + 1]; i++]; c, {n, 85}]

A224962 a(n) = number of primes of the form p*q+(p+q) where p = prime(n) and q is any prime < p.

Original entry on oeis.org

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

Views

Author

Jayanta Basu, Apr 21 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1. - Dmitry Kamenetsky, Jul 18 2019

Examples

			For n=3, p=5, there are a(3)=2 solutions from 5*2+(5+2)=17 and 5*3+(5+3)=23.
For n=4, p=7, there are a(4)=3 solutions in the form of 7*2+(7+2)=23, 7*3+(7+3)=31 and 7*5+(7+5)=47.
		

Crossrefs

Programs

  • Maple
    a:= n-> (p-> add((q-> `if`(isprime((p+1)*(q+1)-1),
           1, 0))(ithprime(j)), j=1..n-1))(ithprime(n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jul 18 2019
  • Mathematica
    Table[p = Prime[n]; c = 0; i = 1; While[i < n, If[PrimeQ[p*Prime[i] + (p + Prime[i])], c = c + 1]; i++]; c, {n, 75}]
  • PARI
    a(n) = my(p=prime(n), q); sum(k=1, n-1, q=prime(k); isprime(p*q+(p+q))); \\ Michel Marcus, Jul 18 2019
Showing 1-2 of 2 results.