OFFSET
1,1
COMMENTS
Numbers k such that psi(k) = 2*p for some prime p.
Numbers that divide 240 or 504 but not 24, and numbers of the form d*q for some safe prime q and d | 24.
Occurrences of 4 consecutive numbers other than (20, 21, 22, 23) are congruent to (716, 717, 718, 719) (mod 720), generated by some prime p == 89 (mod 90).
Proof: Suppose that (d1*p1, d2*p2, d3*p3, d4*p4) are 4 consecutive members in A395563, i.e., d1, d2, d3, d4 are divisors of 24, and p1, p2, p3, p4 are safe primes != 7. We note that pi == 5 (mod 6), so none of the four di*pi can be congruent to 1 modulo 6. As a result, these four numbers are congruent to either (2, 3, 4, 5) or (3, 4, 5, 0) modulo 6.
If (d1*p1, d2*p2, d3*p3, d4*p4) == (3, 4, 5, 0) (mod 6), then d1 = 3, d2 = 2 (mod 6), d3 = 1, d4 == 0 (mod 6). It follows that d1*p1 == 15 (mod 18), so d4*p4 == 0 (mod 18), but this is impossible since it would imply d4 == 0 (mod 18).
If (d1*p1, d2*p2, d3*p3, d4*p4) == (2, 3, 4, 5) (mod 6), then d1 == 4 (mod 6), d2 = 3, d3 == 2 (mod 6), d4 = 1. Of course only one (and exactly one) of d1 and d3 is divisible by 4, so (d1, d2, d3, d4) = (4, 3, 2, 1). Write p1 = 2*p + 1 for some prime p, then p2 = (8*p + 5)/3, (p2 - 1)/2 = (4*p + 1)/3, p3 = 4*p + 3, p4 = 8*p + 7, and these must be all primes. Taking modulo 3 and 5 yields p == 89 (mod 90) if p > 2.
LINKS
Jianing Song, Table of n, a(n) for n = 1..10000
Wikipedia, Dirichlet character.
MATHEMATICA
PositionIndex[DivisorSigma[0, CarmichaelLambda[Range[1000]]/2]][2] (* Paolo Xausa, Jun 03 2026 *)
(* Alternative, after PARI: *)
A395563Q[k_] := ((Divisible[240, k] || Divisible[504, k]) && !Divisible[24, k]) || (PrimeQ[#] && PrimeQ[(#-1)/2] & [k/GCD[k, 24]]);
Select[Range[1000], A395563Q] (* Paolo Xausa, Jun 03 2026 *)
PROG
(PARI) isA395563(n) = if((240%n==0 || 504%n==0) && 24%n!=0, return(1)); n = n/gcd(24, n); return(isprime(n) && isprime((n-1)/2))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jianing Song, May 28 2026
STATUS
approved
