OFFSET
1,5
COMMENTS
Completely multiplicative with a(p) = p if p is of the form 6k-1 and a(p) = 1 otherwise.
Largest term of A259548 that divides n.
MATHEMATICA
f[p_, e_] := If[Mod[p, 6] == 5, p^e, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* after Amiram Eldar at A248909 *)
PROG
(PARI) a(n) = {my(f = factor(n)); for (i=1, #f~, if ((f[i, 1] + 1) % 6, f[i, 1] = 1); ); factorback(f); } \\ after Michel Marcus at A248909
(Python)
from math import prod
from sympy import factorint
def A343431(n): return prod(p**e for p, e in factorint(n).items() if not (p+1)%6) # Chai Wah Wu, Dec 26 2022
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Peter Munn, Apr 15 2021
STATUS
approved