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.

A034915 Primes of the form p^k - p + 1 for prime p.

This page as a plain text file.
%I A034915 #21 Mar 21 2018 06:31:29
%S A034915 3,7,31,43,79,127,157,241,337,727,1321,3121,4423,6163,6841,8191,19183,
%T A034915 19681,22651,26407,28549,29761,37057,68881,78121,113233,117643,121453,
%U A034915 130303,131071,143263,208393,292141,371281,375157,412807,524287,527803
%N A034915 Primes of the form p^k - p + 1 for prime p.
%C A034915 Related to hyperperfect numbers of a certain form.
%C A034915 Since x^k-x+1 is divisible by x^2-x+1 for k==2 (mod 6), none of k=8,14,20,... occur. - _Robert Israel_, Mar 20 2018
%H A034915 Robert Israel, <a href="/A034915/b034915.txt">Table of n, a(n) for n = 1..4960</a>
%H A034915 J. S. McCranie, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL3/mccranie.html">A study of hyperperfect numbers</a>, J. Int. Seqs. Vol. 3 (2000) #P00.1.3.
%e A034915 11^3 - 11 + 1 = 1321 is prime, so 1321 is a term.
%p A034915 N:= 10^6: # to get all terms <= N
%p A034915 Res:= NULL;
%p A034915 p:= 1:
%p A034915 do
%p A034915   p:= nextprime(p);
%p A034915   if p^2-p+1>N then break fi;
%p A034915   for i from 2 to floor(log[p](N+p-1)) do
%p A034915     if isprime(p^i-p+1) then Res:= Res, p^i-p+1 fi
%p A034915   od
%p A034915 od:
%p A034915 sort(convert({Res},list)); # _Robert Israel_, Mar 20 2018
%Y A034915 Contains A074268.
%K A034915 nonn
%O A034915 1,1
%A A034915 _Jud McCranie_