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.

A125167 Numbers n such that the n-th prime + n-th nonprime is itself prime.

Original entry on oeis.org

1, 2, 3, 6, 7, 15, 20, 26, 29, 30, 35, 40, 42, 43, 46, 52, 57, 61, 65, 70, 75, 84, 92, 99, 100, 102, 105, 125, 139, 140, 144, 149, 154, 164, 171, 179, 183, 197, 202, 214, 218, 223, 227, 232, 234, 245, 247, 251, 258, 265, 272, 280, 288, 290, 294, 299, 304, 323, 325
Offset: 1

Views

Author

Jason G. Wurtzel, Nov 22 2006

Keywords

Examples

			The 15th prime is 47, while the 15th nonprime is 24. 47+24=71 which is itself prime. Similarly, the 30th prime is 113, while the 30th nonprime is 44. 113+44=157 which is prime.
		

Crossrefs

Programs

  • Mathematica
    Module[{nn=500,np,tbl},np=Select[Range[nn],!PrimeQ[#]&];tbl=Table[{n,np[[n]]+Prime[n]},{n,Length[ np]}];Select[tbl,PrimeQ[#[[2]]]&]][[;;,1]] (* Harvey P. Dale, Sep 21 2023 *)

Extensions

More terms from Klaus Brockhaus, Nov 23 2006

A133795 a(n) = n-th semiprime + n-th non-semiprime.

Original entry on oeis.org

5, 8, 12, 15, 21, 23, 32, 34, 38, 42, 50, 52, 54, 58, 62, 70, 76, 79, 84, 87, 89, 94, 101, 106, 114, 118, 124, 128, 130, 132, 138, 141, 144, 147, 159, 165, 171, 177, 179, 182, 185, 187, 195, 200, 202, 211, 213, 215, 218, 221, 231, 236, 238, 241, 247, 252, 261
Offset: 1

Views

Author

Jonathan Vos Post, Jan 05 2008

Keywords

Comments

Semiprime analog of A022797 n-th prime + n-th nonprime. a(n) is prime for n = 1, 6, 18, 21, 23. a(n) is itself semiprime for n = 4, 5, 22, 25, 38, 39, 57, 62, 69, 77 of which first 10 indices all but n=5 are themselves semiprimes.

Examples

			a(1) = 1st semiprime + 1st nonsemiprime = 4 + 1 = 5.
a(2) = 2nd semiprime + 2nd nonsemiprime = 6 + 2 = 8.
a(3) = 3rd semiprime + 3rd nonsemiprime = 9 + 3 = 12.
		

Crossrefs

Programs

  • Maple
    A100959 := proc(n) option remember; local a ; if n = 1 then 1 ; else for a from A100959(n-1)+1 do if numtheory[bigomega](a) <> 2 then RETURN(a) ; fi ; od: fi ; end: A001358 := proc(n) option remember ; local a ; if n = 1 then 4 ; else for a from A001358(n-1)+1 do if numtheory[bigomega](a) = 2 then RETURN(a) ; fi ; od: fi ; end: A133795 := proc(n) A100959(n)+A001358(n) ; end: seq(A133795(n),n=1..100) ; # R. J. Mathar, Jan 09 2008
  • Mathematica
    Module[{nn=200,spr,non},spr=Select[Range[nn],PrimeOmega[#]==2&];non=Take[ Complement[ Range[ nn],spr],Length[ spr]];Total/@Thread[{spr,non}]] (* Harvey P. Dale, Sep 06 2024 *)

Formula

a(n) = A001358(n) + A100959(n).

Extensions

Corrected and extended by R. J. Mathar, Jan 09 2008
Showing 1-2 of 2 results.