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.

A180263 Odd k such that (k^2 + 1)/2 is not prime.

Original entry on oeis.org

1, 7, 13, 17, 21, 23, 27, 31, 33, 37, 41, 43, 47, 53, 55, 57, 63, 67, 73, 75, 77, 81, 83, 87, 89, 91, 93, 97, 99, 103, 105, 107, 109, 111, 113, 115, 117, 119, 123, 125, 127, 129, 133, 135, 137, 143, 147, 149, 151, 153, 155, 157, 161, 163, 167, 173, 177, 179, 183, 185
Offset: 1

Views

Author

Alex Meiburg, Aug 21 2010

Keywords

Examples

			a(2)=7: (7^2 + 1)/2 = 25, which is not prime, so 7 is in the sequence.
(9^2 + 1)/2 = 41, which is prime, so 9 is not in the sequence.
		

Crossrefs

Cf. A027862 (primes of the form (n^2+1)/2).

Programs

  • Magma
    [ n: n in [1..200 by 2] | not IsPrime((n^2+1) div 2) ];
    
  • Mathematica
    a={};For[i=1,i<100,i=i+2,If[PrimeQ[(i^2+1)/2],0,AppendTo[a,i]]]Print[a]
    Select[Range[1,201,2],!PrimeQ[(#^2+1)/2]&] (* Harvey P. Dale, Jan 07 2016 *)
  • PARI
    isok(n) = (n%2) && !isprime((n^2 + 1)/2); \\ Michel Marcus, Nov 23 2018

Extensions

More terms from Vincenzo Librandi, Nov 18 2010
Example clarified by Harvey P. Dale, Jan 07 2016