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.

A321890 Primes of the form p^2 + 16 where p is prime.

Original entry on oeis.org

41, 137, 857, 977, 1697, 6257, 7937, 11897, 22817, 32057, 36497, 44537, 52457, 78977, 96737, 151337, 160817, 177257, 192737, 249017, 326057, 361217, 434297, 477497, 491417, 516977, 546137, 564017, 591377, 674057, 737897, 776177, 885497, 942857, 982097, 1018097
Offset: 1

Views

Author

Pierandrea Formusa, Nov 20 2018

Keywords

Comments

Also primes of the form p^2 + q^4 where p and q are primes. The proof of the equivalence of the set of primes p^2 + q^4, where p and q are primes, with respect to this sequence, is the following: Exactly 1 of (p, q) giving a term is 2. q^4 + 4 is divisible by 5 and/or composite and gives no terms. - David A. Corneth, Nov 21 2018

Examples

			41 is prime and 41 = 5^2 + 16, where 5 is prime, therefore 41 is a term.
		

Programs

  • Maple
    select(isprime,[ithprime(p)^2+16$p=1..180]); # Muniru A Asiru, Nov 24 2018
  • Mathematica
    Select[Prime[Range[100]]^2+16, PrimeQ] (* Amiram Eldar, Nov 21 2018 *)
  • MiniZinc
    include "globals.mzn";
    int: n = 1;
    int: max_val = 1200000;
    array[1..n+1] of var 2..max_val: x;
    % primes between 2..max_valset of int:
    prime = 2..max_val diff { i | i in 2..max_val, j in 2..ceil(sqrt(i)) where i mod j = 0} ;
    set of int: primes;primes = prime union {2};
    solve satisfy;
    constraint all_different(x) /\ x[1] in primes /\ x[2] in primes /\
    pow(x[1],2)+16= x[2] ;
    output [ show(x)]
    
  • PARI
    upto(n) = my(res = List()); forprime(p = 3, sqrtint(n-16), if(isprime(p^2 + 16), listput(res, p^2 + 16))); res \\ David A. Corneth, Nov 21 2018

Extensions

More terms from Amiram Eldar, Nov 21 2018