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-20 of 21 results. Next

A163301 a(n) = Sum_{x=n-th even nonprime..n-th odd nonprime} -x*(-1)^x.

Original entry on oeis.org

1, 3, 5, 7, 8, 8, 10, 10, 11, 13, 14, 14, 15, 15, 17, 17, 18, 20, 20, 21, 22, 22, 23, 23, 23, 24, 26, 28, 29, 29, 29, 29, 29, 29, 30, 31, 31, 33, 33, 33, 33, 35, 35, 36, 36, 37, 38, 38, 39, 39, 41, 41, 41, 41, 43, 45, 45, 45, 45, 45, 46, 46, 46, 46, 46, 47, 49, 50, 50, 52, 52
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 26 2009

Keywords

Comments

Here n-th even nonprime = A163300(n), n-th odd nonprime = A014076(n) and A163300 U A014076 = A141468.
Seems to be essentially the same as A008508. - R. J. Mathar, May 30 2025

Examples

			a(1) = -0*(-1)^0 - 1*(-1)^1 = 0 + 1 = 1;
a(2) = -4*(-1)^4 - 5*(-1)^5 - 6*(-1)6 - 7*(-1)^7 - 8*(-1)^8 - 9*(-1)^9 = -4 + 5 - 6 + 7 - 8 + 9 = 3.
		

Crossrefs

Programs

  • Maple
    A163300 := proc(n) if n <= 2 then op(n,[0,4]) ; else for a from procname(n-1)+2 by 2 do if not isprime(a) then return a; end if; end do; end if; end proc:
    A014076 := proc(n) if n = 1 then 1; else for a from procname(n-1)+2 by 2 do if not isprime(a) then return a ; end if; end do: end if; end proc:
    A001057 := proc(n) (1-(-1)^n*(2*n+1))/4; end proc:
    A163301 := proc(n) A001057( A014076(n)) - A001057(A163300(n)-1) ; end proc: seq(A163301(n),n=1..120) ; # R. J. Mathar, May 21 2010

Formula

a(n) = Sum_{x=A163300(n)..A014076(n)}-x*(-1)^x.
a(n) = A001057( A014076(n)) - A001057(A163300(n)-1). - R. J. Mathar, May 21 2010

Extensions

Corrected from a(39) onwards by R. J. Mathar, May 21 2010

A163750 a(n) = (n-th even nonprime mod n-th prime).

Original entry on oeis.org

0, 1, 1, 1, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 03 2009

Keywords

Crossrefs

Programs

  • Maple
    A163300 := proc(n) if n = 1 then 0; else for a from procname(n-1)+2 by 2 do if not isprime(a) then return(a) ; end if; end do: end if; end proc: A163750 := proc(n) A163300(n) mod ithprime(n) ; end proc: seq(A163750(n),n=1..120) ; # R. J. Mathar, Oct 10 2009
  • Mathematica
    A087156[n_] := Mod[n, DivisorSigma[1, n]]; Table[Mod[2*A087156[n], Prime[n]], {n, 1, 50}] (* G. C. Greubel, Aug 02 2017 *)

Formula

a(n) = (A163300(n) mod A000040(n)).

A163751 a(n) = n-th even nonprime minus n-th nonprime.

Original entry on oeis.org

0, 3, 2, 2, 2, 3, 4, 4, 4, 5, 6, 6, 6, 7, 8, 8, 9, 10, 11, 12, 12, 12, 13, 14, 15, 16, 16, 17, 18, 18, 18, 19, 20, 20, 21, 22, 23, 24, 24, 25, 26, 27, 28, 28, 28, 29, 30, 31, 32, 32, 33, 34, 34, 34, 35, 36, 37, 38, 38, 39, 40, 40, 41, 42, 43, 44, 44, 45, 46, 47, 48, 49, 50, 50, 51
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 03 2009

Keywords

Crossrefs

Programs

  • Mathematica
    nonPrime[n_Integer] := FixedPoint[n + PrimePi@# &, n + PrimePi@n];
    A087156[n_] := Mod[n, DivisorSigma[1, n]]; A141468 := Array[nonPrime, 60, 0]; Table[2*A087156[n] - A141468[[n]], {n, 1, 50}] (* G. C. Greubel, Aug 02 2017 *)

Formula

a(n) = (A163300(n) - A141468(n)).

Extensions

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

A165955 n-th odd nonprime plus n-th even nonprime.

Original entry on oeis.org

1, 13, 21, 29, 35, 39, 47, 51, 57, 65, 71, 75, 81, 85, 93, 97, 103, 111, 115, 121, 127, 131, 137, 141, 145, 151, 159, 167, 173, 177, 181, 185, 189, 193, 199, 205, 209, 217, 221, 225, 229, 237, 241, 247, 251, 257, 263, 267, 273, 277, 285, 289, 293, 297, 305, 313, 317, 321, 325
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 01 2009

Keywords

Examples

			a(1) = 1+0 = 1. a(2) = 9+4 = 13. a(3) = 15+6 = 21.
		

Crossrefs

Programs

  • Mathematica
    A014076 := Select[Range@500, ! PrimeQ@# && OddQ@# &]; A163300 := Drop[Range[0, 500, 2], {2}]; Table[(A163300[[n]] + A014076[[n]]), {n, 1, 50}] (* G. C. Greubel, Sep 17 2017 *)
    Module[{nn=300,np,enp,onp,len},np=Select[Range[0,nn],!PrimeQ[#]&];enp= Select[ np,EvenQ];onp=Select[np,OddQ];len=Min[Length[enp], Length[ onp]]; Total/@Thread[{Take[enp,len],Take[onp,len]}]] (* Harvey P. Dale, Nov 28 2018 *)
  • Python
    from sympy import primepi
    def A165955(n):
        if n == 1: return 1
        m, k = n-1, primepi(n) + n - 1 + (n>>1)
        while m != k:
            m, k = k, primepi(k) + n - 1 + (k>>1)
        return m+(n<<1) # Chai Wah Wu, Aug 01 2024

Formula

a(n) = A014076(n) + A163300(n).

Extensions

Entries checked by R. J. Mathar, Oct 10 2009

A165971 The n-th odd nonprime minus the n-th even nonprime.

Original entry on oeis.org

1, 5, 9, 13, 15, 15, 19, 19, 21, 25, 27, 27, 29, 29, 33, 33, 35, 39, 39, 41, 43, 43, 45, 45, 45, 47, 51, 55, 57, 57, 57, 57, 57, 57, 59, 61, 61, 65, 65, 65, 65, 69, 69, 71, 71, 73, 75, 75, 77, 77, 81, 81, 81, 81, 85, 89, 89, 89, 89, 89, 91, 91, 91, 91, 91, 93, 97, 99, 99, 103
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 02 2009

Keywords

Examples

			a(1) = 1-0 = 1. a(2) = 9-4 = 5. a(3) = 15-6 = 9.
		

Crossrefs

Programs

  • Mathematica
    A014076 := Select[Range@500, ! PrimeQ@# && OddQ@# &]; A163300 := Drop[Range[0, 500, 2], {2}]; Table[(-A163300[[n]] + A014076[[n]]), {n, 1, 50}] (* G. C. Greubel, Sep 17 2017 *)
  • Python
    from sympy import primepi
    def A165971(n):
        if n == 1: return 1
        m, k = n-1, primepi(n) + n - 1 + (n>>1)
        while m != k:
            m, k = k, primepi(k) + n - 1 + (k>>1)
        return m-(n<<1) # Chai Wah Wu, Aug 01 2024

Formula

a(n) = A014076(n) - A163300(n).
Equals: {1} U A160522.

Extensions

77 duplicated by R. J. Mathar, Oct 10 2009

A171576 a(n) = abs(n-th noncomposite number minus n-th even nonprime number).

Original entry on oeis.org

1, 2, 3, 3, 3, 1, 1, 1, 1, 3, 7, 7, 11, 13, 13, 15, 19, 23, 23, 27, 29, 29, 33, 35, 39, 45, 47, 47, 49, 49, 51, 63, 65, 69, 69, 77, 77, 81, 85, 87, 91, 95, 95, 103, 103, 105, 105, 115, 125, 127, 127, 129, 133, 133, 141, 145, 149, 153, 153, 157, 159, 159, 167, 179, 181
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 12 2009

Keywords

Examples

			a(1) = abs(1-0) = 1, a(2) = abs(2-4) = 2, a(3) = abs(3-6) = 3.
		

Crossrefs

Cf. A008578 (noncomposite), A163300 (even nonprime).

Programs

  • Mathematica
    Module[{nn=400,nc,enp,len},nc=Select[Range[nn],!CompositeQ[#]&];enp= Join[{0},Range[4,nn,2]];len=Min[Length[nc],Length[enp]];Abs[#[[1]]- #[[2]]]&/@Thread[{Take[nc,len],Take[enp,len]}]] (* Harvey P. Dale, Mar 01 2020 *)

Formula

a(n) = abs(A008578(n) - A163300(n)).

Extensions

Corrected (a 67 replaced by another 69) by R. J. Mathar, May 22 2010

A174009 Numbers n such that A174008(k)=n-th prime.

Original entry on oeis.org

1, 4, 5, 11, 13, 16, 18, 19, 20, 25, 33, 37, 38, 39, 40, 48, 52, 59, 60, 69, 72, 73, 76, 79, 84, 85, 86, 87, 96, 98, 104, 110, 117, 122, 135, 136, 140, 142, 145, 151, 153, 160, 162, 173, 179, 183, 186, 191, 192, 199, 200, 206, 214, 218, 221, 226, 232, 234, 239, 242
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 05 2010

Keywords

Comments

n-th prime in sequence A174008.

Examples

			a(1)=1 because A174008(1)=2=1st prime;
a(2)=4 because A174008(2)=7=4th prime;
a(3)=5 because A174008(3)=11=5th prime;
a(4)=11 because A174008(7)=31=11th prime.
		

Crossrefs

Programs

  • Maple
    From R. J. Mathar, Apr 28 2010: (Start)
    A163300 := proc(n) option remember ; if n = 1 then 0; else for a from procname(n-1)+2 by 2 do if not isprime(a) then return a ; end if; end do; end if; end proc:
    A174008 := proc(n) ithprime(n)+A163300(n) ; end proc:
    A174009 := proc(k) p := A174008(k) ; if isprime(p) then printf("%d,", numtheory[pi](p) ) ; end if; return ; end proc:
    seq(A174009(k),k=1..400 ) ; (End)

Extensions

More terms from R. J. Mathar, Apr 28 2010

A171575 n-th noncomposite number plus n-th even nonprime number.

Original entry on oeis.org

1, 6, 9, 13, 17, 23, 27, 33, 37, 43, 51, 55, 63, 69, 73, 79, 87, 95, 99, 107, 113, 117, 125, 131, 139, 149, 155, 159, 165, 169, 175, 191, 197, 205, 209, 221, 225, 233, 241, 247, 255, 263, 267, 279, 283, 289, 293, 307, 321, 327, 331, 337, 345, 349, 361, 369, 377
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 12 2009

Keywords

Examples

			a(1) = 1 + 0 = 1, a(2) = 2 + 4 = 6, a(3) = 3 + 6 = 9.
		

Crossrefs

Cf. A008578(the noncomposite numbers), A163300(the even nonprime numbers).

Programs

  • Mathematica
    Module[{nc=Select[Range[300],!CompositeQ[#]&],len},len=Length[nc];Join[ {1},Rest[Total/@Thread[{nc,Range[2,2len,2]}]]]] (* Harvey P. Dale, Mar 08 2018 *)

Formula

a(n) = A008578(n) + A163300(n).

Extensions

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

A174184 Prime(n)+even nonprime(n) is prime.

Original entry on oeis.org

1, 2, 3, 7, 9, 11, 12, 13, 14, 18, 24, 27, 28, 29, 30, 36, 38, 43, 44, 53, 54, 55, 57, 60, 63, 64, 65, 66, 72, 74, 80, 84, 90, 93, 102, 103, 108, 110, 111, 117, 118, 125, 126, 135, 138, 141, 143, 148, 150, 155, 156, 162, 165, 171, 174, 180, 183, 186, 188, 190, 198
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 11 2010

Keywords

Comments

Unit together with prime(n)+s*n is prime, s=2.

Examples

			1 is in the sequence because A000040(1) + A163300(1) = 2 (1st prime) + 0 (1st even nonprime) is prime;
2 is in the sequence because A000040(2) + A163300(2) = 3 (2nd prime) + 4 (2nd even nonprime) is prime.
		

Crossrefs

Programs

  • Maple
    From R. J. Mathar, Apr 20 2010: (Start)
    A163300 := proc(n) option remember ; if n = 1 then 0; else for a from procname(n-1)+2 by 2 do if not isprime(a) then return a ; end if; end do; end if; end proc:
    for n from 1 to 200 do if isprime( ithprime(n) + A163300(n)) then printf("%d,",n) ; end if; end do: (End)

Formula

a(n+1)=A076297(n).

Extensions

Entries checked by R. J. Mathar, Apr 20 2010

A174185 Numbers k such that the k-th prime minus the k-th even nonprime is prime.

Original entry on oeis.org

1, 7, 8, 9, 12, 15, 19, 20, 21, 23, 24, 25, 30, 32, 33, 34, 35, 36, 37, 39, 41, 42, 45, 46, 48, 51, 56, 63, 67, 71, 75, 78, 81, 82, 85, 86, 88, 89, 90, 96, 102, 107, 112, 115, 116, 117, 120, 121, 123, 126, 128, 132, 135, 137, 146, 150, 152, 153, 156, 158, 159, 163, 164
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 11 2010

Keywords

Comments

Numbers k such that prime(k) - (even nonprime)(k) is prime.

Examples

			1 is a term because A000040(1) - A163300(1) = 2 (prime);
7 is a term because A000040(7) - A163300(7) = 3 (prime).
		

Crossrefs

Programs

  • Maple
    A163300 := proc(n) option remember ; if n = 1 then 0; else for a from procname(n-1)+2 by 2 do if not isprime(a) then return a ; end if; end do; end if; end proc:
    for n from 1 to 300 do if isprime( ithprime(n) - A163300(n)) then printf("%d,",n) ; end if; end do: # R. J. Mathar, Apr 20 2010

Extensions

Corrected (11 replaced with 12) by R. J. Mathar, Apr 20 2010
Previous Showing 11-20 of 21 results. Next