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.

Previous Showing 11-15 of 15 results.

A169643 Numbers k such that neither composite(k)+-1 is composite.

Original entry on oeis.org

1, 2, 6, 10, 19, 28, 42, 51, 75, 79, 104, 114, 138, 148, 152, 178, 187, 212, 221, 247, 278, 338, 348, 372, 423, 465, 490, 504, 525, 539, 669, 679, 683, 709, 729, 848, 858, 873, 883, 909, 961, 1028, 1071, 1080, 1089, 1104, 1202, 1221, 1247, 1251, 1354, 1363
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 04 2010

Keywords

Comments

a(n) = A066246(A014574(n)). - Reinhard Zumkeller, Apr 06 2010

Examples

			a(1)=1 because composite(1)-1=3=prime and composite(1)+1=5=prime.
		

Crossrefs

Programs

Extensions

Corrected by Ray Chandler, Apr 05 2010

A139636 If n = the k-th prime, then a(n) = the (k+1)th prime. If n = the k-th composite, then a(n) = the (k+1)th composite.

Original entry on oeis.org

3, 5, 6, 7, 8, 11, 9, 10, 12, 13, 14, 17, 15, 16, 18, 19, 20, 23, 21, 22, 24, 29, 25, 26, 27, 28, 30, 31, 32, 37, 33, 34, 35, 36, 38, 41, 39, 40, 42, 43, 44, 47, 45, 46, 48, 53, 49, 50, 51, 52, 54, 59, 55, 56, 57, 58, 60, 61, 62, 67, 63, 64, 65, 66, 68, 71, 69, 70, 72, 73, 74
Offset: 2

Views

Author

Leroy Quet, Apr 28 2008

Keywords

Comments

This is a permutation of the positive integers sans 1,2,4.

Crossrefs

Cf. A139637.

Programs

  • Maple
    A000040 := proc(n) ithprime(n) ; end: A002808 := proc(n) local a; if n = 1 then 4; else for a from A002808(n-1)+1 do if not isprime(a) then RETURN(a) ; fi ; od: fi ; end: A066246 := proc(n) local k ; if isprime(n) then 0 ; else for k from 1 do if A002808(k) = n then RETURN(k) ; fi ; od: fi ; end: A049084 := proc(n) if not isprime(n) then 0; else numtheory[pi](n) ; fi ; end: A139636 := proc(n) local k; if isprime(n) then k := A049084(n) ; RETURN(A000040(k+1)) ; else k := A066246(n) ; RETURN(A002808(k+1)) ; fi ; end: seq(A139636(n),n=2..160) ; # R. J. Mathar, May 12 2008
  • Mathematica
    npc[n_]:=Module[{k=1},If[PrimeQ[n],NextPrime[n],While[PrimeQ[n+k],k++];n+k]]; Array[npc,80,2] (* Harvey P. Dale, Jun 26 2022 *)

Extensions

More terms from R. J. Mathar, May 12 2008

A139637 If n = the k-th prime, then a(n) = the (k-1)th prime. If n = the k-th composite, then a(n) = the (k-1)th composite. a(2) = 1. a(4) = 0.

Original entry on oeis.org

1, 2, 0, 3, 4, 5, 6, 8, 9, 7, 10, 11, 12, 14, 15, 13, 16, 17, 18, 20, 21, 19, 22, 24, 25, 26, 27, 23, 28, 29, 30, 32, 33, 34, 35, 31, 36, 38, 39, 37, 40, 41, 42, 44, 45, 43, 46, 48, 49, 50, 51, 47, 52, 54, 55, 56, 57, 53, 58, 59, 60, 62, 63, 64, 65, 61, 66, 68, 69, 67, 70, 71, 72
Offset: 2

Views

Author

Leroy Quet, Apr 28 2008

Keywords

Comments

This is a permutation of the nonnegative integers.

Crossrefs

Programs

  • Maple
    A000040 := proc(n) ithprime(n) ; end: A002808 := proc(n) local a; if n = 1 then 4; else for a from A002808(n-1)+1 do if not isprime(a) then RETURN(a) ; fi ; od: fi ; end: A066246 := proc(n) local k ; if isprime(n) then 0 ; else for k from 1 do if A002808(k) = n then RETURN(k) ; fi ; od: fi ; end: A049084 := proc(n) if not isprime(n) then 0; else numtheory[pi](n) ; fi ; end: A139637 := proc(n) local k; if n = 2 then 1; elif n = 4 then 0 ; else if isprime(n) then k := A049084(n) ; A000040(k-1) ; else k := A066246(n) ; A002808(k-1) ; fi ; fi ; end: seq(A139637(n),n=2..160) ; # R. J. Mathar, May 12 2008
  • Mathematica
    HC[k_] := If[k <= 4, None, Max[Select[Range[4, k-1], !PrimeQ[#]&]]];a[2]=1;a[4]=0;a[n_]:=If[PrimeQ[n],Prime[PrimePi[n-1]],HC[n]];Array[a,73,2] (* James C. McMahon, Jul 01 2025 *)

Extensions

More terms from R. J. Mathar, May 12 2008

A133555 Order of A113709(n) among composite positive integers.

Original entry on oeis.org

1, 2, 3, 6, 9, 10, 11, 14, 19, 24, 27, 28, 29, 32, 37, 42, 47, 48, 51, 56, 57, 60, 71, 74, 75, 76, 79, 82, 95, 96, 99, 104, 105, 114, 119, 124, 125, 128, 133, 138, 147, 148, 151, 152, 157, 168, 175, 178, 181, 182, 187, 196, 197, 202, 207, 212, 217, 220, 221, 228, 231
Offset: 2

Views

Author

Leroy Quet, Dec 25 2007

Keywords

Examples

			The 10th prime - the 9th prime = 29-23 = 6. The integer between 23 and 29 that is divisible by 6 is 24. 24 is the 14th composite, so a(9) = 14.
		

Crossrefs

Programs

  • Maple
    A113709 := proc(n) local d,a ; d := ithprime(n+1)-ithprime(n) ; for a from ithprime(n)+1 do if a mod d = 0 then RETURN(a) ; fi ; od: end: A066246 := proc(n) local a,i; if n = 1 or isprime(n) then 0 ; else a := 0 ; for i from 4 to n do if not isprime(i) then a := a+1 ; fi ; od: RETURN(a) ; fi ; end: A133555 := proc(n) A066246(A113709(n)) ; end: seq(A133555(n),n=2..80) ; # R. J. Mathar, Jan 12 2008
  • Mathematica
    compositePi[n_] := n - PrimePi[n] - 1;
    a[n_] := Module[{p1 = Prime[n], p2 = Prime[n+1], c}, c = SelectFirst[ Range[p1+1, p2-1], Divisible[#, p2-p1]&]; compositePi[c]];
    Table[a[n], {n, 2, 62}] (* Jean-François Alcover, Apr 02 2024 *)

Formula

a(n) = A066246(A113709(n)). - R. J. Mathar, Jan 12 2008

Extensions

More terms from R. J. Mathar, Jan 12 2008

A161003 A list of the composite numbers divided by their largest prime factors.

Original entry on oeis.org

2, 2, 4, 3, 2, 4, 2, 3, 8, 6, 4, 3, 2, 8, 5, 2, 9, 4, 6, 16, 3, 2, 5, 12, 2, 3, 8, 6, 4, 9, 2, 16, 7, 10, 3, 4, 18, 5, 8, 3, 2, 12, 2, 9, 32, 5, 6, 4, 3, 10, 24, 2, 15, 4, 7, 6, 16, 27, 2, 12, 5, 2, 3, 8, 18, 7, 4, 3, 2, 5, 32, 14, 9, 20, 6, 8, 15, 2, 36, 10, 3, 16, 6, 5, 4, 9, 2, 7, 24, 11, 2, 3, 4
Offset: 1

Views

Author

Trevor Cassiliano (casstjc(AT)gmail.com), Jun 01 2009

Keywords

Comments

a(A120389(n)) = A000040(n). - Gionata Neri, May 07 2015
For n >= 2, a(x) = n where x = A066246(n*A006530(n)). - Robert Israel, May 07 2015

Examples

			n=1 4/2; n=2 6/3; n=3 8/2.
		

Crossrefs

Programs

  • Maple
    with(numtheory): a := proc (n) if isprime(n) = false then n/factorset(n)[nops(factorset(n))] else end if end proc: seq(a(n), n = 2 .. 130); # Emeric Deutsch, Jun 27 2009
  • Mathematica
    With[{cmps=Select[Range[200],CompositeQ]},#/FactorInteger[#][[-1,1]]&/@ cmps] (* Harvey P. Dale, Mar 29 2017 *)

Formula

a(n) = A002808(n)/A052369(n). - Robert Israel, May 07 2015

Extensions

Extended by Emeric Deutsch, Jun 27 2009
Previous Showing 11-15 of 15 results.