login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A347078 Primes p such that tau(p - 1) = tau(p - 2) + 1, where tau(k) is the number of divisors of k (A000005). 3
3, 5, 11, 17, 197, 257, 59051, 65537, 149771, 178931, 227531, 363611, 3017171, 4782971, 5456897, 7935491, 10093331, 15046643, 15896171, 20493731, 26224643, 27709697, 28558337, 29986577, 51451931, 55591937, 71014331, 72641531, 83119691, 87441203, 98545331, 116294657 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The first 5 known Fermat primes from A019434 are in the sequence.
Triples of [tau(a(n)-2), tau(a(n)-1), tau(a(n))]: [1, 2, 2], [2, 3, 2], [3, 4, 2], [4, 5, 2], [8, 9, 2], [8, 9, 2], [11, 12, 2], [16, 17, 2], [15, 16, 2], ...
Exactly one of p-1 and p-2 is a perfect square as its number of divisors is odd. - David A. Corneth, Sep 05 2021
LINKS
David A. Corneth, Table of n, a(n) for n = 1..13040 (terms <= 10^15)
EXAMPLE
Prime 65537 is in the sequence because tau(65536) = tau(65535) + 1 = 16 + 1 = 17.
MATHEMATICA
s = {}; Do[If[PrimeQ[p] && DivisorSigma[0, p - 1] == DivisorSigma[0, p - 2] + 1, AppendTo[s, p]], {p, 3, 5*10^6}]; s (* Amiram Eldar, Aug 16 2021 *)
Select[Prime[Range[6650000]], DivisorSigma[0, #-1]==DivisorSigma[0, #-2]+1&] (* Harvey P. Dale, Jul 30 2023 *)
PROG
(Magma) [m: m in [3..10^7] | IsPrime(m) and #Divisors(m - 1) eq #Divisors(m - 2) + 1]
(PARI) isok(p) = isprime(p) && (numdiv(p-1) == numdiv(p-2)+1); \\ Michel Marcus, Aug 16 2021
CROSSREFS
Sequence in context: A167675 A277284 A090952 * A270778 A267030 A128949
KEYWORD
nonn
AUTHOR
Jaroslav Krizek, Aug 15 2021
EXTENSIONS
More terms from Amiram Eldar, Aug 16 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)