OFFSET
1,2
COMMENTS
MAPLE
alias(DedekindPsi = A001615):
A357587List := proc(sup) local S, A, k, j;
S := select(n -> irem(DedekindPsi(n), n) = 0, [$2..sup]):
A := proc(n) k := padic[ordp](n, 2); j := ifelse(irem(n, 4) = 0, k, 0);
return 2^(j-2)*DedekindPsi(n*2^(-k)) end;
seq(A(k), k = S) end: A357587List(20000);
MATHEMATICA
DedekindPsi[n_] := n*Times @@ (1 + 1/FactorInteger[n][[All, 1]]);
A358015[n_] := Module[{k, j}, k = IntegerExponent[n, 2]; j = If[Divisible[n, 4], k, 0]; DedekindPsi[n*2^(-k)]*2^(j - 1)];
Reap[For[k = 2, k <= 20000, k++, If[Divisible[DedekindPsi[k], k], Sow[A358015[k]/2]]]][[2, 1]] (* Jean-François Alcover, Mar 12 2024 *)
PROG
(SageMath)
from sage.arith.misc import dedekind_psi
def A357587List(sup):
S = [n for n in srange(2, sup) if n.divides(dedekind_psi(n))]
def A(n):
k = valuation(n, 2)
j = k if Integer(4).divides(n) else 0
return 2^(j-2)*dedekind_psi(n*2^(-k))
return [A(k) for k in S]
print(A357587List(20000))
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Oct 26 2022
STATUS
approved