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

A160273 Successive differences (divided by 3) of the average of twin prime pairs divided by 2 (A040040).

Original entry on oeis.org

1, 1, 2, 2, 3, 2, 5, 1, 5, 2, 5, 2, 1, 5, 2, 5, 2, 5, 6, 12, 2, 5, 10, 8, 5, 3, 4, 3, 25, 2, 1, 5, 4, 23, 2, 3, 2, 5, 10, 13, 8, 2, 2, 3, 18, 4, 5, 1, 20, 2, 8, 5, 4, 11, 14, 1, 9, 3, 8, 5, 9, 1, 4, 3
Offset: 1

Views

Author

Stephen Crowley, May 07 2009

Keywords

Comments

From Eric Snyder, Jul 02 2021: (Start)
Also the successive differences of A002822.
Instances of a(n) = 1 correspond to prime quadruples. (End)

Crossrefs

Programs

  • Maple
    ZL := []; for p to 1000000 do if `and`(isprime(p), isprime(p+2)) then ZL := [op(ZL), ((p+2)^2-p^2)*(1/8)] end if end do; a := [seq((ZL[i+1]-ZL[i])*(1/3), i = 2 .. nops(ZL)-1)]
  • Mathematica
    Rest[(Differences[(Mean/@Select[Partition[Prime[Range[500]],2,1], #[[2]]- #[[1]]==2&])/2])/3] (* Harvey P. Dale, Jun 10 2014 *)

Extensions

Keyword "hard" deleted by Harvey P. Dale, Jun 10 2014

A001359 Lesser of twin primes.

Original entry on oeis.org

3, 5, 11, 17, 29, 41, 59, 71, 101, 107, 137, 149, 179, 191, 197, 227, 239, 269, 281, 311, 347, 419, 431, 461, 521, 569, 599, 617, 641, 659, 809, 821, 827, 857, 881, 1019, 1031, 1049, 1061, 1091, 1151, 1229, 1277, 1289, 1301, 1319, 1427, 1451, 1481, 1487, 1607
Offset: 1

Views

Author

Keywords

Comments

Also, solutions to phi(n + 2) = sigma(n). - Conjectured by Jud McCranie, Jan 03 2001; proved by Reinhard Zumkeller, Dec 05 2002
The set of primes for which the weight as defined in A117078 is 3 gives this sequence except for the initial 3. - Rémi Eismann, Feb 15 2007
The set of lesser of twin primes larger than three is a proper subset of the set of primes of the form 3n - 1 (A003627). - Paul Muljadi, Jun 05 2008
It is conjectured that A113910(n+4) = a(n+2) for all n. - Creighton Dement, Jan 15 2009
I would like to conjecture that if f(x) is a series whose terms are x^n, where n represents the terms of sequence A001359, and if we inspect {f(x)}^5, the conjecture is that every term of the expansion, say a_n * x^n, where n is odd and at least equal to 15, has a_n >= 1. This is not true for {f(x)}^k, k = 1, 2, 3 or 4, but appears to be true for k >= 5. - Paul Bruckman (pbruckman(AT)hotmail.com), Feb 03 2009
A164292(a(n)) = 1; A010051(a(n) - 2) = 0 for n > 1. - Reinhard Zumkeller, Mar 29 2010
From Jonathan Sondow, May 22 2010: (Start)
About 15% of primes < 19000 are the lesser of twin primes. About 26% of Ramanujan primes A104272 < 19000 are the lesser of twin primes.
About 46% of primes < 19000 are Ramanujan primes. About 78% of the lesser of twin primes < 19000 are Ramanujan primes.
A reason for the jumps is in Section 7 of "Ramanujan primes and Bertrand's postulate" and in Section 4 of "Ramanujan Primes: Bounds, Runs, Twins, and Gaps". (End)
Primes generated by sequence A040976. - Odimar Fabeny, Jul 12 2010
Primes of the form 2*n - 3 with 2*n - 1 prime n > 2. Primes of the form (n^2 - (n-2)^2)/2 - 1 with (n^2 - (n-2)^2)/2 + 1 prime so sum of two consecutive odd numbers/2 - 1. - Pierre CAMI, Jan 02 2012
Conjecture: For any integers n >= m > 0, there are infinitely many integers b > a(n) such that the number Sum_{k=m..n} a(k)*b^(n-k) (i.e., (a(m), ..., a(n)) in base b) is prime; moreover, when m = 1 there is such an integer b < (n+6)^2. - Zhi-Wei Sun, Mar 26 2013
Except for the initial 3, all terms are congruent to 5 mod 6. One consequence of this is that no term of this sequence appears in A030459. - Alonso del Arte, May 11 2013
Aside from the first term, all terms have digital root 2, 5, or 8. - J. W. Helkenberg, Jul 24 2013
The sequence provides all solutions to the generalized Winkler conjecture (A051451) aside from all multiples of 6. Specifically, these solutions start from n = 3 as a(n) - 3. This gives 8, 14, 26, 38, 56, ... An example from the conjecture is solution 38 from twin prime pairs (3, 5), (41, 43). - Bill McEachen, May 16 2014
Conjecture: a(n)^(1/n) is a strictly decreasing function of n. Namely a(n+1)^(1/(n+1)) < a(n)^(1/n) for all n. This conjecture is true for all a(n) <= 1121784847637957. - Jahangeer Kholdi and Farideh Firoozbakht, Nov 21 2014
a(n) are the only primes, p(j), such that (p(j+m) - p(j)) divides (p(j+m) + p(j)) for some m > 0, where p(j) = A000040(j). For all such cases m=1. It is easy to prove, for j > 1, the only common factor of (p(j+m) - p(j)) and (p(j+m) + p(j)) is 2, and there are no common factors if j = 1. Thus, p(j) and p(j+m) are twin primes. Also see A067829 which includes the prime 3. - Richard R. Forberg, Mar 25 2015
Primes prime(k) such that prime(k)! == 1 (mod prime(k+1)) with the exception of prime(991) = 7841 and other unknown primes prime(k) for which (prime(k)+1)*(prime(k)+2)*...*(prime(k+1)-2) == 1 (mod prime(k+1)) where prime(k+1) - prime(k) > 2. - Thomas Ordowski and Robert Israel, Jul 16 2016
For the twin prime criterion of Clement see the link. In Ribenboim, pp. 259-260 a more detailed proof is given. - Wolfdieter Lang, Oct 11 2017
Conjecture: Half of the twin prime pairs can be expressed as 8n + M where M > 8n and each value of M is a distinct composite integer with no more than two prime factors. For example, when n=1, M=21 as 8 + 21 = 29, the lesser of a twin prime pair. - Martin Michael Musatov, Dec 14 2017
For a discussion of bias in the distribution of twin primes, see my article on the Vixra web site. - Waldemar Puszkarz, May 08 2018
Since 2^p == 2 (mod p) (Fermat's little theorem), these are primes p such that 2^p == q (mod p), where q is the next prime after p. - Thomas Ordowski, Oct 29 2019, edited by M. F. Hasler, Nov 14 2019
The yet unproved "Twin Prime Conjecture" states that this sequence is infinite. - M. F. Hasler, Nov 14 2019
Lesser of the twin primes are the set of elements that occur in both A162566, A275697. Proof: A prime p will only have integer solutions to both (p+1)/g(p) and (p-1)/g(p) when p is the lesser of a twin prime, where g(p) is the gap between p and the next prime, because gcd(p+1,p-1) = 2. - Ryan Bresler, Feb 14 2021
From Lorenzo Sauras Altuzarra, Dec 21 2021: (Start)
J. A. Hervás Contreras observed the subsequence 11, 311, 18311, 1518311, 421518311... (see the links), which led me to conjecture the following statements.
I. If i is an integer greater than 2, then there exist positive integers j and k such that a(j) equals the concatenation of 3k and a(i).
II. If k is a positive integer, then there exist positive integers i and j such that a(j) equals the concatenation of 3k and a(i).
III. If i, j, and r are positive integers such that i > 2 and a(j) equals the concatenation of r and a(i), then 3 divides r. (End)

References

  • Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 6.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.2 Prime Numbers, p. 81.
  • Paulo Ribenboim, The New Book of Prime Number Records, Springer-Verlag NY 1996, pp. 259-260.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 192-197.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 111-112.

Crossrefs

Subsequence of A003627.
Cf. A104272 (Ramanujan primes), A178127 (lesser of twin Ramanujan primes), A178128 (lesser of twin primes if it is a Ramanujan prime).

Programs

  • Haskell
    a001359 n = a001359_list !! (n-1)
    a001359_list = filter ((== 1) . a010051' . (+ 2)) a000040_list
    -- Reinhard Zumkeller, Feb 10 2015
    
  • Magma
    [n: n in PrimesUpTo(1610) | IsPrime(n+2)];  // Bruno Berselli, Feb 28 2011
    
  • Maple
    select(k->isprime(k+2),select(isprime,[$1..1616])); # Peter Luschny, Jul 21 2009
    A001359 := proc(n)
       option remember;
       if n = 1
          then 3;
       else
          p := nextprime(procname(n-1)) ;
          while not isprime(p+2) do
             p := nextprime(p) ;
          end do:
          p ;
       end if;
    end proc: # R. J. Mathar, Sep 03 2011
  • Mathematica
    Select[Prime[Range[253]], PrimeQ[# + 2] &] (* Robert G. Wilson v, Jun 09 2005 *)
    a[n_] := a[n] = (p = NextPrime[a[n - 1]]; While[!PrimeQ[p + 2], p = NextPrime[p]]; p); a[1] = 3; Table[a[n], {n, 51}]  (* Jean-François Alcover, Dec 13 2011, after R. J. Mathar *)
    nextLesserTwinPrime[p_Integer] := Block[{q = p + 2}, While[NextPrime@ q - q > 2, q = NextPrime@ q]; q]; NestList[nextLesserTwinPrime@# &, 3, 50] (* Robert G. Wilson v, May 20 2014 *)
    Select[Partition[Prime[Range[300]],2,1],#[[2]]-#[[1]]==2&][[All,1]] (* Harvey P. Dale, Jan 04 2021 *)
    q = Drop[Prepend[p = Prime[Range[100]], 2], -1];
    Flatten[q[[#]] & /@ Position[p - q, 2]] (* Horst H. Manninger, Mar 28 2021 *)
  • PARI
    A001359(n,p=3) = { while( p+2 < (p=nextprime( p+1 )) || n-->0,); p-2}
    /* The following gives a reasonably good estimate for any value of n from 1 to infinity; compare to A146214. */
    A001359est(n) = solve( x=1,5*n^2/log(n+1), 1.320323631693739*intnum(t=2.02,x+1/x,1/log(t)^2)-log(x) +.5 - n)
    /* The constant is A114907; the expression in front of +.5 is an estimate for A071538(x) */ \\  M. F. Hasler, Dec 10 2008
    
  • Python
    from sympy import primerange, isprime
    print([n for n in primerange(1, 2001) if isprime(n + 2)]) # Indranil Ghosh, Jul 20 2017

Formula

a(n) = A077800(2n-1).
A001359 = { n | A071538(n-1) = A071538(n)-1 }; A071538(A001359(n)) = n. - M. F. Hasler, Dec 10 2008
A001359 = { prime(n) : A069830(n) = A087454(n) }. - Juri-Stepan Gerasimov, Aug 23 2011
a(n) = prime(A029707(n)). - R. J. Mathar, Feb 19 2017

A014574 Average of twin prime pairs.

Original entry on oeis.org

4, 6, 12, 18, 30, 42, 60, 72, 102, 108, 138, 150, 180, 192, 198, 228, 240, 270, 282, 312, 348, 420, 432, 462, 522, 570, 600, 618, 642, 660, 810, 822, 828, 858, 882, 1020, 1032, 1050, 1062, 1092, 1152, 1230, 1278, 1290, 1302, 1320, 1428, 1452, 1482, 1488, 1608
Offset: 1

Views

Author

Keywords

Comments

With an initial 1 added, this is the complement of the closure of {2} under a*b+1 and a*b-1. - Franklin T. Adams-Watters, Jan 11 2006
Also the square root of the product of twin prime pairs + 1. Two consecutive odd numbers can be written as 2k+1,2k+3. Then (2k+1)(2k+3)+1 = 4(k^2+2k+1) = 4(k+1)^2, a perfect square. Since twin prime pairs are two consecutive odd numbers, the statement is true for all twin prime pairs. - Cino Hilliard, May 03 2006
Or, single (or isolated) composites. Nonprimes k such that neither k-1 nor k+1 is nonprime. - Juri-Stepan Gerasimov, Aug 11 2009
Numbers n such that sigma(n-1) = phi(n+1). - Farideh Firoozbakht, Jul 04 2010
Aside from the first term in the sequence, all remaining terms have digital root 3, 6, or 9. - J. W. Helkenberg, Jul 24 2013
Numbers n such that n^2-1 is a semiprime. - Thomas Ordowski, Sep 24 2015
Every term but the first is a multiple of 6. - Harvey P. Dale, Mar 31 2023

References

  • Archimedeans Problems Drive, Eureka, 30 (1967).

Crossrefs

A068507 is the intersection of A002182 and this sequence.

Programs

  • GAP
    a:=1+Filtered([1..2000],p->IsPrime(p) and IsPrime(p+2)); # Muniru A Asiru, May 20 2018
  • Haskell
    a014574 n = a014574_list !! (n-1)
    a014574_list = [x | x <- [2,4..], a010051 (x-1) == 1, a010051 (x+1) == 1]
    -- Reinhard Zumkeller, Apr 11 2012
    
  • Maple
    P := select(isprime,[$1..1609]): map(p->p+1,select(p->member(p+2,P),P)); # Peter Luschny, Mar 03 2011
    A014574 := proc(n) option remember; local p ; if n = 1 then 4 ; else p := nextprime( procname(n-1) ) ; while not isprime(p+2) do p := nextprime(p) ; od ; return p+1 ; end if ; end proc: # R. J. Mathar, Jun 11 2011
  • Mathematica
    Select[Table[Prime[n] + 1, {n, 260}], PrimeQ[ # + 1] &] (* Ray Chandler, Oct 12 2005 *)
    Mean/@Select[Partition[Prime[Range[300]],2,1],Last[#]-First[#]==2&] (* Harvey P. Dale, Jan 16 2014 *)
  • Maxima
    A014574(n) := block(
        if n = 1 then
            return(4),
        p : A014574(n-1) ,
        for k : 2 step 2 do (
            if primep(p+k-1) and primep(p+k+1) then
                return(p+k)
        )
    )$ /* R. J. Mathar, Mar 15 2012 */
    
  • PARI
    p=2;forprime(q=3,1e4,if(q-p==2,print1(p+1", "));p=q) \\ Charles R Greathouse IV, Jun 10 2011
    

Formula

a(n) = (A001359(n) + A006512(n))/2 = 2*A040040(n) = A054735(n)/2 = A111046(n)/4.
a(n) = A129297(n+4). - Reinhard Zumkeller, Apr 09 2007
A010051(a(n) - 1) * A010051(a(n) + 1) = 1. Reinhard Zumkeller, Apr 11 2012
a(n) = 6*A002822(n-1), n>=2. - Ivan N. Ianakiev, Aug 19 2013
a(n)^4 - 4*a(n)^2 = A062354(a(n)^2 - 1). - Raphie Frank, Oct 17 2013

Extensions

Offset changed to 1 by R. J. Mathar, Jun 11 2011

A054735 Sums of twin prime pairs.

Original entry on oeis.org

8, 12, 24, 36, 60, 84, 120, 144, 204, 216, 276, 300, 360, 384, 396, 456, 480, 540, 564, 624, 696, 840, 864, 924, 1044, 1140, 1200, 1236, 1284, 1320, 1620, 1644, 1656, 1716, 1764, 2040, 2064, 2100, 2124, 2184, 2304, 2460, 2556, 2580, 2604, 2640, 2856, 2904
Offset: 1

Views

Author

Enoch Haga, Apr 22 2000

Keywords

Comments

(p^q)+(q^p) calculated modulo pq, where (p,q) is the n-th twin prime pair. Example: (599^601)+(601^599) == 1200 mod (599*601). - Sam Alexander, Nov 14 2003
El'hakk makes the following claim (without any proof): (q^p)+(p^q) = 2*cosh(q arctanh( sqrt( 1-((2/p)^2) ) )) + 2cosh(p arctanh( sqrt( 1-((2/q)^2) ) )) mod p*q. - Sam Alexander, Nov 14 2003
Also: Numbers N such that N/2-1 and N/2+1 both are prime. - M. F. Hasler, Jan 03 2013
Excluding the first term, all remaining terms have digital root 3, 6 or 9. - J. W. Helkenberg, Jul 24 2013
Except for the first term, this sequence is a subsequence of A005101 (Abundant numbers) and of A008594 (Multiples of 12). - Ivan N. Ianakiev, Jul 04 2021

Examples

			a(3) = 24 because the twin primes 11 and 13 add to 24.
		

Crossrefs

Programs

  • Haskell
    a054735 = (+ 2) . (* 2) . a001359  -- Reinhard Zumkeller, Feb 10 2015
  • Maple
    ZL:=[]:for p from 1 to 1451 do if (isprime(p) and isprime(p+2)) then ZL:=[op(ZL),p+(p+2)]; fi; od; print(ZL); # Zerinvary Lajos, Mar 07 2007
    A054735 := proc(n)
    2*A001359(n)+2;
    end proc: # R. J. Mathar, Jan 06 2013
  • Mathematica
    Select[Table[Prime[n] + 1, {n, 230}], PrimeQ[ # + 1] &] *2 (* Ray Chandler, Oct 12 2005 *)
    Total/@Select[Partition[Prime[Range[300]],2,1],#[[2]]-#[[1]]==2&] (* Harvey P. Dale, Oct 23 2022 *)
  • PARI
    is_A054735(n)={!bittest(n,0)&&isprime(n\2-1)&&isprime(n\2+1)} \\ M. F. Hasler, Jan 03 2013
    
  • PARI
    pp=1;forprime(p=1,1482, if( p==pp+2, print1(p+pp,", ")); pp=p) \\ Following a suggestion by R. J. Cano, Jan 05 2013
    

Formula

a(n) = 2*A014574(n) = 4*A040040(n) = A111046(n)/2.
a(n) = 12*A002822(n-1) for all n > 1. - M. F. Hasler, Dec 12 2019

Extensions

Additional comments from Ray Chandler, Nov 16 2003
Broken link fixed by M. F. Hasler, Jan 03 2013

A063983 Least k such that k*2^n +/- 1 are twin primes.

Original entry on oeis.org

4, 2, 1, 9, 12, 6, 3, 9, 57, 30, 15, 99, 165, 90, 45, 24, 12, 6, 3, 69, 132, 66, 33, 486, 243, 324, 162, 81, 90, 45, 345, 681, 585, 375, 267, 426, 213, 429, 288, 144, 72, 36, 18, 9, 147, 810, 405, 354, 177, 1854, 927, 1125, 1197, 666, 333, 519, 1032, 516, 258, 129, 72
Offset: 0

Views

Author

Robert G. Wilson v, Sep 06 2001

Keywords

Comments

Excluding the first three terms, all remaining terms have digital root 3, 6, or 9. - J. W. Helkenberg, Jul 24 2013

Examples

			a(3) = 9 because 9*2^3 = 72 and 71 and 73 are twin primes.
a(6) = 3 because 3*2^6 = 192 and {191, 193} are twin primes.
a(71) = 630 because 630*2^71 = 1487545442103938242314240 and {1487545442103938242314239, 1487545442103938242314241} are twin primes.
		

References

  • Richard Crandall and Carl Pomerance, 'Prime Numbers: A Computational Perspective,' Springer-Verlag, NY, 2001, page 12.

Crossrefs

Cf. A071256, A060210, A060256. For records see A125848, A125019.
Cf. A076806 (requires odd k).

Programs

  • Mathematica
    Table[Do[s=(2^j)*k; If[PrimeQ[s-1]&&PrimeQ[s+1],Print[{j,k}]], {k,1,2*j^2}],{j,0,100}]; (* outprint of a[j]=k *)
    Do[ k = 1; While[ ! PrimeQ[ k*2^n + 1 ] || ! PrimeQ[ k*2^n - 1 ], k++ ]; Print[ k ], {n, 0, 50} ]
    f[n_] := Block[{k = 1},While[Nand @@ PrimeQ[{-1, 1} + 2^n*k], k++ ];k];Table[f[n], {n, 0, 60}] (* Ray Chandler, Jan 09 2009 *)

Extensions

More terms from Labos Elemer, May 24 2002
Edited by N. J. A. Sloane, Jul 03 2008 at the suggestion of R. J. Mathar

A130799 Triangle read by rows in which row n (n>=3) list the anti-divisors of n.

Original entry on oeis.org

2, 3, 2, 3, 4, 2, 3, 5, 3, 5, 2, 6, 3, 4, 7, 2, 3, 7, 5, 8, 2, 3, 5, 9, 3, 4, 9, 2, 6, 10, 3, 11, 2, 3, 5, 7, 11, 4, 5, 7, 12, 2, 3, 13, 3, 8, 13, 2, 6, 14, 3, 4, 5, 9, 15, 2, 3, 5, 9, 15, 7, 16, 2, 3, 7, 10, 17, 3, 4, 17, 2, 5, 6, 11, 18, 3, 5, 8, 11, 19, 2, 3, 19, 4, 12, 20, 2, 3, 7
Offset: 3

Views

Author

Diana L. Mecum, Jul 17 2007

Keywords

Comments

A066272 gives the number of terms in each row.
See A066272 for definition of anti-divisor.
2n-1 and 2n+1 are twin primes (that is, n is in A040040) iff n has no odd anti-divisors. For example, because n=15 has no odd anti-divisors, 29 and 31 are twin primes. - Jon Perry, Sep 12 2012
Row n is all the numbers which are: (a) 2n divided by its odd divisors (except 1), and (b) the divisors of 2n-1 and 2n+1 (except 1, 2n+1 and 2n-1). For example, n=18: odd divisors of 36 are {3,9} and 36/{3,9} = {4,12}; divisors of 35 are {5,7} and divisors of 37 are null (37 is prime). Therefore row 18 is 4,5,7 and 12. See A066542 for further explanation. - Bob Selcoe, Feb 24 2014

Examples

			Anti-divisors of 3 through 20:
3: 2
4: 3
5: 2, 3
6: 4
7: 2, 3, 5
8: 3, 5
9: 2, 6
10: 3, 4, 7
11: 2, 3, 7
12: 5, 8
13: 2, 3, 5, 9
14: 3, 4, 9
15: 2, 6, 10
16: 3, 11
17: 2, 3, 5, 7, 11
18: 4, 5, 7, 12
19: 2, 3, 13
20: 3, 8, 13
		

Programs

  • Mathematica
    f[n_] := Complement[ Sort@ Join[ Select[ Union@ Flatten@ Divisors[{2 n - 1, 2 n + 1}], OddQ@ # && # < n &], Select[ Divisors[2 n], EvenQ@ # && # < n &]], Divisors@ n]; Flatten@ Table[ f@n, {n, 3, 32}] (* Robert G. Wilson v, Jul 17 2007 *)
    Table[Select[Range[2, n - 1], Abs[Mod[n, #] - #/2] < 1 &], {n, 3, 31}] // Flatten (* Michael De Vlieger, Jun 14 2016, after Harvey P. Dale at A066272 *)

A045753 Numbers n such that 4n-1 and 4n+1 are both primes.

Original entry on oeis.org

1, 3, 15, 18, 27, 45, 48, 57, 60, 78, 87, 105, 108, 150, 165, 207, 255, 258, 273, 288, 330, 357, 363, 372, 402, 405, 417, 447, 468, 483, 507, 522, 528, 567, 585, 648, 672, 678, 750, 780, 792, 813, 825, 840, 843, 867, 882, 885, 918, 942, 963, 1005, 1023
Offset: 1

Views

Author

Keywords

Examples

			3 belongs to the sequence because 4*3+1 and 4*3-1 are both primes.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..2000] | IsPrime(4*n+1) and IsPrime(4*n-1)] // Vincenzo Librandi, Nov 18 2010
    
  • Mathematica
    Select[Range[1023], And @@ PrimeQ[{-1, 1} + 4# ] &] (* Ray Chandler, Dec 06 2006 *)
  • PARI
    list(lim)=my(v=List(),p=2); forprime(q=3,4*lim+1, if(q-p==2 && p%4==3, listput(v,q\4)); p=q); Vec(v) \\ Charles R Greathouse IV, Dec 03 2016

Extensions

More terms from Erich Friedman

A124519 Numbers k such that 12*k - 1 and 12*k + 1 are twin primes.

Original entry on oeis.org

1, 5, 6, 9, 15, 16, 19, 20, 26, 29, 35, 36, 50, 55, 69, 85, 86, 91, 96, 110, 119, 121, 124, 134, 135, 139, 149, 156, 161, 169, 174, 176, 189, 195, 216, 224, 226, 250, 260, 264, 271, 275, 280, 281, 289, 294, 295, 306, 314, 321, 335, 341, 344, 355, 356, 379, 399
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Examples

			1 is in the sequence since 12*1 - 1 = 11 and 12*1 + 1 = 13 are twin primes.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[400], And @@ PrimeQ[{-1, 1} + 12# ] &] (* Ray Chandler, Nov 16 2006 *)

Extensions

Extended by Ray Chandler, Nov 16 2006

A124522 a(n) = smallest k such that 2nk-1 and 2nk+1 are primes.

Original entry on oeis.org

2, 1, 1, 9, 3, 1, 3, 12, 1, 3, 9, 3, 12, 15, 1, 6, 3, 2, 6, 6, 1, 15, 3, 4, 3, 6, 2, 48, 6, 1, 21, 3, 3, 15, 6, 1, 27, 3, 4, 3, 15, 5, 12, 15, 2, 9, 3, 2, 9, 6, 1, 3, 60, 1, 6, 24, 2, 3, 9, 2, 129, 12, 7, 9, 15, 5, 12, 27, 1, 3, 9, 3, 42, 45, 1, 90, 3, 2, 66, 21, 5, 63, 27, 16, 6, 6, 2, 12, 24, 1, 6
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Crossrefs

Programs

  • Maple
    isA001359 := proc(n) RETURN( isprime(n) and isprime(n+2)) ; end: A124522 := proc(n) local k; k :=1 ; while true do if isA001359(2*n*k-1) then RETURN(k) ; fi ; k := k+1 ; od ; end: for n from 1 to 60 do printf("%d,",A124522(n)) ; od ; # R. J. Mathar, Nov 06 2006
  • Mathematica
    f[n_] := Block[{k = 1},While[Nand @@ PrimeQ[{-1, 1} + 2n*k], k++ ];k];Table[f[n], {n, 91}] (* Ray Chandler, Nov 16 2006 *)
    skp[n_]:=Module[{k=1},While[AnyTrue[2n k+{1,-1},CompositeQ],k++];k]; Join[{2},Array[skp,100,2]] (* Harvey P. Dale, Mar 30 2024 *)
  • PARI
    {for(n=1,91,k=1;while(!isprime(2*n*k-1)||!isprime(2*n*k+1),k++);print1(k, ","))}

Extensions

Edited and extended by Klaus Brockhaus and R. J. Mathar, Nov 06 2006

A124518 Numbers k such that 10k-1 and 10k+1 are twin primes.

Original entry on oeis.org

3, 6, 15, 18, 24, 27, 42, 57, 60, 66, 81, 102, 105, 123, 129, 132, 162, 195, 213, 231, 234, 255, 273, 279, 297, 300, 312, 330, 333, 336, 339, 354, 393, 402, 405, 423, 426, 465, 480, 501, 510, 528, 552, 564, 585, 588, 609, 627, 630, 636, 645, 657, 666, 669, 678
Offset: 1

Views

Author

Artur Jasinski, Nov 04 2006

Keywords

Comments

All terms are divisible by 3. - Robert Israel, Apr 07 2019

Crossrefs

Programs

  • Maple
    select(t -> isprime(10*t+1) and isprime(10*t-1), [seq(i,i=3..1000,3)]); # Robert Israel, Apr 07 2019
  • Mathematica
    Select[Range[678], And @@ PrimeQ[{-1, 1} + 10# ] &] (* Ray Chandler, Nov 16 2006 *)
Showing 1-10 of 43 results. Next