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-5 of 5 results.

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

A062721 Numbers k such that k is a product of two primes and k-2 is prime.

Original entry on oeis.org

4, 9, 15, 21, 25, 33, 39, 49, 55, 69, 85, 91, 111, 115, 129, 133, 141, 159, 169, 183, 201, 213, 235, 253, 259, 265, 295, 309, 319, 339, 355, 361, 381, 391, 403, 411, 445, 451, 469, 481, 489, 493, 501, 505, 511, 543, 559, 565, 573, 579, 589, 633, 649, 655, 679
Offset: 1

Views

Author

Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 14 2001

Keywords

Comments

This sequence is a subsequence of A107986, which only requires k to be composite. The first term in that sequence which is not in this sequence is 45, a number with three prime factors. - Alonso del Arte, May 03 2014

Crossrefs

Programs

  • Mathematica
    Select[ Range[ 2, 1500 ], Plus @@ Last@Transpose@FactorInteger[ # ] == 2 && PrimeQ[ # - 2 ] & ]
    Select[Range[700], PrimeOmega[#] == 2 && PrimeQ[# - 2]&] (* Harvey P. Dale, Mar 25 2013 *)
  • PARI
    { n=0; for (m=1, 10^9, a=prime(m) + 2; f=factor(a)~; if ((length(f)==1 && f[2, 1]==2) || (length(f)==2 && f[2, 1]==1 && f[2, 2]==1), write("b062721.txt", n++, " ", a); if (n==10000, break)) ) } \\ Harry J. Smith, Aug 09 2009

A297925 Even numbers k such that k - 5 is prime but k - 3 is not prime.

Original entry on oeis.org

12, 18, 24, 28, 36, 42, 48, 52, 58, 66, 72, 78, 84, 88, 94, 102, 108, 114, 118, 132, 136, 144, 156, 162, 168, 172, 178, 186, 198, 204, 216, 228, 234, 238, 246, 256, 262, 268, 276, 282, 288, 298, 312, 318, 322, 336, 342, 354, 358, 364, 372, 378, 384, 388, 394, 402, 406, 414, 426, 438, 444, 448, 454
Offset: 1

Views

Author

David James Sycamore, Jan 08 2018

Keywords

Comments

Even numbers that are the sum of 5 and another prime, but not the sum of 3 and another prime. For n >= 1, a(n) - 5 = A049591(n), a(n) - 3 = A107986(n+1).
Let r(n) = a(n) - 5, Then r(n) is the greatest prime < a(n), and therefore A056240(a(n)) = 5*r(n). Furthermore, since r(n) + 2 must be composite, A056240(a(n)) = 5*A049591(n).
The terms in this sequence, combined with those in A298366 and A298252 form a partition of A005843(n);n>=3 (nonnegative even numbers>=6). This is because any even integer n>=6 satisfies either (i) n-3 is prime, (ii) n-5 is prime but n-3 is composite, or (iii) both n-5 and n-3 are composite.

Examples

			12 is a term because 12 - 5 = 7 is prime, and 12 - 3 = 9 is composite. Also A049591(1)+5=7+5=12 and A107986(2)+3=9+3=12.
18 is a term because 18 - 5 = 13 is prime, and 18 - 3 = 15 is composite.
16 is not a term because 16 - 5 = 11 and 16 - 3 = 13 are both prime.
		

Crossrefs

Similar to A130038. Subsequence of A175222.

Programs

  • GAP
    Filtered([8..500], k-> IsPrime(k-5) and not IsPrime(k-3) and (k mod 2)=0); # G. C. Greubel, May 21 2019
  • Magma
    [n: n in [3..500] | IsPrime(n-5) and not IsPrime(n-3) and (n mod 2) eq 0]; // G. C. Greubel, May 21 2019
    
  • Maple
    N:=100
    for n from 8 to N by 2 do
    if isprime(n-5) and not isprime(n-3) then print (n);
    end if
    end do
  • Mathematica
    Select[Range[6, 500, 2], And[PrimeQ[# - 5], ! PrimeQ[# - 3]] &] (* Michael De Vlieger, Jan 10 2018 *)
    Select[Range[6, 500, 2], Boole[PrimeQ[# -{5, 3}]] == {1, 0} &] (* Harvey P. Dale, Jan 30 2024 *)
  • PARI
    isok(n) = !(n % 2) && isprime(n-5) && !isprime(n-3); \\ Michel Marcus, Jan 09 2018
    
  • Sage
    [n for n in (3..500) if is_prime(n-5) and not is_prime(n-3) and (mod(n, 2)==0)] # G. C. Greubel, May 21 2019
    

Formula

a(n) = A049591(n) + 5 = A107986(n+1) + 3 for all n >= 1.

A241809 Semiprimes sp such that sp+2 is a prime.

Original entry on oeis.org

9, 15, 21, 35, 39, 51, 57, 65, 69, 77, 87, 95, 111, 129, 155, 161, 177, 209, 221, 237, 249, 267, 291, 305, 309, 329, 335, 365, 371, 377, 381, 395, 407, 417, 437, 447, 485, 489, 497, 501, 519, 545, 591, 597, 611, 629, 671, 681, 689, 699, 707, 717, 731, 737, 749
Offset: 1

Views

Author

K. D. Bajpai, Apr 29 2014

Keywords

Examples

			a(2) = 15 = 3*5, which is semiprime and 15+2 = 17 is a prime.
a(6) = 51 = 3*17, which is semiprime and 51+2 = 53 is a prime.
		

Crossrefs

Programs

  • Maple
    with(numtheory): A241809:= proc(); if bigomega(x)=2 and isprime(x+2)then  RETURN (x); fi; end: seq(A241809 (), x=1..2000);
  • Mathematica
    A241809={};Do[If[PrimeOmega[n]==2&&PrimeQ[n+2],AppendTo[A241809,n]],{n,1000}];A241809
    Select[Prime[Range[200]]-2,PrimeOmega[#]==2&] (* Harvey P. Dale, Aug 06 2015 *)
    SequencePosition[Table[Which[PrimeQ[n],1,PrimeOmega[n]==2,2,True,0],{n,800}],{2,,1}][[;;,1]] (* _Harvey P. Dale, Oct 05 2023 *)
  • PARI
    for(k=1, 1000, if(bigomega(k)==2 && isprime(k+2), print1(k, ", "))) \\ Colin Barker, May 07 2014

Formula

a(n) = A063638(n) - 2.

A164383 Composite numbers of the form 4 + some prime.

Original entry on oeis.org

6, 9, 15, 21, 27, 33, 35, 45, 51, 57, 63, 65, 75, 77, 87, 93, 105, 111, 117, 135, 141, 143, 153, 155, 161, 171, 177, 183, 185, 195, 201, 203, 215, 231, 237, 243, 245, 255, 261, 267, 273, 275, 285, 287, 297, 315, 321, 335, 341, 351, 357, 363, 371, 377, 387, 393
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 14 2009

Keywords

Examples

			a(1)= 4+2(prime)=6 (composite). a(2)= 4+5(prime)=9 (composite). a(3)=4+11(prime) = 15 (composite).
		

Crossrefs

Programs

  • Mathematica
    Select[4+Prime[Range[100]],CompositeQ] (* Harvey P. Dale, Oct 24 2017 *)

Extensions

Edited, entries checked, by R. J. Mathar, Aug 20 2009
Showing 1-5 of 5 results.