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 12 results. Next

A153418 Primes p such that p+18 is also prime.

Original entry on oeis.org

5, 11, 13, 19, 23, 29, 41, 43, 53, 61, 71, 79, 83, 89, 109, 113, 131, 139, 149, 163, 173, 179, 181, 193, 211, 223, 233, 239, 251, 263, 293, 313, 331, 349, 379, 383, 401, 421, 431, 439, 443, 449, 461, 491, 503, 523, 569, 599, 601, 613, 641, 643, 659, 673, 683
Offset: 1

Views

Author

Keywords

Comments

Both p and p+18 have the same digital root (A010888). - Zak Seidov, Sep 14 2015
No term belongs to A030432. - Michel Marcus, Sep 14 2015
No term belongs to A045437. - Bruno Berselli, Sep 14 2015

Examples

			5 is in sequence because 5+18=23 is also prime;
11 is in sequence because 11+18=29 is also prime.
		

Crossrefs

A031936 is a subsequence. - Zak Seidov, Sep 13 2015

Programs

  • Magma
    [p: p in PrimesUpTo(1000) | IsPrime(p+18)]; // Vincenzo Librandi, Apr 14 2013
    
  • Mathematica
    lst={};d=18;Do[p=Prime[n];If[PrimeQ[p+d],AppendTo[lst,p]],{n,6!}];lst
    Select[Prime[Range[150]], PrimeQ[(# + 18)]&] (* Vincenzo Librandi, Apr 14 2013 *)
  • PARI
    list(n)=forprime(p=1,n,if(isprime(p+18),print1(p", ")))  \\ Anders Hellström, Sep 13 2015
    
  • Sage
    [p for p in primes(700) if is_prime(p+18)]; # Bruno Berselli, Sep 14 2015

Extensions

Definition improved by Bruno Berselli, Oct 31 2012

A156104 Primes p such that p+36 is also prime.

Original entry on oeis.org

5, 7, 11, 17, 23, 31, 37, 43, 47, 53, 61, 67, 71, 73, 101, 103, 113, 127, 131, 137, 157, 163, 191, 193, 197, 227, 233, 241, 257, 271, 277, 281, 311, 313, 317, 331, 337, 347, 353, 373, 383, 397, 421, 431, 443, 463, 467, 487, 521, 541, 557, 563, 571, 577, 607
Offset: 1

Views

Author

Vincenzo Librandi, Feb 08 2009

Keywords

Crossrefs

Cf. A156112.
Cf. sequences of the type p+n are primes: A001359 (n=2), A023200 (n=4), A023201 (n=6), A023202 (n=8), A023203 (n=10), A046133 (n=12), A153417 (n=14), A049488 (n=16), A153418 (n=18), A153419 (n=20), A242476 (n=22), A033560 (n=24), A252089 (n=26), A252090 (n=28), A049481 (n=30), A049489 (n=32), A252091 (n=34), this sequence (n=36); A062284 (n=50), A049490 (n=64), A156105 (n=72), A156107 (n=144).

Programs

  • Magma
    [p: p in PrimesUpTo(1000) | IsPrime(p + 36)]; // Vincenzo Librandi, Oct 31 2012
  • Mathematica
    Select[Prime[Range[1000]], PrimeQ[(#+ 36)]&] (* Vincenzo Librandi, Oct 31 2012 *)

A153419 Primes p such that p+20 is also prime.

Original entry on oeis.org

3, 11, 17, 23, 41, 47, 53, 59, 83, 89, 107, 131, 137, 173, 179, 191, 251, 257, 263, 293, 311, 317, 347, 353, 359, 389, 401, 419, 443, 467, 479, 503, 521, 557, 587, 593, 599, 641, 653, 719, 809, 839, 857, 863, 887, 947, 971, 977, 1013, 1019, 1031, 1049, 1097
Offset: 1

Views

Author

Keywords

Examples

			3 is in the sequence because 3+20=23 is prime; 11 is in the sequence because 11+20=31 is prime.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(1100) | IsPrime(p + 20)]; // Vincenzo Librandi, Apr 14 2013
  • Maple
    for a from 1 to 140 do if isprime(a) and isprime(a+20) then print(a)
      end if;  end do; # Matt C. Anderson, Jun 20 2022
  • Mathematica
    Select[Prime[Range[200]], PrimeQ[(# + 20)]&] (* Vincenzo Librandi, Apr 14 2013 *)

Extensions

Definition improved from Bruno Berselli, Oct 31 2012

A252089 Primes p such that p + 26 is prime.

Original entry on oeis.org

3, 5, 11, 17, 41, 47, 53, 71, 83, 101, 113, 131, 137, 167, 173, 197, 251, 257, 281, 311, 347, 353, 383, 431, 461, 521, 587, 593, 617, 647, 683, 701, 743, 761, 797, 827, 857, 881, 911, 941, 971, 983, 1013, 1061, 1091, 1097, 1103, 1187, 1223, 1277, 1301, 1373
Offset: 1

Views

Author

Vincenzo Librandi, Dec 14 2014

Keywords

Examples

			17 is in this sequence because 17+26 = 43 is prime.
431 is in this sequence because 431+26 = 457 is prime.
		

Crossrefs

Cf. sequences of the type p+n are primes: A001359 (n=2), A023200 (n=4), A023201 (n=6), A023202 (n=8), A023203 (n=10), A046133 (n=12), A153417 (n=14), A049488 (n=16), A153418 (n=18), A153419 (n=20), A242476 (n=22), A033560 (n=24), this sequence (n=26), A252090 (n=28), A049481 (n=30), A049489 (n=32), A252091 (n=34), A156104 (n=36); A062284 (n=50), A049490 (n=64), A156105 (n=72), A156107 (n=144).

Programs

  • Magma
    [NthPrime(n): n in [1..250] | IsPrime(NthPrime(n)+26)];
  • Mathematica
    Select[Prime[Range[200]], PrimeQ[# + 26] &]

A231608 Table whose n-th row consists of primes p such that p + 2n is also prime, read by antidiagonals.

Original entry on oeis.org

3, 3, 5, 5, 7, 11, 3, 7, 13, 17, 3, 5, 11, 19, 29, 5, 7, 11, 13, 37, 41, 3, 7, 13, 23, 17, 43, 59, 3, 5, 11, 19, 29, 23, 67, 71, 5, 7, 17, 17, 31, 53, 31, 79, 101, 3, 11, 13, 23, 19, 37, 59, 37, 97, 107, 7, 11, 13, 31, 29, 29, 43, 71, 41, 103, 137
Offset: 1

Views

Author

T. D. Noe, Nov 26 2013

Keywords

Examples

			The following sequences are read by antidiagonals
{3, 5, 11, 17, 29, 41, 59, 71, 101, 107,...}
{3, 7, 13, 19, 37, 43, 67, 79, 97, 103,...}
{5, 7, 11, 13, 17, 23, 31, 37, 41, 47,...}
{3, 5, 11, 23, 29, 53, 59, 71, 89, 101,...}
{3, 7, 13, 19, 31, 37, 43, 61, 73, 79,...}
{5, 7, 11, 17, 19, 29, 31, 41, 47, 59,...}
{3, 5, 17, 23, 29, 47, 53, 59, 83, 89,...}
{3, 7, 13, 31, 37, 43, 67, 73, 97, 151,...}
{5, 11, 13, 19, 23, 29, 41, 43, 53, 61,...}
{3, 11, 17, 23, 41, 47, 53, 59, 83, 89,...}
...
		

Crossrefs

Cf. A020483 (numbers in first column).
Cf. A086505 (numbers on the diagonal).

Programs

  • Maple
    A231608 := proc(n,k)
        local j,p ;
        j := 0 ;
        p := 2;
        while j < k do
            if isprime(p+2*n ) then
                j := j+1 ;
            end if;
            if j = k then
                return p;
            end if;
            p := nextprime(p) ;
        end do:
    end proc:
    for n from 1 to 10 do
        for k from 1 to 10 do
            printf("%3d ",A231608(n,k)) ;
        end do;
        printf("\n") ;
    end do: # R. J. Mathar, Nov 19 2014
  • Mathematica
    nn = 10; t = Table[Select[Range[100*nn], PrimeQ[#] && PrimeQ[# + 2*n] &, nn], {n, nn}]; Table[t[[n-j+1, j]], {n, nn}, {j, n}]

A282423 a(n) = smallest k such that A282026(k) = n, or 0 if no such k exists.

Original entry on oeis.org

3, 2, 0, 13, 19, 0, 427, 4, 0, 0, 1, 0, 802, 99412, 0, 3097, 7, 0, 637, 0, 0, 7225627, 30898822, 0, 0, 280134277, 0, 31705902442, 43190647, 0, 965577112
Offset: 1

Views

Author

Andrey Zabolotskiy and Altug Alkan, Feb 14 2017, following a suggestion from N. J. A. Sloane

Keywords

Comments

a(n) is nonzero if n is in A282429.
For n>4 and nonzero a(n), 2*a(n)+3 is in A022004. For n>8 and nonzero a(n), 2*a(n)+3 is also in A153417. For n>16 and nonzero a(n), 2*a(n)+3 is also in A049481.

Examples

			a(10) = 0. Proof: Suppose 10 is a term of A282026. For the corresponding n, 2*n + 1 cannot be divisible by 5 because of A282026’s definition (gcd(10, 2*n + 1) = 1). So 2*n + 1 can be only of the form 10*k + 1, 10*k + 3, 10*k + 7, 10*k + 9. But 10*k + 1 + 2*2, 10*k + 3 + 2*1, 10*k + 7 + 2*4, 10*k + 9 + 2*8 are all composite and 1, 2, 4, 8 are relatively prime to any odd number. Since all of them are smaller than 10, this is the contradiction to the assumption that 10 is the term which is the smallest number for corresponding n. This also proves that a(5*k) = 0 for any k > 1.
		

Crossrefs

A161866 Numbers k such that k^2+k+7 and k^2+k-7 are both prime.

Original entry on oeis.org

3, 5, 9, 12, 24, 29, 32, 39, 44, 50, 57, 59, 65, 102, 135, 137, 144, 170, 180, 207, 260, 267, 297, 302, 305, 344, 347, 360, 365, 369, 389, 404, 429, 464, 474, 495, 540, 555, 570, 612, 620, 659, 662, 689, 767, 774, 792, 824, 837, 872, 885, 900, 950, 954, 989
Offset: 1

Views

Author

Keywords

Examples

			a(1)=3 as 12+-7 are primes. a(2)=5 as 30+-7 are primes.
		

Crossrefs

Programs

  • Magma
    [k:k in [1..1000]| IsPrime(k^2+k+7) and IsPrime(k^2+k-7)]; // Marius A. Burtea, Feb 17 2020
  • Mathematica
    q=7;lst7={};Do[p=n^2+n;If[PrimeQ[p-q]&&PrimeQ[p+q],AppendTo[lst7,n]], {n,0,7!}];lst7
    Select[Range[1000],AllTrue[#^2+#+{7,-7},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 26 2021 *)

Extensions

Definition rephrased by R. J. Mathar, Jun 23 2009

A222424 Numbers n such that n and n + 14 are prime and there is a power of two in the interval (n,n+14).

Original entry on oeis.org

3, 5, 23, 29, 53, 59, 509, 1019, 2039, 262133, 262139, 536870909, 73786976294838206459, 2787593149816327892691964784081045188247543
Offset: 1

Views

Author

Brad Clardy, Feb 24 2013

Keywords

Comments

It is a conjecture that this is a finite sequence. A search was conducted out to 2^1500.

Crossrefs

Programs

  • Magma
    //Program finds primes separated by an even number (called gap) which
    //have a power of two between them. Program starts with the smallest
    //power of two above gap. Primes less than this starting point can be
    //checked by inspection.
    gap:=14;
    start:=Ilog2(gap)+1;
    for i:= start to 1000 do
        powerof2:=2^i;
        for k:=powerof2-gap+1 to powerof2-1 by 2 do
            if (IsPrime(k) and IsPrime(k+gap)) then k;
            end if;
        end for;
    end for;

A329262 Prime pairs of the form (30k - 7, 30k + 7).

Original entry on oeis.org

23, 37, 53, 67, 83, 97, 113, 127, 263, 277, 293, 307, 353, 367, 383, 397, 443, 457, 563, 577, 593, 607, 743, 757, 773, 787, 863, 877, 953, 967, 983, 997, 1103, 1117, 1223, 1237, 1283, 1297, 1433, 1447, 1553, 1567, 1583, 1597, 1613, 1627
Offset: 1

Views

Author

Harry E. Neel, Nov 09 2019

Keywords

Comments

The terms of this sequence are created by pairing the terms of the primes when the terms 30k - 7 and 30k + 7 are both prime. As has been pointed out, it is only a guess as to whether, or not, that (like the twin primes, etc.) there is or is not an infinite number of these pairings.

Examples

			As 4 * 30 - 7 = 113 and 4 * 30 + 7 = 127 are prime, both 113 and 127 are in the sequence. - _David A. Corneth_, Nov 10 2019
		

Crossrefs

Odd- (resp. even-) indexed terms are a subsequence of A132235 (resp. A132231).

Programs

  • Magma
    &cat[[30*k-7] cat [30*k+7]:k in [1..60]|IsPrime(30*k-7) and IsPrime(30*k+7)]; // Marius A. Burtea, Nov 17 2019
  • Mathematica
    Select[Prime[Range[1000]], MemberQ[{7, 23}, Mod[#, 30]] &] (* Jinyuan Wang, Nov 16 2019 *)
    Flatten[Select[Table[30n + {-7, 7}, {n, 90}], PrimeQ[#[[1]]] && PrimeQ[#[[2]]] &]] (* Alonso del Arte, Dec 07 2019 *)
  • PARI
    first(n) = n+=(n%2); my(res=List(),todo=n); for(i=1,oo, if(isprime(30*i-7) && isprime(30*i+7), listput(res,30*i-7); listput(res,30*i+7); todo-=2; if(todo<=0, return(res)))) \\ David A. Corneth, Nov 10 2019
    

A106063 Primes p such that 1*p + 14 and 14*p + 1 are primes.

Original entry on oeis.org

3, 5, 17, 47, 53, 59, 83, 113, 149, 167, 269, 353, 419, 443, 449, 509, 563, 587, 599, 647, 659, 677, 719, 797, 977, 983, 1103, 1109, 1187, 1223, 1289, 1367, 1409, 1433, 1439, 2039, 2099, 2237, 2297, 2357, 2423, 2543, 2579, 2657, 2753, 2789, 2837, 2957, 3023
Offset: 1

Views

Author

Zak Seidov, May 07 2005

Keywords

Crossrefs

Sunsequence of A153417. - Michel Marcus, Jan 20 2018

Programs

  • Magma
    [p: p in PrimesUpTo(10000)| IsPrime(p+14) and IsPrime(14*p+1)]; // Vincenzo Librandi, Nov 13 2010
  • Mathematica
    Select[Prime[Range[220]], PrimeQ[14#+1]&&PrimeQ[1#+14]&]
Showing 1-10 of 12 results. Next