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.

A173444 Either (n-th prime-1)^2-+1, but not both, is prime.

This page as a plain text file.
%I A173444 #18 Feb 01 2023 18:38:05
%S A173444 1,3,4,5,7,12,13,19,31,32,36,37,42,47,53,54,55,58,60,63,78,79,82,83,
%T A173444 91,94,102,105,106,118,125,126,133,135,144,155,156,159,161,163,178,
%U A173444 184,190,206,210,214,216,219,247,248,284,286,288,307,313,315,322,336,340,344
%N A173444 Either (n-th prime-1)^2-+1, but not both, is prime.
%C A173444 Numbers n such that either A005722(n)-+1 is prime.
%H A173444 Harvey P. Dale, <a href="/A173444/b173444.txt">Table of n, a(n) for n = 1..1000</a>
%e A173444 1 is in the sequence because (1st prime-1)^2-1=0 is nonprime and (1st prime-1)^2+1=2 is prime;
%e A173444 3 is in the sequence because (3rd prime-1)^2-1=15 is nonprime and (3rd prime-1)^2+1=17 is prime.
%p A173444 A005722 := proc(n) (ithprime(n)-1)^2 ; end proc: for n from 1 to 800 do a := A005722(n) ; if isprime(a-1) <> isprime(a+1) then printf("%d,",n) ; end if; end do: # _R. J. Mathar_, Apr 24 2010
%t A173444 ppQ[n_]:=Module[{c=(Prime[n]-1)^2},Sort[PrimeQ[{c+1,c-1}]]== {False, True}]; Select[Range[400],ppQ] (* _Harvey P. Dale_, Jun 24 2011 *)
%t A173444 Select[Range[400],Total[Boole[PrimeQ[(Prime[#]-1)^2+{1,-1}]]]==1&] (* _Harvey P. Dale_, Feb 01 2023 *)
%Y A173444 Cf. A000040, A005722, A006093, A127435.
%K A173444 nonn
%O A173444 1,2
%A A173444 _Juri-Stepan Gerasimov_, Feb 18 2010, Mar 27 2010
%E A173444 More terms from _R. J. Mathar_, Apr 24 2010
%E A173444 Definition clarified by _Harvey P. Dale_, Jun 24 2011