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

A161912 a(n) = A040976(n+1) - A006218(n).

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 1, 1, 4, 2, 6, 4, 4, 4, 6, 7, 7, 7, 9, 5, 7, 7, 11, 11, 12, 10, 10, 6, 8, 14, 16, 16, 14, 20, 18, 15, 19, 19, 21, 19, 19, 21, 21, 19, 15, 23, 33, 27, 26, 24, 26, 22, 30, 28, 30, 28, 26, 28, 30, 20, 28, 38, 36, 31, 31, 37, 41, 45, 43, 39, 43, 39, 43, 45, 43, 43, 47, 43, 49, 49
Offset: 0

Views

Author

Omar E. Pol, Jun 28 2009

Keywords

Crossrefs

Programs

Extensions

Invalid formula deleted and sequence extended by R. J. Mathar, Jul 01 2009

A179384 Nonprimes in A040976.

Original entry on oeis.org

0, 1, 9, 15, 21, 27, 35, 39, 45, 51, 57, 65, 69, 77, 81, 87, 95, 99, 105, 111, 125, 129, 135, 147, 155, 161, 165, 171, 177, 189, 195, 209, 221, 225, 231, 237, 249, 255, 261, 267, 275, 279, 291, 305, 309, 315, 329, 335, 345, 351, 357, 365, 371, 377, 381, 387, 395
Offset: 1

Views

Author

Odimar Fabeny, Jul 12 2010

Keywords

Crossrefs

Formula

A040976 \ A001359. [From R. J. Mathar, Jul 13 2010]

Extensions

More terms from Vincenzo Librandi and R. J. Mathar, Jul 13 2010

A103976 Partial sums of A040976 (= primes-2).

Original entry on oeis.org

0, 1, 4, 9, 18, 29, 44, 61, 82, 109, 138, 173, 212, 253, 298, 349, 406, 465, 530, 599, 670, 747, 828, 915, 1010, 1109, 1210, 1315, 1422, 1533, 1658, 1787, 1922, 2059, 2206, 2355, 2510, 2671, 2836, 3007, 3184, 3363, 3552, 3743, 3938, 4135, 4344, 4565, 4790, 5017, 5248
Offset: 1

Views

Author

Roger L. Bagula, Feb 12 2007

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate[Prime[Range[60]]-2] (* Harvey P. Dale, Sep 11 2011 *)

Extensions

Edited by N. J. A. Sloane, Feb 18 2007

A160771 Erroneous version of A040976.

Original entry on oeis.org

3, 5, 9, 11, 15, 17, 21, 27, 29, 35, 39, 41, 45, 49, 51, 55, 57
Offset: 3

Views

Author

Keywords

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

A067201 Numbers k such that k^2 + 2 is prime.

Original entry on oeis.org

0, 1, 3, 9, 15, 21, 33, 39, 45, 57, 81, 99, 105, 111, 117, 123, 147, 171, 219, 225, 237, 243, 249, 255, 273, 297, 303, 309, 321, 345, 351, 363, 369, 375, 387, 417, 423, 429, 441, 447, 453, 477, 501, 513, 549, 555, 561, 573, 603, 609, 651, 675, 681, 699, 711, 753
Offset: 1

Views

Author

Benoit Cloitre, Feb 19 2002

Keywords

Comments

All terms > 1 are divisible by 3. - Robert Israel, Sep 05 2014

Crossrefs

Equals 6*A056900(n-2) + 3, n>1.
Other sequences of the type "Numbers k such that k^2 + i is prime": A005574 (i=1), this sequence (i=2), A049422 (i=3), A007591 (i=4), A078402 (i=5), A114269 (i=6), A114270 (i=7), A114271 (i=8), A114272 (i=9), A114273 (i=10), A114274 (i=11), A114275 (i=12).

Programs

  • Maple
    select(t -> isprime(t^2+2), [0,1,seq(3*i,i=1..1000)]); # Robert Israel, Sep 05 2014
  • Mathematica
    lst={};Do[If[PrimeQ[n^2+2], AppendTo[lst, n]], {n, 3*10^2}];lst (* Vladimir Joseph Stephan Orlovsky, Aug 21 2008 *)
    Join[{0, 1}, Select[Range[3, 1000, 6], PrimeQ[#^2 + 2] &]] (* Zak Seidov, Jan 30 2014 *)
  • PARI
    select(n -> isprime(n^2+2),[1..500]) \\ Edward Jiang, Sep 05 2014

A052147 a(n) = prime(n) + 2.

Original entry on oeis.org

4, 5, 7, 9, 13, 15, 19, 21, 25, 31, 33, 39, 43, 45, 49, 55, 61, 63, 69, 73, 75, 81, 85, 91, 99, 103, 105, 109, 111, 115, 129, 133, 139, 141, 151, 153, 159, 165, 169, 175, 181, 183, 193, 195, 199, 201, 213, 225, 229, 231, 235, 241, 243, 253, 259
Offset: 1

Views

Author

Simon Colton (simonco(AT)cs.york.ac.uk), Jan 24 2000

Keywords

Comments

A048974, A052147, A067187 and A088685 are very similar after dropping terms less than 13. - Eric W. Weisstein, Oct 10 2003
A117530(n,2) = a(n) for n>1. - Reinhard Zumkeller, Mar 26 2006
a(n) = A000040(n) + 2 = A008864(n) + 1 = A113395(n) - 1 = A175221(n) - 2 = A175222(n) - 3 = A139049(n) - 4 = A175223(n) - 5 = A175224(n) - 6 = A140353(n) - 7 = A175225(n) - 8. - Jaroslav Krizek, Mar 06 2010
Left edge of the triangle in A065342. - Reinhard Zumkeller, Jan 30 2012
Union of A006512 and A107986. - David James Sycamore, Jul 08 2018

Crossrefs

A139690 is a subsequence.

Programs

A063638 Primes p such that p-2 is a semiprime.

Original entry on oeis.org

11, 17, 23, 37, 41, 53, 59, 67, 71, 79, 89, 97, 113, 131, 157, 163, 179, 211, 223, 239, 251, 269, 293, 307, 311, 331, 337, 367, 373, 379, 383, 397, 409, 419, 439, 449, 487, 491, 499, 503, 521, 547, 593, 599, 613, 631, 673, 683, 691, 701, 709, 719, 733, 739
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 21 2001

Keywords

Comments

Primes of form p*q + 2, where p and q are primes.
11 is the only prime of this form where p=q. For prime p>3, 3 divides p^2+2. - T. D. Noe, Mar 01 2006
The asymptotic growth of this sequence is relevant for A204142. We have a(10^k) = (11, 79, 1571, 27961, 407741, 5647823, ...). - M. F. Hasler, Feb 13 2012

Crossrefs

Programs

  • Haskell
    a063638 n = a063638_list !! (n-1)
    a063638_list = map (+ 2) $ filter ((== 1) . a064911) a040976_list
    -- Reinhard Zumkeller, Feb 22 2012
  • Mathematica
    Take[Select[ # + 2 & /@ Union[Flatten[Outer[Times, Prime[Range[100]], Prime[Range[100]]]]], PrimeQ], 60]
    Select[Prime[Range[200]],PrimeOmega[#-2]==2&] (* Paolo Xausa, Oct 30 2023 *)
  • PARI
    n=0; for (m=2, 10^9, p=prime(m); if (bigomega(p - 2) == 2, write("b063638.txt", n++, " ", p); if (n==1000, break))) \\ Harry J. Smith, Aug 26 2009
    
  • PARI
    forprime(p=3,9999, bigomega(p-2)==2 & print1(p","))
    
  • PARI
    p=2; for(n=1,1e4, until(bigomega(-2+p=nextprime(p+1))==2,); write("b063638.txt", n" "p)) \\ M. F. Hasler, Feb 13 2012
    
  • PARI
    list(lim)=my(v=List(), t); forprime(p=3, (lim-2)\3, forprime(q=3, min((lim-2)\p, p), t=p*q+2; if(isprime(t), listput(v, t)))); Set(v) \\ Charles R Greathouse IV, Aug 05 2016
    

Formula

a(n) = A241809(n) + 2. - Hugo Pfoertner, Oct 30 2023

A172367 Numbers k > 0 such that k+4 is a prime.

Original entry on oeis.org

1, 3, 7, 9, 13, 15, 19, 25, 27, 33, 37, 39, 43, 49, 55, 57, 63, 67, 69, 75, 79, 85, 93, 97, 99, 103, 105, 109, 123, 127, 133, 135, 145, 147, 153, 159, 163, 169, 175, 177, 187, 189, 193, 195, 207, 219, 223, 225, 229, 235, 237, 247, 253, 259, 265, 267, 273, 277, 279
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Feb 01 2010

Keywords

Comments

The subsequence of primes A023200 consists of the smallest primes p of cousin prime pairs (p, p+4), while the subsequence of nonprimes is A164384. - Bernard Schott, Oct 19 2021

Examples

			a(1) = 5 - 4 = 1, a(2) = 7 - 4 = 3.
		

Crossrefs

Programs

Formula

a(n) = prime(n+2) - 4.

A206037 Values of the difference d for 3 primes in arithmetic progression with the minimal start sequence {3 + j*d}, j = 0 to 2.

Original entry on oeis.org

2, 4, 8, 10, 14, 20, 28, 34, 38, 40, 50, 64, 68, 80, 94, 98, 104, 110, 124, 134, 154, 164, 178, 188, 190, 208, 220, 230, 238, 248, 260, 280, 308, 314, 328, 344, 370, 418, 428, 430, 440, 454, 458, 484, 518, 544, 560, 574, 584, 610, 614, 628, 638, 640, 644, 650
Offset: 1

Views

Author

Sameen Ahmed Khan, Feb 03 2012

Keywords

Comments

The computations were done without any assumptions on the form of d.
Numbers k such that k+3 and 2k+3 are both primes.
Equivalently, integers d such that the largest possible arithmetic progression (AP) of primes with common difference d has exactly 3 elements (see example). These 3 elements are not necessarily consecutive primes. In fact, for each term d, there exists only one such AP of primes, and this one starts always with A342309(d) = 3, so this AP is (3, 3+d, 3+2d). - Bernard Schott, Jan 15 2023

Examples

			d = 8 then {3, 3 + 1*8, 3 + 2*8} = {3, 11, 19}, which is 3 primes in arithmetic progression.
		

Crossrefs

Largest AP of prime numbers with k elements: A007921 (k=1), A359408 (k=2), this sequence (k=3), A359409 (k=4), A206039 (k=5), A359410 (k=6), A206041 (k=7).

Programs

  • Magma
    [n: n in [1..700] | IsPrime(3+n) and IsPrime(3+2*n)]; // Vincenzo Librandi, Dec 28 2015
  • Maple
    filter := d -> isprime(3+d) and isprime(3+2*d) : select(filter, [$(1 .. 650)]); # Bernard Schott, Jan 16 2023
  • Mathematica
    t={}; Do[If[PrimeQ[{3, 3 + d, 3 + 2*d}] == {True, True, True}, AppendTo[t, d]], {d, 1000}]; t
    Select[Range[2,700,2],And@@PrimeQ[{3+#,3+2#}]&] (* Harvey P. Dale, Sep 25 2013 *)
  • PARI
    for(n=1, 1e3, if(isprime(n + 3) && isprime(2*n + 3), print1(n, ", "))); \\ Altug Alkan, Dec 27 2015
    

Formula

a(n) = 2 * A115334(n). - Wesley Ivan Hurt, Feb 06 2014
m is a term iff A123556(m) = 3. - Bernard Schott, Jan 15 2023
Showing 1-10 of 71 results. Next