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.

A098090 Numbers k such that 2k-3 is prime.

Original entry on oeis.org

3, 4, 5, 7, 8, 10, 11, 13, 16, 17, 20, 22, 23, 25, 28, 31, 32, 35, 37, 38, 41, 43, 46, 50, 52, 53, 55, 56, 58, 65, 67, 70, 71, 76, 77, 80, 83, 85, 88, 91, 92, 97, 98, 100, 101, 107, 113, 115, 116, 118, 121, 122, 127, 130, 133, 136, 137, 140, 142, 143, 148, 155, 157, 158
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), Sep 14 2004

Keywords

Comments

Supersequence of A063908.
Left edge of the triangle in A065305. - Reinhard Zumkeller, Jan 30 2012

Crossrefs

Numbers n such that 2n+k is prime: A005097 (k=1), A067076 (k=3), A089038 (k=5), A105760 (k=7), A155722 (k=9), A101448 (k=11), A153081 (k=13), A089559 (k=15), A173059 (k=17), A153143 (k=19).
Numbers n such that 2n-k is prime: A006254 (k=1), this sequence (k=3), A089253 (k=5), A089192 (k=7), A097069 (k=9), A097338 (k=11), A097363 (k=13), A097480 (k=15), A098605 (k=17), A097932 (k=19).

Programs

Formula

Half of p + 3, where p is a prime greater than 2.
A122845(a(n), 3) = 3; a(n) = A113935(n+1)/2. - Reinhard Zumkeller, Sep 14 2006

A085090 If 2n-1 is prime then a(n) = 2n-1, otherwise a(n) = 0.

Original entry on oeis.org

0, 3, 5, 7, 0, 11, 13, 0, 17, 19, 0, 23, 0, 0, 29, 31, 0, 0, 37, 0, 41, 43, 0, 47, 0, 0, 53, 0, 0, 59, 61, 0, 0, 67, 0, 71, 73, 0, 0, 79, 0, 83, 0, 0, 89, 0, 0, 0, 97, 0, 101, 103, 0, 107, 109, 0, 113, 0, 0, 0, 0, 0, 0, 127, 0, 131, 0, 0, 137, 139, 0, 0, 0, 0, 149, 151, 0, 0, 157, 0, 0, 163
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jul 02 2003

Keywords

Comments

Previous name was: Starting with n+(n-1) go on adding n-2, then n-3, etc. until one gets a prime; a(n) = smallest prime in n+(n-1)+(n-2)+...+(n-i) (with the least i that gives a prime), or 0 if no such prime exists.

Examples

			a(8) = 0 as there is no prime in the partial sum of the finite sequence 8,7,6,5,4,3,2,1.
a(7) = 13 = 7 + 6.
		

Crossrefs

Cf. A122845.

Programs

  • Magma
    DoubleFactorial:=func< n | &*[n..2 by -2] >; [ DoubleFactorial(-5 + 4*n) mod (-1 + 2*n)^2: n in [1..90]]; // Vincenzo Librandi, Oct 04 2018
    
  • Magma
    [IsPrime(2*n-1) select 2*n-1 else 0: n in [1..90]]; // Bruno Berselli, Oct 05 2018
  • Mathematica
    apr[n_]:=Module[{cl=Select[Rest[Accumulate[Range[n,1,-1]]],PrimeQ, 1]}, If[cl=={},0,First[cl]]]; Array[apr,100] (* Harvey P. Dale, Jun 01 2012 *)
    b[n_] := Mod[(-5 + 4 n)!!, (-1 + 2 n)^2]; a = Array[b, 82] (* Fred Daniel Kline, Oct 04 2018; Thomas Ordowski's formula with adjusted index *)
  • PARI
    a(n) = if (isprime(p=2*n-1), p, 0); \\ Michel Marcus, Aug 09 2018
    

Formula

If 2n-1 is prime then a(n) = 2n-1, otherwise a(n) = 0. - David Wasserman, Jan 25 2005
a(A098090(n)-1)=2*A098090(n)-3; a(n)=(2*n-1)*A101264(n-1). - Reinhard Zumkeller, Sep 14 2006
a(n+1) = (4n-1)!! mod (2n+1)^2; by Gauss generalization of the Wilson's theorem. - Thomas Ordowski, Jul 23 2016

Extensions

More terms from David Wasserman, Jan 25 2005
New name using formula from David Wasserman, Joerg Arndt, Jul 24 2016
Showing 1-2 of 2 results.