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

A156148 Numbers k such that prime(prime(k)) + 2 == 0 (mod prime(k)), where prime(p)=A000040(p) is the p-th prime.

Original entry on oeis.org

5, 20, 51891, 51893
Offset: 1

Views

Author

M. F. Hasler, Feb 04 2009

Keywords

Comments

No additional terms up to k=500,000. - Harvey P. Dale, Jul 12 2022

Crossrefs

Cf. A156155.

Programs

  • Mathematica
    Select[Range[52000],Mod[Prime[Prime[#]]+2,Prime[#]]==0&] (* Harvey P. Dale, Jul 12 2022 *)
  • PARI
    p=c=0; until(0, until( isprime(c++), p=nextprime(p+1)); (p+2)%c & next; print1( primepi(c)","))

Formula

a(n) = A000720(A156149(n)).

A156150 Primes p such that p+2 = 0 (mod pi(p)) and pi(p)=A000720(p) is prime.

Original entry on oeis.org

31, 353, 9559783, 9559903
Offset: 1

Views

Author

M. F. Hasler, Feb 04 2009

Keywords

Comments

A subsequence of A156151.

Crossrefs

Cf. A156153.

Programs

  • PARI
    p=c=0; until(0, until( isprime(c++), p=nextprime(p+1)); (p+2)%c & next; print1( p","))

Formula

a(n) = A000040(A156149(n))

A260989 Integers n such that prime(n-1) + prime(n+1) is a multiple of n.

Original entry on oeis.org

4, 5, 8, 11, 12, 18, 20, 70, 72, 1053, 4116, 6459, 6460, 40083, 63328, 251742, 399924, 637320, 637322, 637330, 2582288, 2582436, 2582488, 10553828, 16899042, 69709721, 179992913, 179992922, 465769813, 749973302, 749973314, 1208198617, 1208198629
Offset: 1

Views

Author

Zak Seidov, Aug 06 2015

Keywords

Examples

			n=4: prime(n-1) + prime(n+1) = 5 + 11 = 16 = 4*n,
n=20: 67 + 73 = 140 = 7*n,
n=16899042: 312632263 + 312632291 = 625264554 = 37*n,
n=69709721: 1394194387 + 1394194453 = 2788388840 = 40*n.
		

Crossrefs

Programs

  • Magma
    [n: n in [2..7*10^3], k in [2..7*10^3] | (NthPrime(n-1) + NthPrime(n+1)) eq n*k]; // Vincenzo Librandi, Aug 07 2015
  • Mathematica
    Select[Range[2, 100000], Mod[Prime[# - 1] + Prime[# + 1], #] == 0 &] (* Michael De Vlieger, Aug 07 2015 *)
  • PARI
    a=2;b=5;for(n=2,10^8,c=a+b;if(c%n<1,print1(n", "));a=nextprime(a+1);b=nextprime(b+1))
    
  • PARI
    p=2;q=3;n=1; forprime(r=5,1e9, if((p+r)%n++==0, print1(n", "));p=q;q=r) \\ Charles R Greathouse IV, Aug 10 2015
    

Extensions

a(27)-a(33) from Charles R Greathouse IV, Aug 10 2015
Showing 1-3 of 3 results.