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-3 of 3 results.

A168389 a(n) = PrimePi(A147819(n)).

Original entry on oeis.org

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

Views

Author

Giovanni Teofilatto, Nov 24 2009

Keywords

Crossrefs

Programs

  • Maple
    A147819 := proc(n) if n = 1 then 2; else for a from procname(n-1)+1 do if isprime(a-1) or isprime(a+1) then if a <> 3 then return a; end if; end if; end do ; end if; end proc: A168389 := proc(n) numtheory[pi](A147819(n)) ; end proc: seq(A168389(n),n=1..100) ; # R. J. Mathar, Dec 03 2009

Extensions

Extended beyond a(26) by R. J. Mathar, Dec 03 2009

A147820 Nearest-neighbors of odd primes, divided by 2.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 31, 33, 34, 35, 36, 37, 39, 40, 41, 42, 44, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 63, 64, 65, 66, 68, 69, 70, 74, 75, 76, 78, 79, 81
Offset: 1

Views

Author

Omar E. Pol, Nov 14 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Union[Flatten[{(#-1)/2,(#+1)/2}&/@Prime[Range[2,40]]]] (* Harvey P. Dale, Oct 19 2011 *)

Formula

a(n) = A147819(n)/2.

A210939 Nonprime nearest-neighbors of the primes.

Original entry on oeis.org

1, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 28, 30, 32, 36, 38, 40, 42, 44, 46, 48, 52, 54, 58, 60, 62, 66, 68, 70, 72, 74, 78, 80, 82, 84, 88, 90, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 126, 128, 130, 132, 136, 138, 140, 148, 150, 152, 156
Offset: 1

Views

Author

Omar E. Pol, Apr 17 2012

Keywords

Comments

Essentially the same as A147819. R. J. Mathar, Jun 25 2012

Crossrefs

Nonprimes in A045718.

Programs

  • Mathematica
    Select[Range[156], ! PrimeQ[#] && (PrimeQ[# - 1] || PrimeQ[# + 1]) &] (* T. D. Noe, Apr 18 2012 *)
    Join[{1},Flatten[#+{-1,1}&/@Prime[Range[3,40]]]//Union] (* Harvey P. Dale, Oct 22 2022 *)
Showing 1-3 of 3 results.