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.

A245674 Prime numbers P such that 8*P^2-1 and 8*(8*P^2-1)^2-1 are also prime numbers.

This page as a plain text file.
%I A245674 #27 Feb 26 2025 06:27:07
%S A245674 2,79,107,173,257,359,383,523,593,971,1493,1811,1867,2273,2357,3187,
%T A245674 4111,4723,6389,7607,8101,8699,9473,11027,12157,12227,15017,16301,
%U A245674 16987,18797,19801,19913,20071,20323,21313,22003,22307,23203,24229,24733,24859,24943
%N A245674 Prime numbers P such that 8*P^2-1 and 8*(8*P^2-1)^2-1 are also prime numbers.
%C A245674 Subsequence of A245639.
%C A245674 For P < 10^9 in this sequence, 8*(8*(8*P^2-1)^2-1)^2-1 is composite.
%C A245674 Let f(x) = 8*x^2-1 and P >= 2. Then {f(P), f(f(P)), f(f(f(P)))} cannot all be prime. Proof: By doing cases on P mod 7, it can be shown that {f(P), f(f(P)), f(f(f(P)))} contains a multiple of 7. Also, all 3 numbers are greater than 7. - _Jason Yuen_, Feb 26 2025
%H A245674 Pierre CAMI, <a href="/A245674/b245674.txt">Table of n, a(n) for n = 1..10000</a>
%e A245674 2 is prime, 8*2^2-1=31 is prime, 8*31^2-1=7687 is prime, so 2 is in the sequence.
%t A245674 f[n_]:=8 n^2 - 1; Select[Prime[Range[3000]], PrimeQ[f[#]]&&PrimeQ[f[f[#]]]&] (* _Vincenzo Librandi_, Sep 08 2014 *)
%o A245674 (PFGW & SCRIPT)
%o A245674 SCRIPT
%o A245674 DIM i
%o A245674 DIM j,0
%o A245674 DIM n,0
%o A245674 DIMS t
%o A245674 OPENFILEOUT myf,a(n).txt
%o A245674 LABEL loop1
%o A245674 SET j,j+1
%o A245674 SETS t,%d\ ;p(j)
%o A245674 SET i,8*p(j)^2-1
%o A245674 PRP i,t
%o A245674 IF ISPRP THEN GOTO a
%o A245674 GOTO loop1
%o A245674 LABEL a
%o A245674 SET i,8*i^2-1
%o A245674 PRP i,t
%o A245674 IF ISPRP THEN GOTO b
%o A245674 GOTO loop1
%o A245674 LABEL b
%o A245674 WRITE myf,t
%o A245674 GOTO loop1
%o A245674 (PARI)
%o A245674 f(x) = 8*x^2-1;
%o A245674 forprime(p=1,10^5,if(ispseudoprime(f(p)) && ispseudoprime(f(f(p))), print1(p,", "))) \\ _Derek Orr_, Jul 29 2014
%o A245674 (Magma) [p: p in PrimesUpTo(25000)| IsPrime(8*p^2-1)and IsPrime(512*p^4-128*p^2+7)]; // _Vincenzo Librandi_, Sep 08 2014
%Y A245674 Cf. A245639.
%K A245674 nonn,easy
%O A245674 1,1
%A A245674 _Pierre CAMI_, Jul 29 2014