OFFSET
1,1
COMMENTS
2, 3, 5, along with primes p such that (p-1)/2 is an odd prime power.
Any rational prime p coprime to N decomposes into a product of EulerPhi(N)/ord(p,N) prime ideals in Z[zeta_N], where ord(p,N) is the multiplicative order of p modulo N. As a result, this sequence lists primes P such that: for every Dirichlet character chi modulo P, there exist some rational primes p which remain prime in Z[chi], where Z[chi] is the ring generated by values of chi.
LINKS
Jianing Song, Table of n, a(n) for n = 1..10000
Wikipedia, Dirichlet character.
EXAMPLE
The Dirichlet characters modulo 19 have orders 1, 2, 3, 6, 9, or 18. In both Z[zeta_3] = Z[zeta_6] and Z[zeta_9] = Z[zeta_18] there are rational primes remaining inert (namely primes p == 2 (mod 3) in the former and p == 2, 5 (mod 9) in the latter), so 19 is a term.
PROG
(PARI) isoddprimepower(n) = (n%2) && isprimepower(n)
isA396480(p) = isprime(p) && (p<=5 || isoddprimepower((p-1)/2))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jianing Song, May 27 2026
STATUS
approved
