OFFSET
1,2
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10001
FORMULA
From Michael De Vlieger, Dec 29 2019: (Start)
a(p_k) = p_(k+1) for odd prime p.
a(2^k) = 6^k.
a(p_k#) = p_(k+1)# for p_k# = A002110(k). (End)
EXAMPLE
From Michael De Vlieger, Dec 29 2019: (Start)
a(1) = 1 since 1 is the empty product.
a(2) = 6 because 2 = 2^1 in form p_k^e; switching p_(k+1) for p, we have 3^1 = 3, and the largest power of 2 dividing 2 is 2^1 = 2; thus 3 * 2 = 6.
a(4) = 36 since 4 = 2^2 -> 4(3^2).
a(6) = 30 since 6 = 2^1 * 3^1 -> 2(3 * 5).
a(12) = 180 since 12 = 2^2 * 3 -> 4(3^2 * 5) = 4(45) = 180.
a(30) = 210 since 30 = 2 * 3 * 5 -> 2(3 * 5 * 7) = 210.
(End)
MATHEMATICA
Array[(Times @@ Map[#1^#2 & @@ # &, FactorInteger[#] /. {p_, e_} /; e > 0 :> {Prime[PrimePi@ p + 1], e}] - Boole[# == 1])*2^IntegerExponent[#, 2] &, 75] (* Michael De Vlieger, Dec 29 2019 *)
PROG
(PARI) a(n)={my(f=factor(n)); prod(i=1, #f~, my(p=f[i, 1], e=f[i, 2]); if(p==2, 6, nextprime(p+1))^e)} \\ Andrew Howroyd, Jul 25 2018
(Python)
from sympy import nextprime, factorint
from math import prod
def A283980(n): return prod(nextprime(p)**e if p > 2 else 6**e for p, e in factorint(n).items()) # Chai Wah Wu, Dec 08 2022
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, Mar 19 2017
STATUS
approved