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.

A308442 Primes of the form (p^k+1)/2 where p is prime and k > 1.

This page as a plain text file.
%I A308442 #10 May 29 2019 05:25:54
%S A308442 5,13,41,61,181,313,421,1201,1741,1861,2521,3121,5101,7321,8581,9661,
%T A308442 14281,16381,19801,36721,41761,60901,71821,83641,100801,106261,135721,
%U A308442 139921,161881,163021,199081,205441,218461,273061,282001,337021,353641,388081,431521,491041,531481,539761,552301,571381
%N A308442 Primes of the form (p^k+1)/2 where p is prime and k > 1.
%C A308442 The only primes of the form (p^k-1)/2 are A076481, since (p^k-1)/2 is divisible by (p-1)/2.
%C A308442 k must be a power of 2, since if k has an odd divisor d>1, (p^k+1)/2 is divisible by (p^(k/d)+1)/2.
%H A308442 Robert Israel, <a href="/A308442/b308442.txt">Table of n, a(n) for n = 1..10000</a>
%e A308442 a(3) = 41 is in the sequence because 41 = (3^4 + 1)/2.
%p A308442 N:= 10^6: # to get terms <= N
%p A308442 p:= 2:
%p A308442 Res:= NULL:
%p A308442 do
%p A308442   p:= nextprime(p);
%p A308442   if p^2 >= 2*N then break fi;
%p A308442   pk:= p;
%p A308442   do
%p A308442     pk:= pk^2;
%p A308442     if pk >= 2*N then break fi;
%p A308442     v:= (pk+1)/2;
%p A308442     if isprime(v) then Res:= Res, v;
%p A308442     fi;
%p A308442   od
%p A308442 od:
%p A308442 sort([Res]); # _Robert Israel_, May 27 2019
%Y A308442 Cf. A076481.
%Y A308442 Contains A067756.
%K A308442 nonn
%O A308442 1,1
%A A308442 _J. M. Bergot_ and _Robert Israel_, May 27 2019