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.

A224748 Given n-th prime p, a(n) = number of primes of the form p + q - 1 where q is any prime < p.

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 3, 3, 2, 3, 6, 6, 5, 8, 4, 4, 4, 11, 11, 8, 9, 11, 4, 5, 13, 9, 11, 7, 13, 5, 17, 10, 9, 15, 7, 19, 17, 18, 10, 8, 8, 25, 12, 17, 12, 18, 29, 23, 12, 21, 12, 15, 28, 18, 11, 11, 12, 32, 25, 19, 22, 14, 29, 17, 27, 14, 40, 36, 18, 29, 16, 13
Offset: 1

Views

Author

Jayanta Basu, Apr 17 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>2. - Dmitry Kamenetsky, Feb 09 2017

Crossrefs

Programs

  • Maple
    a:= n-> add(`if`(isprime(ithprime(n)+ithprime(i)-1), 1, 0), i=1..n-1):
    seq(a(n), n=1..100);  # Alois P. Heinz, Apr 18 2013
  • Mathematica
    Table[p = Prime[n]; c = 0; i = 1; While[i < n, If[PrimeQ[p + Prime[i] - 1], c = c + 1]; i++]; c, {n, 72}]
    Table[Count[Prime[n]+Prime[Range[n-1]]-1,?PrimeQ],{n,80}] (* _Harvey P. Dale, Nov 04 2020 *)

A224908 Given n-th prime p, a(n)=number of primes of the form p+q+1 where q is any prime < p.

Original entry on oeis.org

0, 0, 0, 2, 2, 2, 3, 3, 5, 5, 3, 4, 7, 4, 7, 8, 11, 5, 6, 9, 4, 7, 12, 14, 8, 11, 7, 13, 10, 12, 9, 15, 15, 12, 19, 9, 8, 8, 20, 19, 24, 11, 16, 11, 18, 15, 9, 13, 21, 14, 24, 27, 11, 26, 24, 26, 32, 13, 12, 21, 14, 28, 19, 27, 14, 26, 14, 14, 29, 24, 26, 39
Offset: 1

Views

Author

Jayanta Basu, Apr 19 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>3. - Dmitry Kamenetsky, Feb 09 2017

Examples

			For n=5, p=11, there are a(5)=2 solutions from 11+5+1=17 and 11+7+1=19.
		

Crossrefs

Programs

  • Mathematica
    Table[p = Prime[n]; c = 0; i = 1; While[i < n, If[PrimeQ[p + Prime[i] + 1], c = c + 1]; i++]; c, {n, 72}]
    Table[p = Prime[n] + 1; Sum[If[PrimeQ[p + Prime[i]], 1, 0], {i, 1, n - 1}], {n, 72}] (* Zak Seidov, Apr 19 2013 *)
    Table[Count[Prime[n]+Prime[Range[n-1]]+1,?PrimeQ],{n,80}] (* _Harvey P. Dale, Mar 03 2024 *)
  • PARI
    for(n = 1,72, q = prime (n) + 1; print1 (sum (i = 1, n - 1, isprime (q + prime (i))) ","))\\ Zak Seidov, Apr 19 2013

A137291 Numbers m such that prime(m)^2-2 is prime.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 10, 12, 14, 15, 18, 20, 24, 27, 28, 31, 32, 34, 40, 43, 47, 48, 51, 52, 55, 62, 65, 68, 72, 82, 86, 87, 91, 94, 99, 100, 104, 107, 111, 119, 123, 128, 129, 130, 132, 133, 134, 135, 139, 141, 150, 152, 170, 172, 177, 180, 182, 191, 200, 202, 209, 211
Offset: 1

Views

Author

Ctibor O. Zizka, Apr 05 2008

Keywords

Comments

For m>=1, for these and only these numbers m, A242719(m) = prime(m)^2 + 1. Since A242719(m) >= prime(m)^2 + 1, then the equality is obtained on this and only this sequence. - Vladimir Shevelev, Sep 04 2014

Examples

			prime(24)*prime(24)-2 = 89*89-2 = 7919 is prime, so n=24 belongs to the sequence.
		

Crossrefs

Programs

  • Haskell
    a137291 n = a137291_list !! (n-1)
    a137291_list = filter ((== 1) . a010051' . a049001) [1..]
    -- Reinhard Zumkeller, Jul 30 2015
    
  • Mathematica
    Select[Range[211],PrimeQ[Prime[#]^2-2]&] (* James C. McMahon, May 28 2025 *)
  • PARI
    is(n,p=prime(n))=isprime(p^2-2) \\ Charles R Greathouse IV, Feb 17 2017

Formula

A103960(a(n)) - A210481(a(n)) = 1. - Reinhard Zumkeller, Jul 30 2015
a(n) = A049084(A049002(n)). - R. J. Mathar, Apr 09 2008

Extensions

More terms from R. J. Mathar, Apr 09 2008
Offset corrected by Reinhard Zumkeller, Jul 30 2015

A103960 Number of primes p such that prime(n)*p - 2 is prime and p <= prime(n).

Original entry on oeis.org

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

Views

Author

Lei Zhou, Feb 22 2005

Keywords

Comments

Conjecture: All items of this sequence are greater than or equal to 1. Tested to prime(1000000).
a(A137291(n)) = A210481(A137291(n)) + 1. - Reinhard Zumkeller, Jul 30 2015

Examples

			Prime(1)*2-2 = 2, so a(1)=1;
Prime(3) = 5, 5*3-2 = 13, 5*5-2 = 23, so a(3)=2;
		

Crossrefs

Programs

  • Haskell
    a103960 n = sum [a010051' $ p * q - 2 |
                     let p = a000040 n, q <- takeWhile (<= p) a000040_list]
    -- Reinhard Zumkeller, Jul 30 2015
  • Mathematica
    Table[p=Prime[n]; ct=0; Do[pk=Prime[k]; If[PrimeQ[p*pk-2], ct=ct+1], {k, n}]; ct, {n, 100}]

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

Original entry on oeis.org

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

Views

Author

Jayanta Basu, Apr 21 2013

Keywords

Examples

			For n=4, p=7, there are a(4)=2 solutions from 7*3+2=23 and 7*5+2=37.
		

Crossrefs

Programs

  • Mathematica
    Table[p = Prime[n]; c = 0; i = 1; While[i < n, If[PrimeQ[p*Prime[i] + 2], c = c + 1]; i++]; c, {n, 80}]
    Table[Count[Prime[n]Prime[Range[n-1]]+2,?PrimeQ],{n,80}] (* _Harvey P. Dale, Feb 28 2023 *)
Showing 1-5 of 5 results.