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.

A087126 Primes of the form p^k - p^(k-1) + 1 for some prime p and integer k > 1.

This page as a plain text file.
%I A087126 #9 Feb 16 2025 08:32:51
%S A087126 3,5,7,17,19,43,101,157,163,257,487,1459,2029,4423,6163,14407,19183,
%T A087126 22651,23549,26407,37057,39367,62501,65537,77659,113233,121453,143263,
%U A087126 208393,292141,342733,375157,412807,527803,564899,590593,697049,843643
%N A087126 Primes of the form p^k - p^(k-1) + 1 for some prime p and integer k > 1.
%C A087126 It is usually the case that, for prime p and k > 1, the first time the totient function phi(n) has value p^k - p^(k-1) is for n = p^k. However, this is not true when p^k - p^(k-1) + 1 is prime.
%H A087126 Vincenzo Librandi, <a href="/A087126/b087126.txt">Table of n, a(n) for n = 1..1000</a>
%H A087126 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/TotientFunction.html">Totient Function</a>
%H A087126 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/TotientValenceFunction.html">Totient Valence Function</a>
%t A087126 lst={}; maxNum=10^6; n=1; While[p=Prime[n]; p^2-p+1<maxNum, i=2; While[m=p^i-p^(i-1)+1; m<maxNum, If[PrimeQ[m], AppendTo[lst, m]]; i++ ]; n++ ]; Sort[lst]
%Y A087126 Cf. A002383 (primes of the form n^2 + n + 1, which is the same as n^2 - n + 1).
%Y A087126 Cf. A019434 (Fermat primes), A003306 (2*3^n + 1 is prime), A056799 (8*9^n + 1 is prime), A056797 (9*10^n + 1 is prime), A087139 (least k such that p^k - p^(k-1) + 1 is prime for p = prime(n)).
%K A087126 nonn
%O A087126 1,1
%A A087126 _T. D. Noe_, Aug 15 2003