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!)
A291199 Primes p such that phi(p*(p+1)/2) is a triangular number (A000217). 1

%I #24 Aug 22 2017 21:06:38

%S 2477,44287823,58192759,110369351,664009019,2574106333,6870260119,

%T 7423240007,60370077539,188271042191,235399729007,236767359977,

%U 305214702643,717724689959

%N Primes p such that phi(p*(p+1)/2) is a triangular number (A000217).

%C a(15) > 10^12. - _Giovanni Resta_, Aug 21 2017

%e Prime number 2477 is a term since phi(2477*2478/2) = 1856*1857/2.

%o (PARI) isok(n) = isprime(n) && ispolygonal(eulerphi(n*(n+1)/2), 3);

%o (PARI) is(n) = ispolygonal(eulerphi(n\2+1)*(n-1), 3) && isprime(n) \\ _Charles R Greathouse IV_, Aug 22 2017

%o (Python)

%o from __future__ import division

%o from sympy.ntheory.primetest import is_square

%o from sympy import totient, nextprime

%o A291199_list, p = [], 3

%o while p < 10**8:

%o if is_square(8*(p-1)*totient((p+1)//2)+1):

%o A291199_list.append(p)

%o p = nextprime(p) # _Chai Wah Wu_, Aug 22 2017

%Y Cf. A000010, A000217, A034953, A086700.

%K nonn,more

%O 1,1

%A _Altug Alkan_, Aug 20 2017

%E a(5)-a(14) from _Giovanni Resta_, Aug 21 2017

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.)