OFFSET
1,1
COMMENTS
An oblong number (A002378) is of the form k*(k+1) where k is a natural number.
From Bernard Schott, Feb 27 2023: (Start)
Subsequence of primes is A002383 because in this case phi(k^2+k+1) = k*(k+1).
Subsequence of oblong numbers is A359847 where k and phi(k) are both oblong numbers. (End)
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000
EXAMPLE
phi(13) = 12 = 3*4, an oblong number; so 13 is a term of the sequence.
MAPLE
filter := m -> issqr(1 + 4*phi(m)) : select(filter, [$(1 .. 700)]); # Bernard Schott, Feb 26 2023
MATHEMATICA
Select[Range[500], IntegerQ@Sqrt[1 + 4*EulerPhi[#]] &] (* Giovanni Resta, Jan 24 2014 *)
PROG
(PARI) isok(m) = my(t=eulerphi(m)); !(t%2) && ispolygonal(t/2, 3); \\ Michel Marcus, Feb 27 2023
(Python)
from itertools import count, islice
from sympy.ntheory.primetest import is_square
from sympy import totient
def A236386_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n:is_square((totient(n)<<2)+1), count(max(1, startvalue)))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Joseph L. Pe, Jan 24 2014
EXTENSIONS
a(16)-a(58) from Giovanni Resta, Jan 24 2014
STATUS
approved