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

A370867 Records in A224908.

Original entry on oeis.org

0, 2, 3, 5, 7, 8, 11, 12, 14, 15, 19, 20, 24, 27, 32, 39, 44, 49, 50, 52, 56, 57, 66, 68, 87, 103, 109, 121, 127, 148, 152, 163, 197, 216, 235, 260, 283, 325, 356, 374, 395, 406, 437, 485, 488, 494, 566, 569, 617, 644, 658, 673, 747, 770, 774, 809, 820, 826
Offset: 1

Views

Author

Harvey P. Dale, Mar 03 2024

Keywords

Crossrefs

Cf. A224908.

Programs

  • Mathematica
    DeleteDuplicates[Table[Count[Prime[n]+Prime[Range[n-1]]+1,_?PrimeQ],{n,3000}],GreaterEqual]

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 *)

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

A224925 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, 0, 2, 3, 2, 4, 2, 4, 3, 2, 7, 4, 5, 8, 2, 4, 2, 8, 7, 6, 11, 7, 6, 5, 10, 4, 11, 4, 11, 5, 14, 6, 6, 12, 4, 17, 10, 14, 5, 4, 4, 14, 6, 12, 9, 14, 24, 14, 7, 14, 11, 6, 21, 11, 6, 7, 6, 23, 15, 13, 18, 8, 18, 11, 22, 8, 29, 16, 11, 22, 9, 7, 21, 19, 26
Offset: 1

Views

Author

Jayanta Basu, Apr 20 2013

Keywords

Examples

			a(3)=2 since for the third prime 5 we have 5*2-(5+2)=3 and 5*3-(5+3)=7. Also a(4)=3 since for the fourth prime 7 we have 7*2-(7+2)=5, 7*3-(7+3)=11 and 7*5-(7+5)=23.
		

Crossrefs

Programs

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

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

A224979 Number of primes of the form p-q+1 where q is any prime < p = prime(n).

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 4, 4, 6, 6, 4, 3, 8, 6, 10, 10, 12, 5, 4, 12, 9, 8, 16, 18, 6, 16, 10, 16, 12, 20, 6, 18, 16, 14, 24, 8, 9, 10, 26, 22, 28, 12, 22, 13, 26, 16, 12, 14, 24, 18, 30, 36, 16, 32, 28, 32, 38, 14, 13, 32, 16, 38, 16, 34, 17, 30, 12, 18, 32, 26
Offset: 1

Views

Author

Jayanta Basu, Apr 22 2013

Keywords

Examples

			For n=5, p=11, there are a(5)=2 solutions: 11-5+1=7 and 11-7+1=5.
		

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, 70}]
    Table[Count[Prime[n]-Prime[Range[n-1]]+1,?PrimeQ],{n,70}] (* _Harvey P. Dale, Jan 08 2015 *)
  • PARI
    a(n)=my(p=prime(n),s);forprime(q=2,p-1,s+=isprime(p-q+1));s \\ Charles R Greathouse IV, Apr 22 2013

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

Original entry on oeis.org

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

Views

Author

Jayanta Basu, Apr 21 2013

Keywords

Examples

			For n=3, p=5, there are no primes q(<5) such that both 5+q+1 and 5+q-1 are primes and hence a(3)=0. Also for n=5, p=11, there is a(5)=1 solution 7 since 11+7+1=19, 11+7-1=17.
		

Crossrefs

Programs

  • Mathematica
    Table[p = Prime[n]; c = 0; i = 1; While[i < n, p1 = p + Prime[i]; If[PrimeQ[p1 + 1] && PrimeQ[p1 - 1], c = c + 1]; i++]; c, {n, 85}]
    pq1[n_]:=Module[{pr1=Prime[Range[n-1]],pr2=Prime[n]},Total[ Table[ If[ AllTrue[pr2+pr1[[k]]+{1,-1},PrimeQ],1,0],{k,Length[pr1]}]]]; Array[ pq1,100] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 20 2020 *)

A224980 Number of primes of the form p-q-1 where q is any prime < p = prime(n).

Original entry on oeis.org

0, 0, 1, 1, 3, 2, 4, 4, 5, 4, 6, 8, 6, 8, 7, 6, 7, 12, 12, 10, 12, 14, 9, 8, 14, 12, 16, 11, 16, 14, 20, 14, 10, 16, 10, 24, 22, 20, 11, 12, 13, 28, 16, 22, 18, 26, 38, 22, 13, 24, 14, 18, 36, 18, 16, 17, 18, 38, 32, 28, 32, 16, 30, 24, 34, 20, 48, 38, 17
Offset: 1

Views

Author

Jayanta Basu, Apr 22 2013

Keywords

Examples

			For n=5, p=11, there are a(5)=3 solutions: 11-3-1=7, 11-5-1=5, and 11-7-1=3.
		

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, 69}]
  • PARI
    a(n)=my(p=prime(n),s);forprime(q=2,p-1,s+=isprime(p-q-1));s \\ Charles R Greathouse IV, Apr 22 2013

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

Original entry on oeis.org

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

Views

Author

Jayanta Basu, Apr 22 2013

Keywords

Examples

			For n=3, p=5, there are no primes q(<5) such that both 5-q+1 and 5-q-1 are primes and hence a(3)=0. Also for n=5, p=11, there are a(5)=2 solutions 5,7 since 11-5+1=7, 11-5-1=5 and 11-7+1=5, 11-7-1=3.
		

Crossrefs

Programs

A225216 Let p = n-th prime. Then a(n) = number of primes generated by prepending to the digits of p the digits of q, where q is any prime less than p.

Original entry on oeis.org

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

Views

Author

Jayanta Basu, May 02 2013

Keywords

Comments

The graph makes it apparent that there are fewer primes generated when the prime p increases its length from 3 to 4 and 4 to 5 digits. - T. D. Noe, May 03 2013

Examples

			a(2)=1 since second prime 3 generates 23. Also a(7)=2 since for the seventh prime 17 we have two primes 317 and 1117.
		

Crossrefs

Programs

  • Mathematica
    con[x_,y_] := FromDigits[Join[IntegerDigits[Prime[x]], IntegerDigits[Prime[y]]]]; t={}; Do[c=0; Do[If[PrimeQ[con[i,n]], c=c+1], {i,n}]; AppendTo[t,c], {n,78}]; t
Showing 1-10 of 10 results.