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

A023201 Primes p such that p + 6 is also prime. (Lesser of a pair of sexy primes.)

Original entry on oeis.org

5, 7, 11, 13, 17, 23, 31, 37, 41, 47, 53, 61, 67, 73, 83, 97, 101, 103, 107, 131, 151, 157, 167, 173, 191, 193, 223, 227, 233, 251, 257, 263, 271, 277, 307, 311, 331, 347, 353, 367, 373, 383, 433, 443, 457, 461, 503, 541, 557, 563, 571, 587, 593, 601, 607, 613, 641, 647
Offset: 1

Views

Author

Keywords

Crossrefs

A031924 (primes starting a gap of 6) and A007529 together give this (A023201).
Cf. A046117 (a(n)+6), A087695 (a(n)+3), A098428, A000040, A010051, A006489 (subsequence).

Programs

  • Haskell
    a023201 n = a023201_list !! (n-1)
    a023201_list = filter ((== 1) . a010051 . (+ 6)) a000040_list
    -- Reinhard Zumkeller, Feb 25 2013
    
  • Magma
    [n: n in [0..40000] | IsPrime(n) and IsPrime(n+6)]; // Vincenzo Librandi, Aug 04 2010
    
  • Maple
    A023201 := proc(n)
        option remember;
        if n = 1 then
            5;
        else
            for a from procname(n-1)+2 by 2 do
                if isprime(a) and isprime(a+6) then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, May 28 2013
  • Mathematica
    Select[Range[10^2], PrimeQ[ # ]&&PrimeQ[ #+6] &] (* Vladimir Joseph Stephan Orlovsky, Apr 29 2008 *)
    Select[Prime[Range[120]],PrimeQ[#+6]&] (* Harvey P. Dale, Mar 20 2018 *)
  • PARI
    is(n)=isprime(n+6)&&isprime(n) \\ Charles R Greathouse IV, Mar 20 2013

Formula

From M. F. Hasler, Jan 02 2020: (Start)
a(n) = A046117(n) - 6 = A087695(n) - 3.
A023201 = { p = A000040(k) | A000040(k+1) = p+6 or A000040(k+2) = p+6 } = A031924 U A007529. (End)

A053070 Primes p such that p-6, p and p+6 are consecutive primes.

Original entry on oeis.org

53, 157, 173, 257, 263, 373, 563, 593, 607, 653, 733, 947, 977, 1103, 1123, 1187, 1223, 1367, 1747, 1753, 1907, 2287, 2417, 2677, 2903, 2963, 3307, 3313, 3637, 3733, 4013, 4457, 4597, 4657, 4993, 5107, 5113, 5303, 5387, 5393, 5563, 5807, 6073, 6263
Offset: 1

Views

Author

Harvey P. Dale, Feb 25 2000

Keywords

Comments

Balanced primes separated from the next lower and next higher prime neighbors by 6.
Subset of A006489. - R. J. Mathar, Apr 11 2008
Subset of A006562. - Zak Seidov, Feb 14 2013
a(n) == {3,7} mod 10. - Zak Seidov, Feb 14 2013
Minimal difference is 6: a(5) - a(4) = 263 - 257, a(20) - a(19) = 1753 - 1747, ... . - Zak Seidov, Feb 14 2013

Examples

			157 is separated from both the next lower prime, 151 and the next higher prime, 163, by 6.
		

Crossrefs

Cf. A047948, A006489, A006562. - Zak Seidov, Feb 14 2013

Programs

  • Maple
    for i from 1 by 1 to 800 do if ithprime(i+1) = ithprime(i) + 6 and ithprime(i+2) = ithprime(i) + 12 then print(ithprime(i+1)); fi; od; # Zerinvary Lajos, Apr 27 2007
  • Mathematica
    lst={};Do[p=Prime[n];If[p-Prime[n-1]==Prime[n+1]-p==6,AppendTo[lst,p]],{n,2,7!}];lst (* Vladimir Joseph Stephan Orlovsky, May 20 2010 *)
    Transpose[Select[Partition[Prime[Range[1000]],3,1],Differences[#]=={6,6}&]][[2]] (* Harvey P. Dale, Oct 11 2012 *)

Formula

a(n) = A047948(n) + 6. - R. J. Mathar, Apr 11 2008

Extensions

Edited by N. J. A. Sloane at the suggestion of Zak Seidov, Apr 09 2008

A141279 Primes p such that p - 6^2, p - 6, p + 6 and p + 6^2 are also primes.

Original entry on oeis.org

47, 53, 67, 73, 103, 233, 277, 353, 373, 607, 947, 977, 1187, 1223, 1487, 1663, 2683, 2693, 2713, 2963, 3307, 3733, 4457, 5443, 6323, 6863, 7523, 9007, 11903, 11933, 12107, 12547, 12583, 15313, 15767, 18217, 19427, 20107, 20753, 21523, 22073
Offset: 1

Views

Author

Rick L. Shepherd, Jun 21 2008

Keywords

Comments

Subsequence of A006489. A141280 and A141281 are subsequences.

Crossrefs

Programs

  • Mathematica
    pQ[n_]:=And@@PrimeQ[{n-36,n-6,n+6,n+36}]; Select[Prime[Range[10,3000]],pQ]  (* Harvey P. Dale, Feb 02 2011 *)
    Select[Prime[Range[10,3000]],AllTrue[#+{-36,-6,6,36},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 05 2018 *)

A141280 Primes p such that p-6^3, p-6^2, p-6, p, p+6, p+6^2 and p+6^3 are primes.

Original entry on oeis.org

233, 353, 977, 1663, 2693, 4457, 5443, 11933, 20107, 23333, 23893, 41263, 108923, 110813, 294347, 554633, 730783, 748603, 851387, 928643, 1005013, 1008193, 1020043, 1150873, 1194763, 1326313, 1427963, 1477103, 2161337, 2212003
Offset: 1

Views

Author

Rick L. Shepherd, Jun 21 2008

Keywords

Comments

Subsequence of A006489 and A141279. A141281 is a subsequence.

Crossrefs

Programs

  • Mathematica
    p6Q[n_]:=With[{c=6^Range[3]},AllTrue[Join[n+c,n-c],PrimeQ]]; Select[ Prime[ Range[ 50,200000]],p6Q] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jun 06 2015 *)

A141281 Primes p such that p-6^4, p-6^3, p-6^2, p-6, p, p+6, p+6^2, p+6^3 and p+6^4 are primes.

Original entry on oeis.org

11459317, 18726137, 73718633, 181975727, 361471043, 374195537, 419533753, 420522673, 428739323, 429198703, 456975157, 483576523, 544795393, 653578573, 682118777, 703313623, 753422317, 764967257, 797492477, 960985037, 1059913073
Offset: 1

Views

Author

Rick L. Shepherd, Jun 22 2008

Keywords

Comments

Subsequence of A006489, A141279 and A141280. Each term is congruent to 1 or 10 mod 11 so for no prime p can this pattern be extended also to include primes p-6^5 and p+6^5 (one of them is divisible by 11). See A070392 for residues mod 11 of powers of 6. As each term of A006489 greater than 11 is congruent to 3 or 7 mod 10, combining results gives that a(n) is congruent to 23, 43, 67, or 87 mod 110.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[53734400]],AllTrue[#+{1296,216,36,6,-6,-36,-216,-1296},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 01 2021 *)

A161723 Middle members p of prime triples (p-18,p,p+18).

Original entry on oeis.org

23, 29, 41, 61, 71, 79, 89, 131, 149, 181, 211, 251, 331, 349, 401, 439, 449, 461, 659, 691, 701, 709, 751, 769, 839, 929, 1031, 1051, 1069, 1231, 1301, 1471, 1549, 1601, 1619, 1741, 1759, 1889, 1931, 2011, 2081, 2161, 2221, 2269, 2399, 2441, 2459, 2521
Offset: 1

Views

Author

Keywords

Comments

The three primes p-18, p and p+18 are not necessarily consecutive.

Examples

			23 is the middle in the triple of three primes (23-18=5, 23, 23+18=41) with arithmetic progression 18.
		

Crossrefs

Programs

  • Mathematica
    q=6*3; lst={}; Do[p=Prime[n]; If[PrimeQ[p-q] && PrimeQ[p+q], AppendTo[lst,p]], {n, 5000}]; lst
    Select[Prime[Range[7,400]],AllTrue[#+{18,-18},PrimeQ]&] (* Harvey P. Dale, Apr 21 2024 *)

Formula

{p: p in A153418 and p-18 in A153418} - R. J. Mathar, Sep 22 2009

Extensions

Rephrased the definition - R. J. Mathar, Sep 22 2009

A141282 Least prime p such that p-6^n, ..., p-6, p, p+6, ... and p+6^n are primes.

Original entry on oeis.org

11, 47, 233, 11459317
Offset: 1

Views

Author

Rick L. Shepherd, Jun 22 2008

Keywords

Comments

This pattern is impossible for n >= 5. See A141281.

Examples

			a(4) = 11459317 as this is the least prime p such that p-6^4, p-6^3, p-6^2, p-6, p, p+6, p+6^2, p+6^3 and p+6^4 are all prime. The nine primes are 11458021, 11459101, 11459281, 11459311, 11459317, 11459323, 11459353, 11459533 and 11460613.
		

Crossrefs

Formula

a(1) = A006489(1), a(2) = A141279(1), a(3) = A141280(1), a(4) = A141281(1).

A161724 Primes p such that also p-24 and p+24 are primes.

Original entry on oeis.org

29, 37, 43, 47, 83, 103, 107, 113, 127, 173, 257, 293, 307, 373, 397, 433, 443, 463, 467, 523, 547, 593, 617, 677, 733, 797, 853, 863, 883, 887, 953, 1063, 1093, 1283, 1303, 1423, 1447, 1583, 1723, 1777, 1847, 1973, 2003, 2063, 2087, 2113, 2137, 2333, 2357
Offset: 1

Views

Author

Keywords

Comments

Apart from the first term, values are 3 or 7 mod 10. - Charles R Greathouse IV, Oct 12 2009

Examples

			29-24=5,29+24=53; ...
		

Crossrefs

Programs

  • Mathematica
    q=6*4; lst={}; Do[p=Prime[n]; If[PrimeQ[p-q] && PrimeQ[p+q], AppendTo[lst,p]], {n, 5000}]; lst

Extensions

Definition edited by Emeric Deutsch, Jun 28 2009

A283562 Primes of the form (p^2 - q^2) / 24 with primes p > q > 3.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 23, 37, 43, 47, 53, 67, 73, 97, 103, 107, 113, 127, 137, 157, 163, 167, 173, 193, 223, 233, 257, 263, 277, 283, 293, 313, 337, 347, 353, 373, 397, 433, 443, 467, 487, 523, 547, 563, 577, 593, 607, 613, 617, 643, 647, 653, 733, 743, 757, 773, 787, 797, 887, 907, 937, 947, 953, 977
Offset: 1

Views

Author

Altug Alkan and Thomas Ordowski, Mar 11 2017

Keywords

Comments

Note that p - q must be <= 12. Also note that there can be corresponding prime pairs (q, p) more than one way, i.e., (7, 13), (13, 17), (29, 31): (13^2 - 7^2)/24 = (17^2 - 13^2)/24 = (31^2 - 29^2)/24 = 5.
There are no terms of A045468 > 11.
Union of {2}, A006489, A060212, A092110, and A125272. - Robert Israel, Mar 13 2017

Examples

			3 is a term since (11^2 - 7^2)/24 = 3 and 3, 7, 11 are prime numbers.
		

Crossrefs

Programs

  • Maple
    select(r -> isprime(r) and ((isprime(3*r+2) and isprime(3*r-2))
      or (isprime(6*r+1) and isprime(6*r-1))
      or (isprime(2*r+3) and isprime(2*r-3))
    or (isprime(r+6) and isprime(r-6))), [2,seq(i,i=3..1000,2)]); # Robert Israel, Mar 13 2017
  • Mathematica
    ok[n_] := PrimeQ[n] && Block[{p, q, s = Reduce[p^2-q^2 == 24 n && p>3 && q>3, {p, q}, Integers]}, If[s === {}, False, Or @@ And @@@ PrimeQ[{p, q} /. List@ ToRules@s]]]; Select[Range@1000, ok] (* Giovanni Resta, Mar 11 2017 *)
  • PARI
    isA124865(n) = if(n%24, isprimepower(n+4)==2 || isprimepower(n+9)==2, fordiv(n/4, d, if(isprime(n/d/4+d) && isprime(n/d/4-d), return(1))); 0)
    lista(nn) = forprime(p=2, nn, if(isA124865(24*p), print1(p", ")))

Formula

For n > 5, a(n) == {3,7} mod 10.

A245877 Primes p such that p - d and p + d are also primes, where d is the largest digit of p.

Original entry on oeis.org

263, 563, 613, 653, 1613, 1663, 3463, 4643, 5563, 5653, 6263, 6323, 12653, 13463, 14633, 16063, 16223, 21163, 21563, 25463, 26113, 30643, 32063, 33623, 36313, 41263, 41603, 44263, 53623, 54623, 56003, 60133, 61553, 62213, 62633, 64013, 65413, 105613, 106213
Offset: 1

Views

Author

Colin Barker, Aug 05 2014

Keywords

Comments

Intersection of A245742 and A245743.
The largest digit of a(n) is 6, and the least significant digit of a(n) is 3.
Intersection of A006489, A011536, and complements of A011537, A011538, A011539. - Robert Israel, Aug 05 2014

Examples

			The prime 263 is in the sequence because 263 - 6 = 257 and 263 + 6 = 269 are both primes.
		

Crossrefs

Programs

  • Mathematica
    pdpQ[n_]:=Module[{m=Max[IntegerDigits[n]]},AllTrue[n+{m,-m},PrimeQ]]; Select[ Prime[Range[11000]],pdpQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jan 13 2017 *)
  • PARI
    select(p->d=vecsort(digits(p),,4)[1]; isprime(p-d) && isprime(p+d), primes(20000))
    
  • Python
    import sympy
    from sympy import prime
    from sympy import isprime
    for n in range(1,10**5):
      s=prime(n)
      lst = []
      for i in str(s):
        lst.append(int(i))
      if isprime(s+max(lst)) and isprime(s-max(lst)):
        print(s,end=', ')
    # Derek Orr, Aug 13 2014
Showing 1-10 of 15 results. Next