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.

Previous Showing 21-30 of 66 results. Next

A136207 Primes p such that p-6 or p+6 is prime.

Original entry on oeis.org

5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 131, 137, 151, 157, 163, 167, 173, 179, 191, 193, 197, 199, 223, 227, 229, 233, 239, 251, 257, 263, 269, 271, 277, 283, 307, 311, 313, 317, 331, 337
Offset: 1

Views

Author

Carlos Alves, Dec 21 2007

Keywords

Comments

Either or both of (p-6) and (p+6) is/are prime. - Harvey P. Dale, Jun 22 2019

Crossrefs

Cf. A023201, A046117, A140546 (complement).

Programs

  • Maple
    isA136207 := proc(n)
        if isprime(n) then
            if isprime(n+6) or isprime(n-6) then
                true;
            else
                false;
            end if;
        else
            false ;
        end if;
    end proc:
    A136207 := proc(n)
        option remember;
        local a;
        if n = 1 then
            5 ;
        else
            a := nextprime(procname(n-1)) ;
            while true do
                if isA136207(a) then
                    return a;
                else
                    a := nextprime(a) ;
                end if;
            end do:
        end if;
    end proc:
    seq(A136207(n),n=1..80) ; # R. J. Mathar, Jun 10 2024
  • Mathematica
    dd = 6; DistancePrimesQ1 = (PrimeQ[ # ] && PrimeQ[ # + dd]) &; DistancePrimesQ2 = (PrimeQ[ # ] && PrimeQ[ # - dd] && (# > dd)) &; DistancePrimesQQ = (DistancePrimesQ1[ # ] || DistancePrimesQ2[ # ]) &; DistancePrimes = Select[Range[ # ], DistancePrimesQQ] &; DistancePrimes[1000]
    Alternative by Lei Zhou:
    p = 3; Table[While[p = NextPrime[p]; ! (PrimeQ[p - 6] || PrimeQ[p + 6])]; p, {n, 1, 100}]
    Select[Prime[Range[3,100]],AnyTrue[#+{6,-6},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 22 2019 *)

A104229 Primes equal to the product of two successive sexy primes plus 6.

Original entry on oeis.org

61, 97, 193, 397, 673, 1153, 1597, 1933, 4093, 7393, 12097, 37633, 64513, 70753, 96097, 122497, 126733, 136897, 190093, 211597, 256033, 313597, 329473, 348097, 430333, 541693, 781453, 891133, 988033, 1267873, 1416097, 1674433, 2102497
Offset: 1

Views

Author

Giovanni Teofilatto, Apr 02 2005

Keywords

Comments

Primes of the form 6 + A111192(i). - R. J. Mathar, Nov 26 2008
All numbers in this sequence are of the form 12n + 1. Also, as one would expect from a random distribution of sexy prime pairs, with the exception of 61, in decimal two thirds of these numbers end in 3, and the other third end in 7. - Daniel Mondot, Apr 29 2024

Crossrefs

Extensions

Extended by R. J. Mathar, Nov 26 2008

A143205 Numbers having exactly two distinct prime factors p, q with q = p+6.

Original entry on oeis.org

55, 91, 187, 247, 275, 391, 605, 637, 667, 1147, 1183, 1375, 1591, 1927, 2057, 2491, 3025, 3127, 3179, 3211, 4087, 4459, 4693, 4891, 5767, 6647, 6655, 6875, 7387, 8281, 8993, 9991, 10807, 11227, 12091, 15125, 15341, 15379, 17947, 19343, 22627, 23707
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 30 2008

Keywords

Comments

Subsequence of A007774.
A111192 is a subsequence.
Subsequence of A195118. - Reinhard Zumkeller, Sep 13 2011

Examples

			a(1) = 55 = 5 * 11 = A023201(1) * A046117(1).
a(2) = 91 = 7 * 13 = A023201(2) * A046117(2).
a(3) = 187 = 11 * 17 = A023201(3) * A046117(3).
a(4) = 247 = 13 * 19 = A023201(4) * A046117(4).
a(5) = 275 = 5^2 * 11 = A023201(1)^2 * A046117(1).
a(6) = 391 = 17 * 23 = A023201(5) * A046117(5).
a(7) = 605 = 5 * 11^2 = A023201(1) * A046117(1)^2.
a(8) = 637 = 7^2 * 13 = A023201(2)^2 * A046117(2).
a(9) = 667 = 23 * 29 = A023201(6) * A046117(6).
a(10) = 1147 = 31 * 37 = A023201(7) * A046117(7).
		

Crossrefs

Programs

  • Haskell
    a143205 n = a143205_list !! (n-1)
    a143205_list = filter f [1,3..] where
       f x = length pfs == 2 && last pfs - head pfs == 6 where
           pfs = a027748_row x
    -- Reinhard Zumkeller, Sep 13 2011
  • Mathematica
    okQ[n_]:=Module[{fi=Transpose[FactorInteger[n]][[1]]},Length[fi]==2 && Last[fi]-First[fi]==6]; Select[Range[25000],okQ]  (* Harvey P. Dale, Apr 18 2011 *)

Formula

A143201(a(n)) = 7.
A020639(a(n)) in A023201 and A006530(a(n)) in A046117.
A001221(a(n)) = 2.
Sum_{n>=1} 1/a(n) = Sum_{n>=1} 1/((A023201(n)+2)^2-9) = 0.058842810164... . - Amiram Eldar, Oct 26 2024

A156274 List of prime pairs of the form (p, p+6).

Original entry on oeis.org

5, 11, 7, 13, 11, 17, 13, 19, 17, 23, 23, 29, 31, 37, 37, 43, 41, 47, 47, 53, 53, 59, 61, 67, 67, 73, 73, 79, 83, 89, 97, 103, 101, 107, 103, 109, 107, 113, 131, 137, 151, 157, 157, 163, 167, 173, 173, 179, 191, 197, 193, 199, 223, 229, 227, 233, 233, 239, 251, 257
Offset: 1

Views

Author

Vincenzo Librandi, Feb 07 2009

Keywords

Comments

A023201 and A046117 interleaved. [From R. J. Mathar, Feb 19 2009]

Examples

			For p=5, p+6=11, (5,11); p=7, p+6=13, (7,13); p=11, p+6=17, (11,17)
		

Programs

  • Mathematica
    Flatten[Select[{#, # + 6}&/@Prime[Range[100]], PrimeQ[Last[#]]&]] (* Vincenzo Librandi, Apr 06 2013 *)

A288021 Prime p1 of consecutive primes p1, p2, where p2 - p1 = 4, and p1, p2 are in different decades.

Original entry on oeis.org

7, 19, 37, 67, 79, 97, 109, 127, 229, 277, 307, 349, 379, 397, 439, 457, 487, 499, 739, 757, 769, 859, 877, 907, 937, 967, 1009, 1087, 1279, 1297, 1429, 1447, 1489, 1549, 1567, 1579, 1597, 1609, 1867, 1999, 2137, 2239, 2269, 2347, 2377, 2389, 2437, 2539, 2617, 2659, 2689, 2707, 2749, 2797, 2857
Offset: 1

Views

Author

Hartmut F. W. Hoft, Jun 04 2017

Keywords

Comments

The unit digits of the numbers in the sequence are 7's or 9's.

Examples

			7 is in this sequence since pair (7,11) is the first with difference 4 spanning a multiple of 10.
		

Crossrefs

Programs

  • Mathematica
    a288021[n_] := Map[Last, Select[Map[{NextPrime[#, 1], NextPrime[#, -1]}&, Range[10, n, 10]], First[#]-Last[#]==4&]]
    a288021[3000] (* data *)

A288022 Prime p1 of consecutive primes p1, p2, where p2 - p1 = 6, and p1, p2 are in different decades.

Original entry on oeis.org

47, 157, 167, 257, 367, 557, 587, 607, 647, 677, 727, 947, 977, 1097, 1117, 1187, 1217, 1367, 1657, 1747, 1777, 1907, 1987, 2207, 2287, 2417, 2467, 2677, 2837, 2897, 2957, 3307, 3407, 3607, 3617, 3637, 3727, 3797, 4007, 4357, 4457, 4507, 4597, 4657, 4937, 4987
Offset: 1

Views

Author

Hartmut F. W. Hoft, Jun 04 2017

Keywords

Comments

The unit digits of the numbers in the sequence are 7's.
Number of terms < 10^k: 0, 0, 1, 13, 81, 565, 4027, 30422, 237715, ... - Muniru A Asiru, Jan 09 2018

Examples

			47 is in the sequence since pair (47,53) is the first with difference 6 spanning a multiple of 10.
		

Crossrefs

Programs

  • GAP
    P:=Filtered([1..20000], IsPrime);
    P1:=List(Filtered(Filtered(List([1..Length(P)-1],n->[P[n],P[n+1]]),i->i[2]-i[1]=6),j->j[1] mod 5=2),k->k[1]); # Muniru A Asiru, Jul 08 2017
  • Maple
    for n from 1 to 2000 do if [ithprime(n+1)-ithprime(n), ithprime(n) mod 5] = [6,2] then print(ithprime(n)); fi; od; # Muniru A Asiru, Jan 19 2018
  • Mathematica
    a288022[n_] := Map[Last, Select[Map[{NextPrime[#, 1], NextPrime[#, -1]}&, Range[10, n, 10]], First[#]-Last[#]==6&]]
    a288022[3000] (* data *)

A288024 Prime p1 of consecutive primes p1, p2, where p2 - p1 = 8, and p1, p2 are in different decades.

Original entry on oeis.org

89, 359, 389, 449, 479, 683, 719, 743, 929, 983, 1109, 1163, 1193, 1373, 1439, 1523, 1559, 1733, 1823, 1979, 2003, 2153, 2213, 2243, 2273, 2459, 2609, 2663, 2699, 2843, 2879, 2909, 3209, 3449, 3623, 3719, 4289, 4349, 4583, 4943, 5189, 5399, 5573, 5693, 5783, 5813
Offset: 1

Views

Author

Hartmut F. W. Hoft, Jun 04 2017

Keywords

Comments

The unit digits of the numbers in the sequence are 3's or 9's.

Examples

			89 is in the sequence since pair (89,97) is the first with difference 8 spanning a multiple of 10.
		

Crossrefs

Programs

  • Mathematica
    a288024[n_] := Map[Last, Select[Map[{NextPrime[#, 1], NextPrime[#, -1]}&, Range[10, n, 10]], First[#]-Last[#]==8&]]
    a288024[6000] (* data *)
    Select[Partition[Prime[Range[800]],2,1],#[[2]]-#[[1]]==8&&IntegerDigits[#[[1]]][[-2]]!= IntegerDigits[ #[[2]]][[-2]]&][[;;,1]] (* Harvey P. Dale, Jan 09 2024 *)

A080840 Number of cousin primes < 10^n.

Original entry on oeis.org

1, 8, 41, 203, 1216, 8144, 58622, 440258, 3424680, 27409999, 224373161, 1870585459, 15834656003, 135779962760, 1177207270204
Offset: 1

Views

Author

Jason Earls, Mar 28 2003

Keywords

Comments

The corresponding numbers for twin primes and sexy primes are in A007508 and A080841, the greater of twin primes, cousin primes and sexy primes are in A006512, A046132 and A046117 respectively.
In this sequence, only the upper member of each prime cousin pair is counted. See A152052 for the variant where only the lower member is counted. - James Rayman, Jan 17 2021

Crossrefs

Programs

  • PARI
    {c=0; p=5; for(n=1,9, while(p<10^n,if(isprime(p-4),c++); p=nextprime(p+1)); print1(c,","))}

Extensions

a(8) and a(9) from Klaus Brockhaus, Mar 30 2003
More terms from R. J. Mathar, Aug 05 2007
a(13)-a(15) from Martin Ehrenstein, Sep 03 2021

A080841 Number of pairs (p,q) of (not necessarily consecutive) primes with q-p = 6 and q < 10^n.

Original entry on oeis.org

0, 15, 74, 411, 2447, 16386, 117207, 879908, 6849047, 54818296, 448725003, 3741217498
Offset: 1

Views

Author

Jason Earls, Mar 28 2003

Keywords

Comments

Note that one has to be careful to distinguish between pairs of consecutive primes (p,q) with q-p = 6 (A031924), and pairs of primes (p,q) with q-p = 6 (A023201). Here we consider the latter, whereas A093738 considers the former. - N. J. A. Sloane, Mar 07 2021

Crossrefs

Programs

  • PARI
    {c=0; p=7; for(n=1,9, while(p<10^n,if(isprime(p-6),c++); p=nextprime(p+1)); print1(c,","))}

Extensions

a(8) and a(9) from Klaus Brockhaus, Mar 30 2003
More terms from R. J. Mathar, Aug 05 2007

A104228 Primes one larger than the sum over a sexy prime pair.

Original entry on oeis.org

17, 29, 41, 53, 89, 101, 113, 173, 269, 353, 389, 461, 509, 521, 701, 773, 929, 1013, 1181, 1193, 1289, 1301, 1361, 1721, 1889, 1901, 1949, 2213, 2381, 2441, 2609, 2729, 2741, 2861, 2969, 3209, 3221, 3821, 4001, 4133, 4421, 4481, 4673, 4793, 4889, 5381, 5393, 5801, 5813, 6173, 6653, 7349, 7529
Offset: 1

Views

Author

Giovanni Teofilatto, Apr 02 2005

Keywords

Comments

Primes of the form A023201(i)+A046117(i)+1 - R. J. Mathar, Nov 26 2008

Examples

			17=5+11+1 is prime and one larger than the sum 5+11 over the first sexy prime pair. - _R. J. Mathar_, Nov 26 2008
		

Crossrefs

Extensions

Inserted 89 and extended beyond a(8). - R. J. Mathar, Nov 26 2008
Previous Showing 21-30 of 66 results. Next