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.

A118071 Primes which are the sum of a twin prime pair + 1.

Original entry on oeis.org

13, 37, 61, 277, 397, 457, 541, 1201, 1237, 1321, 1621, 1657, 2557, 2857, 3217, 4057, 4177, 4261, 4621, 5101, 5581, 6337, 6661, 6781, 7057, 7537, 8101, 8317, 8461, 8521, 8677, 9277, 9601, 10837, 10957, 11317, 11701, 12541, 12601, 12721, 13381, 13921
Offset: 1

Views

Author

Jonathan Vos Post, May 11 2006

Keywords

Examples

			a(1) = 13 = 5 + 7 + 1 where (5,7) is a twin prime pair.
a(2) = 37 = 17 + 19 + 1.
a(3) = 61 = 29 + 31 + 1.
a(4) = 277 = 137 + 139 + 1.
a(5) = 397 = 197 + 199 + 1.
		

Crossrefs

Programs

  • Mathematica
    Select[Total/@Select[Partition[Prime[Range[1000]],2,1],#[[2]]-#[[1]] == 2&]+1,PrimeQ] (* Harvey P. Dale, Jul 25 2019 *)
  • PARI
    is(n)=n%12==1 && isprime(n) && isprime(n\2-1) && isprime(n\2+1) \\ Charles R Greathouse IV, Jan 21 2015

Formula

{A001359(k) + A006512(k) + 1} INTERSECT {A000040}.
{A054735(k) + 1} INTERSECT {A000040}.
{2*A001359(k) + 3} INTERSECT {A000040}.
{2*A006512(k) - 1} INTERSECT {A000040}. - Juri-Stepan Gerasimov, Apr 26 2010

Extensions

More terms added by Vladimir Joseph Stephan Orlovsky, Mar 10 2009

A177336 Greater of twin primes p such that 3*p-2 is also greater of twin primes.

Original entry on oeis.org

5, 7, 61, 271, 1951, 3001, 6361, 11491, 11551, 14551, 18541, 19891, 21841, 31081, 32911, 32971, 33331, 33601, 42571, 42841, 50461, 53551, 58111, 68881, 70201, 74611, 79231, 80911, 93811, 96331, 98911, 104311, 109141, 114601, 121021, 125791
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 07 2010

Keywords

Examples

			a(1) = 5 because 5 is the greater of the twin primes (3, 5) and 3*5 - 2 = 13 is the greater of the twin primes (11, 13).
		

Crossrefs

Programs

  • Magma
    [p:p in PrimesInInterval(3,130000)| IsPrime(p-2) and IsPrime(3*p-2) and IsPrime(3*p-4)]; // Marius A. Burtea, Dec 23 2019
  • Mathematica
    Select[Range[3, 126000], And @@ PrimeQ[{#, # - 2, 3# - 2, 3# - 4}] &] (* Amiram Eldar, Dec 23 2019 *)

Formula

From Wesley Ivan Hurt, May 03 2022: (Start)
a(n) = A132929(n) + 1.
a(n) = A174920(n) + 2. (End)

Extensions

Definition corrected, 1231 and 1483 inserted, and all values above 3000 corrected by R. J. Mathar, May 10 2010
Terms corrected to match definition by D. S. McNeil, May 10 2010
Name corrected by Amiram Eldar, Dec 23 2019

A307833 Smallest k > 1 such that A014574(n)*k is adjacent to a prime.

Original entry on oeis.org

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

Views

Author

Dmitry Kamenetsky, May 01 2019

Keywords

Comments

It is perhaps surprising that the values in this sequence are so small. For n < 8000 the largest value of a(n) is 20, which occurs for n = 4928. Also for n < 8000, a(n) is 2 on 2449 occasions.
a(n)=2 if and only if A014574(n)+1 is in A038869 or A014574(n)-1 is in A045536. - Robert Israel, Jul 17 2019

Examples

			72*5 = 360, which is adjacent to the prime 359, so a(8) = 5.
		

Crossrefs

Programs

  • Maple
    P:= {seq(ithprime(i),i=1..10^4)}:
    A014574:= sort(convert(map(t -> t+1, P intersect map(`-`,P,2)),list)):
    f:= proc(m) local k;
      for k from 2 do
        if isprime(k*m-1) or isprime(k*m+1) then return k fi
      od
    end proc:
    map(f, A014574); # Robert Israel, Jul 17 2019
  • Mathematica
    primeNearQ[n_] := AnyTrue[{-1, 1} + n, PrimeQ]; twinMidQ[n_] := AllTrue[{-1, 1} + n, PrimeQ]; f[n_] := Module[{k = 2}, While[! primeNearQ[k*n], k++]; k]; f /@ Select[Range[10^4], twinMidQ] (* Amiram Eldar, Jul 05 2019 *)
  • PARI
    isok2(n) = isprime(n-1) && isprime(n+1);
    k(n) = my(k=2); while (! (isprime(n*k-1) || isprime(n*k+1)), k++); k;
    lista(nn) = for (n=1, nn, if (isok2(n), print1(k(n), ", "))); \\ Michel Marcus, May 01 2019

Formula

a(n) = A309120(A014574(n)). - Robert Israel, Jul 17 2019
Showing 1-3 of 3 results.