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-10 of 12 results. Next

A167516 Index of A141468(n) in the isolated nonprimes A014574 or the non-isolated nonprimes A164276.

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Nov 05 2009

Keywords

Comments

Crossrefs

Formula

A014574(a(n)-1)=n or A164276(a(n))=n.

Extensions

Corrected definition and formula index - R. J. Mathar, May 30 2010

A167707 The non-single or nonisolated numbers. The union of non-single (or nonisolated or twin) primes and non-single (or nonisolated) nonprimes.

Original entry on oeis.org

0, 1, 3, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 38, 39, 40, 41, 43, 44, 45, 46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 80, 81, 82, 84, 85, 86, 87
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 10 2009

Keywords

Comments

Crossrefs

Programs

  • Maple
    isA001097 := proc(n) isprime(n) and (isprime(n+2) or isprime(n-2)) ; end proc: isA164276 := proc(n) not isprime(n) and ( not isprime(n+1) or not isprime(n-1) ) ; end proc: isA167707 := proc(n) isA001097(n) or isA164276(n) ; end proc: for n from 0 to 100 do if isA167707(n) then printf("%d,",n) ; end if; end do: # R. J. Mathar, Mar 18 2010
  • Mathematica
    Union[Select[Range[0, 300], !PrimeQ[#] && (! PrimeQ[# - 1] || ! PrimeQ[# + 1]) & ], Select[Prime[Range[300]], PrimeQ[# - 2] || PrimeQ[# + 2] &]] (* G. C. Greubel, Jul 07 2016 *)

Formula

a(n) = n + n / log n + O(n / (log n)^2) by Brun's theorem. [Charles R Greathouse IV, Mar 15 2011]

A167511 The count of isolated primes between n-th non-isolated nonprime and n-th isolated nonprime.

Original entry on oeis.org

1, 1, 0, 0, 1, 2, 4, 5, 9, 9, 12, 11, 15, 15, 15, 17, 18, 21, 22, 24, 27, 36, 36, 40, 47, 51, 54, 55, 56, 58, 76, 76, 75, 77, 79, 96, 96, 97, 97, 99, 105, 114, 116, 117, 118, 119, 127, 130, 132, 132, 146, 147, 151, 151, 152, 159, 166, 166, 169, 169, 173, 176, 180, 180, 181
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 05 2009

Keywords

Examples

			a(1)=1 (0<2<4); a(2)=1 (1<2<6); a(3)=0 (8<no<12); a(4)=0 (9<no<18); a(5)=1 ( 10<23<30); a(5)=2 (14<23&37<42); a(5)=4 (15<23&37&47&53<60).
		

Crossrefs

Programs

  • Maple
    Contribution from R. J. Mathar, Mar 18 2010: (Start)
    isA007510 := proc(n) isprime(n) and not isprime(n+2) and not isprime(n-2) ; end proc:
    isA001359 := proc(n) isprime(n) and isprime(n+2) ; end proc:
    A001359 := proc(n) if n = 1 then 3 ; else for a from procname(n-1)+2 do if isA001359(a) then return a; end if; end do: end if: end proc:
    isA164276 := proc(n) not isprime(n) and (not isprime(n-1) or not isprime(n+1)) ; end proc:
    A164276 := proc(n) if n = 1 then 0; else for a from procname(n-1)+1 do if isA164276(a) then return a; end if; end do: end if: end proc:
    A014574 := proc(n) A001359(n)+1 ; end proc:
    A167511 := proc(n) a := 0 ; for i from A164276(n)+1 to A014574(n)-1 do if isA007510(i) then a :=a +1 ; end if; end do; a ; end proc:
    seq(A167511(n),n=1..80) ; (End)

Formula

a(n) = #{ A007510(i): A164276(n) < A007510(i) < A014574(n)}. [From R. J. Mathar, Mar 18 2010]
a(n) = SUM{A010051(k)*(1-A164292(k)): A164276(n)<=k<=A014574(n)}. [From Reinhard Zumkeller, Apr 02 2010]

Extensions

a(12), a(31) and a(32) corrected by R. J. Mathar, Mar 18 2010

A167692 The even nonisolated nonprimes.

Original entry on oeis.org

0, 8, 10, 14, 16, 20, 22, 24, 26, 28, 32, 34, 36, 38, 40, 44, 46, 48, 50, 52, 54, 56, 58, 62, 64, 66, 68, 70, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 104, 106, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 140, 142, 144, 146, 148
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 09 2009

Keywords

Comments

Zero together with A100319, the even numbers n such that at least one of n-1 and n+1 is composite.

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 100], Mod[#, 2] == 0 && !PrimeQ[#] && (! PrimeQ[# - 1] || !PrimeQ[# + 1]) &] (* G. C. Greubel, Jul 07 2016 *)
    Join[{0},Select[Range[2,150,2],AnyTrue[#+{1,-1},CompositeQ]&]] (* Harvey P. Dale, Nov 10 2024 *)
  • PARI
    isA167692(n) = (n%2==0)&&!isprime(n)&&(!isprime(n-1)||!isprime(n+1)) \\ Michael B. Porter, Feb 02 2010

Extensions

Edited by Charles R Greathouse IV, Mar 22 2010

A167427 Largest non-isolated nonprime < n-th non-isolated (or twin) prime.

Original entry on oeis.org

1, 1, 1, 10, 10, 16, 16, 28, 28, 40, 40, 58, 58, 70, 70, 100, 100, 106, 106, 136, 136, 148, 148, 178, 178, 190, 190, 196, 196, 226, 226, 238, 238, 268, 268, 280, 280, 310, 310, 346, 346, 418, 418, 430, 430, 460, 460, 520, 520, 568, 568, 598, 598, 616, 616, 640
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 03 2009

Keywords

Examples

			a(1)=1 (<3); a(2)=1 (<5); a(3)=1 (<7); a(4)=10 (<11).
		

Crossrefs

Programs

  • Maple
    isA164276 := proc(n) not isprime(n) and ( not isprime(n+1) or not isprime(n-1) ) ; end proc:
    isA001097 := proc(n) isprime(n) and ( isprime(n+2) or isprime(n-2) ); end proc:
    A001097 := proc(n) option remember; if n =1 then 3; else for a from procname(n-1)+2 by 2 do if isA001097(a) then return a; end if; end do: end if; end proc:
    A167427 := proc(n) for a from A001097(n)-1 by -1 do if isA164276(a) then return a; end if; end do: end proc:
    seq(A167427(n),n=1..120) ; # R. J. Mathar, May 30 2010

Extensions

Entries checked by R. J. Mathar, May 30 2010

A167428 Smallest non-isolated (or twin) prime > n-th non-isolated nonprime.

Original entry on oeis.org

3, 3, 11, 11, 11, 17, 17, 17, 29, 29, 29, 29, 29, 29, 29, 29, 41, 41, 41, 41, 41, 41, 41, 41, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 71, 71, 71, 71, 71, 71, 71, 71, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 03 2009

Keywords

Examples

			a(1)=3 (>0); a(2)=3 (>1); a(3)=11 (>8); a(4)=11 (>8); a(5)=11 (>10); a(6)=17 (>14).
		

Crossrefs

Programs

  • Maple
    A164276 := proc(n) option remember; if n = 1 then 0; else for a from procname(n-1)+1 do if isA164276(a) then return a; end if; end do; end if: end proc:
    isA164276 := proc(n) not isprime(n) and ( not isprime(n+1) or not isprime(n-1) ) ; end proc:
    isA001097 := proc(n) isprime(n) and ( isprime(n+2) or isprime(n-2) ); end proc:
    A167428 := proc(n) for a from A164276(n)+1 do if isA001097(a) then return a; end if; end do: end proc:
    seq(A167428(n),n=1..120) ; # R. J. Mathar, May 30 2010

Extensions

Entries checked by R. J. Mathar, May 30 2010

A167529 a(n) is the number of nonisolated nonprimes k such that (n-th nonisolated prime) < k < (n-th isolated prime).

Original entry on oeis.org

0, 9, 19, 22, 27, 34, 42, 37, 42, 41, 50, 50, 53, 64, 69, 49, 54, 79, 90, 72, 86, 82, 87, 74, 86, 90, 96, 106, 111, 98, 103, 102, 107, 88, 91, 88, 95, 73, 80, 73, 76, 22, 29, 26, 37, 21, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 06 2009

Keywords

Examples

			a(1)=0 (3 > [none] > 2);
a(2)=9 (5 < 8,9,10,14,15,16,20,21,22 < 23);
a(3)=19 (7 < 8,9,10,14,15,16,20,21,22,24,25,26,27,28,32,33,34,35,36 < 37).
		

Crossrefs

Cf. A001097 (the nonisolated primes), A007510 (the isolated primes), A164276 (the nonisolated nonprimes), A167511.

Programs

  • Maple
    isA001097 := proc(n) isprime(n) and ( isprime(n+2) or isprime(n-2) ); end proc:
    A001097 := proc(n) option remember; if n =1 then 3; else for a from procname(n-1)+2 by 2 do if isA001097(a) then return a; end if; end do: end if; end proc:
    A007510 := proc(n) option remember; if n <= 2 then op(n,[2,23]) ; else for a from procname(n-1)+2 by 2 do if isprime(a) and not isprime(a+2) and not isprime(a-2) then return a; end if; end do: end if; end proc:
    A167529 := proc(n) a := 0 ; for k from A001097(n)+1 to A007510(n)-1 do if isA164276(k) then a := a+1 ; end if; end do: a ; end proc:
    seq(A167529(n),n=1..120) ; # R. J. Mathar, May 30 2010

Extensions

Corrected (23 replaced with 22, 28 with 27) and extended by R. J. Mathar, May 30 2010

A167595 The number of nonisolated primes between the n-th nonisolated nonprime and the n-th isolated nonprime.

Original entry on oeis.org

1, 2, 1, 3, 5, 5, 7, 9, 9, 11, 13, 15, 17, 19, 21, 23, 23, 25, 27, 29, 31, 33, 35, 37, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 61, 63, 65, 67, 69, 71, 73, 75, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 119
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 06 2009

Keywords

Examples

			a(1)=1  (0 < 3 < 4);
a(2)=2  (1 < 3,5 < 6);
a(3)=1  (8 < 11 <12);
a(4)=3  (9 < 11,13,17 < 18);
a(5)=5 (10 < 11,13,17,19,29 < 30);
a(6)=5 (14 < 17,19,29,31,41 < 42);
a(7)=7 (15 < 17,19,29,31,41,43,59 < 60);
a(8)=9 (16 < 17,19,29,31,41,43,59,61,71 < 72).
		

Crossrefs

Cf. A001097 (the nonisolated primes), A014574 (the isolated nonprimes), A164276 (the nonisolated nonprimes), A167511.

Programs

  • Maple
    A164276 := proc(n) option remember; if n = 1 then 0; else for a from procname(n-1)+1 do if isA164276(a) then return a; end if; end do; end if: end proc:
    A001097 := proc(n) option remember; if n =1 then 3; else for a from procname(n-1)+2 by 2 do if isA001097(a) then return a; end if; end do: end if; end proc:
    A167595 := proc(n) a := 0 ; for k from A164276(n)+1 to A014574(n)-1 do if isA001097(k) then a := a+1 ; end if; end do: a ; end proc:
    seq(A167595(n),n=1..120) ; # R. J. Mathar, May 30 2010

Extensions

More terms from R. J. Mathar, May 30 2010

A292438 Characteristic function of non-isolated nonprimes.

Original entry on oeis.org

1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Wesley Ivan Hurt, Mar 31 2018

Keywords

Comments

Non-isolated nonprimes in the sense that at least one of the two adjacent integers is also a nonprime.

Crossrefs

Programs

  • Mathematica
    a[0] = 1; a[1] = 1; a[2] = 0; a[n_] := 1 - (PrimePi[n - Mod[n + 1, 2]] - PrimePi[n - Mod[n + 1, 2] - 1]) (PrimePi[n + Mod[n + 1, 2]] - PrimePi[n + Mod[n + 1, 2] - 1]); Table[a[n], {n, 0, 100}]
  • PARI
    A292438(n) = if(n<2,1,!isprime(n)&&((!isprime(n-1))||(!isprime(n+1)))); \\ Antti Karttunen, Jul 02 2018

Formula

a(0)=1, a(1)=1, a(2)=0, a(n) = 1 - A010051(n-((n+1) mod 2)) * A010051(n+((n+1) mod 2)) for n > 2.
a(n) = 1 - (pi(n) - pi(n-2))*(pi(n+1) - pi(n-1)), for n>3, where pi = A000720. - Ridouane Oudra, Jan 10 2022

Extensions

More terms from Antti Karttunen, Jul 02 2018

A167691 The number of nonisolated nonprimes between n-th isolated prime and (n+1)-th isolated prime.

Original entry on oeis.org

9, 10, 6, 5, 10, 8, 3, 5, 7, 9, 13, 3, 19, 5, 3, 5, 28, 11, 6, 14, 5, 5, 10, 12, 13, 6, 13, 5, 12, 5, 7, 5, 5, 3, 5, 7, 3, 7, 23, 3, 5, 7, 6, 11, 7, 3, 7, 3, 5, 28, 5, 9, 5, 10, 9, 5, 10, 5, 14, 12, 5, 16, 3, 5, 7, 9, 7, 9, 7, 5, 5, 3, 7, 5, 3, 7, 3, 13, 9, 32, 13, 6, 13, 6, 19, 3, 7, 9, 7, 3, 5, 5, 13
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 09 2009

Keywords

Crossrefs

Cf. A007510 (the isolated primes), A164276 (the nonisolated nonprimes).

Extensions

Corrected (27 replaced by 28) by R. J. Mathar, May 30 2010
Showing 1-10 of 12 results. Next