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

A129521 Numbers of the form p*q, p and q prime with q=2*p-1.

Original entry on oeis.org

6, 15, 91, 703, 1891, 2701, 12403, 18721, 38503, 49141, 79003, 88831, 104653, 146611, 188191, 218791, 226801, 269011, 286903, 385003, 497503, 597871, 665281, 721801, 736291, 765703, 873181, 954271, 1056331, 1314631, 1373653, 1537381
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 19 2007

Keywords

Comments

All terms are Fermat 4-pseudoprimes, i.e., satisfy 4^n == 4 (mod n). See A020136 and A122781.

Crossrefs

Subsequence of A006881, A129510, and A122781.
Intersection of A000384 and A001358, "hexagonal semiprimes". - Wesley Ivan Hurt, Jul 04 2013

Programs

  • Haskell
    a129521 n = p * (2 * p - 1) where p = a005382 n
    -- Reinhard Zumkeller, Nov 10 2013
  • Magma
    [2*n^2-n: n in [0..1000]|IsPrime(n) and IsPrime(2*n-1)]; // Vincenzo Librandi, Dec 27 2010
    
  • Mathematica
    p = Select[Prime[Range[155]], PrimeQ[2# - 1] &]; p (2p - 1) (* Robert G. Wilson v, Sep 11 2011 *)
  • PARI
    forprime(p=2,10000,q=2*p-1;if(isprime(q),print1(p*q,", ")))
    

Formula

a(n) = A005382(n)*A005383(n).

A259677 Octagonal numbers (A000567) that are semiprimes (A001358).

Original entry on oeis.org

21, 65, 133, 341, 481, 1541, 4033, 5461, 6533, 8321, 11041, 13333, 14981, 31621, 38081, 48133, 56033, 79381, 83333, 97921, 109061, 111361, 133141, 188501, 197633, 206981, 219781, 229633, 256961, 282133, 293281, 328021, 340033, 360533, 416641, 481601, 556421
Offset: 1

Views

Author

Colin Barker, Jul 03 2015

Keywords

Examples

			The octagonal number 21 is in the sequence because 21 = 3 * 7.
		

Crossrefs

Programs

  • Magma
    IsSemiprime:=func; [s: n in [2..500] | IsSemiprime(s) where s is n*(3*n-2) ]; // Vincenzo Librandi, Jul 04 2015
  • Mathematica
    a={}; Do[If[PrimeOmega[n (3 n - 2)]==2, AppendTo[a, n(3 n - 2)]], {n, 1, 200}]; a (* Vincenzo Librandi, Jul 04 2015 *)
    Select[PolygonalNumber[8,Range[500]],PrimeOmega[#]==2&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 15 2019 *)
  • PARI
    pg(m, n) = (n^2*(m-2)-n*(m-4))/2 \\ n-th m-gonal number
    select(n->bigomega(n)==2, vector(2000, n, pg(8, n)))
    

Formula

Equals A000567 intersect A001358.
Showing 1-2 of 2 results.