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.

A218047 Numbers n such that n^2+1, (n+2)^2+1, (n+6)^2+1, (n+10)^2+1 and (n+12)^2+1 are prime.

This page as a plain text file.
%I A218047 #7 Nov 30 2019 20:06:57
%S A218047 4,14,31464,37684,65664,202034,287414,300174,430044,630734,791834,
%T A218047 809244,885274,1230334,1347834,1411654,1424674,1475744,1635134,
%U A218047 1721844,1914514,2391364,2536414,2855194,3151704,3386994,3421844,4010614,4121494,4186664,4566484
%N A218047 Numbers n such that n^2+1, (n+2)^2+1, (n+6)^2+1, (n+10)^2+1 and (n+12)^2+1 are prime.
%C A218047 This is a subsequence of A096012.
%C A218047 a(k)==4 mod 10 because if n==0, 2, 6 or 8 mod 10, then n^2+1 or (n+2)^2+1 is divisible by 5. When n==4 (mod 10), then (n+4)^2+1 and (n+8)^2+1 are always divisible by 5.
%e A218047 4 is in the sequence because 4^2+1 = 5; 6^2+1 = 37; 10^2+1 = 101; 14^2+1 = 197 and 16^2+1 = 257 are prime.
%p A218047 with(numtheory):f:=n->n^2+1: for n from 1 to  460000 do:if type(f(n),prime) and type(f(n+2),prime) and type(f(n+6),prime) and type(f(n+10),prime) and type(f(n+12),prime) then printf(`%d, `,n):else fi:od:
%t A218047 lst={}; Do[p1=n^2+1; p2=(n+2)^2+1; p3=(n+6)^2+1; p4=(n+10)^2+1; p5=(n+12)^2+1;If[PrimeQ[p1] && PrimeQ[p2] && PrimeQ[p3] && PrimeQ[p4]&& PrimeQ[p5], AppendTo[lst, n]], {n, 0, 460000}];lst
%t A218047 Select[Range[457*10^4],AllTrue[(#+{0,2,6,10,12})^2+1,PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Nov 30 2019 *)
%o A218047 (PARI) is_A218047(n,d=[0,2,6,10,12])=!for(i=1,#d,isprime(1+(n+d[i])^2) || return)
%o A218047 forstep(n=4,9e9,10,is_A218047(n) & print1(n",")) \\ _M. F. Hasler_, Oct 21 2012
%Y A218047 Cf. A002522, A002496, A096012.
%K A218047 nonn
%O A218047 1,1
%A A218047 _Michel Lagneau_, Oct 19 2012
%E A218047 Given terms a(1..31) double checked by _M. F. Hasler_, Oct 21 2012