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

A076300 Numbers k such that prime(k) + s*k is prime, s=5.

Original entry on oeis.org

1, 2, 6, 8, 10, 12, 14, 18, 30, 36, 38, 40, 48, 50, 52, 54, 64, 66, 68, 72, 74, 78, 80, 84, 96, 110, 118, 120, 122, 124, 134, 142, 148, 150, 154, 160, 178, 184, 186, 188, 198, 204, 210, 214, 220, 224, 228, 238, 240, 242, 246, 250, 252, 254, 258, 260, 268, 270
Offset: 1

Views

Author

Zak Seidov, Oct 05 2002

Keywords

Examples

			2 is in the sequence because p(2) + 5*2 = 3 + 10 = 13 is prime.
		

Crossrefs

Cf. A064402 (s=1), A076297 (s=2), A076298 (s=3), A076299 (s=4).

Programs

  • Magma
    [n: n in [0..500]| IsPrime(NthPrime(n) +5*n)]; // Vincenzo Librandi, Apr 06 2011
    
  • Mathematica
    Select[Range[300],PrimeQ[Prime[#]+5#]&] (* Harvey P. Dale, Nov 27 2013 *)
  • PARI
    select(x->isprime(x), vector(500, n, prime(n) + 5*n), 1) \\ Michel Marcus, Jan 15 2015
    
  • PARI
    isok(n) = isprime(prime(n) + 5*n); \\ Michel Marcus, May 05 2018

A076298 Numbers k such that prime(k) + s*k is prime, s=3.

Original entry on oeis.org

1, 4, 6, 8, 10, 12, 16, 20, 26, 28, 32, 34, 38, 40, 42, 46, 48, 50, 56, 60, 62, 64, 68, 78, 86, 90, 94, 102, 104, 120, 122, 128, 130, 138, 140, 144, 146, 148, 162, 166, 170, 180, 182, 186, 190, 200, 204, 208, 214, 230, 238, 244, 246, 250, 252, 254, 260, 270, 282
Offset: 1

Views

Author

Zak Seidov, Oct 05 2002

Keywords

Comments

See also A064402 (s=1), A076297 (s=2), A076299 (s=4), A076300 (s=5).

Examples

			4 is OK because p(4) + 3*4 = 7 + 12 = 19 is prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..500]| IsPrime(NthPrime(n) +3*n)]; // G. C. Greubel, May 04 2018
    
  • Mathematica
    Select[Range[300],PrimeQ[3#+Prime[#]]&] (* Harvey P. Dale, Sep 06 2012 *)
  • PARI
    select(x->isprime(x), vector(500, n, prime(n) + 3*n), 1) \\ G. C. Greubel, May 04 2018

A076299 Numbers k such that prime(k) + s*k is prime, s=4.

Original entry on oeis.org

2, 3, 4, 5, 6, 9, 15, 17, 20, 21, 22, 25, 27, 30, 31, 33, 42, 46, 54, 56, 58, 60, 62, 67, 72, 73, 78, 81, 84, 86, 87, 88, 90, 93, 96, 99, 100, 105, 111, 112, 113, 115, 119, 127, 128, 133, 135, 137, 145, 146, 151, 152, 162, 163, 164, 165, 168, 170, 172, 173, 176, 177
Offset: 1

Views

Author

Zak Seidov, Oct 05 2002

Keywords

Comments

See also A064402 (s=1), A076297 (s=2), A076298 (s=3), A076300 (s=5).

Examples

			4 is OK because p(4) + 4*4 = 7 + 16 = 23 is prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..500]| IsPrime(NthPrime(n) +4*n)]; // G. C. Greubel, May 04 2018
    
  • Mathematica
    Select[Range[500], PrimeQ[Prime[#] + 4 #] &] (* G. C. Greubel, May 04 2018 *)
  • PARI
    select(x->isprime(x), vector(500, n, prime(n) + 4*n), 1) \\ G. C. Greubel, May 04 2018

A186102 Smallest prime p such that p == n (mod prime(n)).

Original entry on oeis.org

3, 2, 3, 11, 5, 19, 7, 103, 101, 97, 11, 197, 13, 229, 109, 281, 17, 79, 19, 233, 167, 101, 23, 113, 607, 127, 233, 349, 29, 821, 31, 163, 307, 173, 631, 1093, 37, 853, 373, 1597, 41, 223, 43, 1009, 439, 643, 47, 271, 503, 2111, 983, 769, 53, 1811, 569, 2423
Offset: 1

Views

Author

Zak Seidov, Feb 12 2011

Keywords

Comments

a(n) = n iff n is prime.

Examples

			Eighth prime is 19, and 103 is the smallest prime p such that p mod 19 is 8. Therefore a(8) = 103.
		

Crossrefs

Programs

  • Haskell
    a186102 n = f a000040_list where
       f (q:qs) = if (q - n) `mod` (a000040 n) == 0 then q else f qs
    -- Reinhard Zumkeller, Aug 21 2015
  • Magma
    Aux:=function(n); q:=NthPrime(n); p:=2; while p mod q ne n do p:=NextPrime(p); end while; return p; end function; [ Aux(n): n in [1..70] ]; // Klaus Brockhaus, Feb 12 2011
    
  • Mathematica
    k=200;Table[p=Prime[n];m=n;While[!PrimeQ[m],m=m+p];m,{n,k}]; (* For the first k terms. Zak Seidov, Dec 13 2013 *)
    Flatten[With[{prs=Prime[Range[500]]},Table[Select[prs,Mod[#,Prime[n]] == n&,1],{n,60}]]] (* Harvey P. Dale, Mar 30 2012 *)
  • Sage
    def A186102(n): np = nth_prime(n); return next(p for p in Primes() if p % np == n) # [D. S. McNeil, Feb 13 2011]
    

A237367 Number of ordered ways to write n = k + m with k > 0 and m > 0 such that 2*k - 1, prime(k)^2 - 2 and prime(m)^2 - 2 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 07 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 2, and a(n) = 1 only for n = 3, 73, 81, 534.
(ii) Any integer n > 2 can be written as k + m with k > 0 and m > 0 such that 2*k - 1, prime(k) + k*(k-1) and prime(m) + m*(m-1) are all prime.
(iii) Every n = 9, 10, ... can be written as k + m with k > 0 and m > 0 such that 6*k - 1, prime(k) + 2*k and prime(m) + 2*m are all prime.
Clearly, part (i) of this conjecture implies that there are infinitely many primes p with p^2 - 2 also prime. Similar comments apply to parts (ii) and (iii).

Examples

			a(3) = 1 since 3 = 2 + 1 with 2*2 - 1 = 3, prime(2)^2 - 2 = 3^2 - 2 = 7 and prime(1)^2 - 2 = 2^2 - 2 = 2 all prime.
a(73) = 1 since 73 = 55 + 18 with 2*55 - 1 = 109, prime(55)^2 - 2 = 257^2 - 2 = 66047 and prime(18)^2 - 2 = 61^2 - 2 = 3719 all prime.
a(81) = 1 since 81 = 34 + 47 with 2*34 - 1 = 67, prime(34)^2 - 2 = 139^2 - 2 = 19319 and prime(47)^2 - 2 = 211^2 - 2 = 44519 all prime.
a(534) = 1 since 534 = 100 + 434 with 2*100 - 1 = 199, prime(100)^2 - 2 = 541^2 - 2 = 292679 and prime(434)^2 - 2 = 3023^2 - 2 = 9138527 all prime.
		

Crossrefs

Programs

  • Mathematica
    pq[k_]:=PrimeQ[Prime[k]^2-2]
    a[n_]:=Sum[If[PrimeQ[2k-1]&&pq[k]&&pq[n-k],1,0],{k,1,n-1}]
    Table[a[n],{n,1,80}]

A174184 Prime(n)+even nonprime(n) is prime.

Original entry on oeis.org

1, 2, 3, 7, 9, 11, 12, 13, 14, 18, 24, 27, 28, 29, 30, 36, 38, 43, 44, 53, 54, 55, 57, 60, 63, 64, 65, 66, 72, 74, 80, 84, 90, 93, 102, 103, 108, 110, 111, 117, 118, 125, 126, 135, 138, 141, 143, 148, 150, 155, 156, 162, 165, 171, 174, 180, 183, 186, 188, 190, 198
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 11 2010

Keywords

Comments

Unit together with prime(n)+s*n is prime, s=2.

Examples

			1 is in the sequence because A000040(1) + A163300(1) = 2 (1st prime) + 0 (1st even nonprime) is prime;
2 is in the sequence because A000040(2) + A163300(2) = 3 (2nd prime) + 4 (2nd even nonprime) is prime.
		

Crossrefs

Programs

  • Maple
    From R. J. Mathar, Apr 20 2010: (Start)
    A163300 := proc(n) option remember ; if n = 1 then 0; else for a from procname(n-1)+2 by 2 do if not isprime(a) then return a ; end if; end do; end if; end proc:
    for n from 1 to 200 do if isprime( ithprime(n) + A163300(n)) then printf("%d,",n) ; end if; end do: (End)

Formula

a(n+1)=A076297(n).

Extensions

Entries checked by R. J. Mathar, Apr 20 2010
Showing 1-6 of 6 results.