OFFSET
1,2
COMMENTS
a(n) = n if n is squarefree.
a(2n) = 2n if and only if n is squarefree. - Peter Munn, Feb 05 2017
REFERENCES
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
R. A. Gillman, The Average Size of a Certain Arithmetic Function, A6660 solution, Amer. Math. Monthly, 100 (1993), pp. 296-298.
B. Gordon and M. M. Robertson, Two theorems on mosaics, Canad. J. Math., 17 (1965), 1010-1014.
A. A. Mullin, Some related number-theoretic functions, Research Problem 4, Bull. Amer. Math. Soc., 69 (1963), 446-447.
Daniel Tsai, A recurring pattern in natural numbers of a certain property, Integers (2021) Vol. 21, Article #A32.
FORMULA
n = Product (p_j^k_j) -> a(n) = Product (p_j * k_j).
Multiplicative with a(p^e) = p*e. - David W. Wilson, Aug 01 2001
Sum_{k=1..n} a(k) ~ c * n^2, where c = (zeta(2)^2/2) * Product_{p prime} (1 - 3/p^2 + 2/p^3 + 1/p^4 - 1/p^5) = 0.4175724194... . - Amiram Eldar, Oct 25 2022
EXAMPLE
24 = 2^3*3^1, a(24) = 2*3*3*1 = 18.
MAPLE
A000026 := proc(n) local e, j; e := ifactors(n)[2]:
mul(e[j][1]*e[j][2], j=1..nops(e)) end:
seq(A000026(n), n=1..80); # Peter Luschny, Jan 17 2011
MATHEMATICA
Array[ Times@@Flatten[ FactorInteger[ # ] ]&, 100 ]
PROG
(PARI) a(n)=local(f); if(n<1, 0, f=factor(n); prod(k=1, matsize(f)[1], f[k, 1]*f[k, 2]))
(PARI) a(n)=my(f=factor(n)); factorback(f[, 1])*factorback(f[, 2]) \\ Charles R Greathouse IV, Apr 04 2016
(Haskell)
a000026 n = f a000040_list n 1 (0^(n-1)) 1 where
f _ 1 q e y = y * e * q
f ps'@(p:ps) x q e y
| m == 0 = f ps' x' p (e+1) y
| e > 0 = f ps x q 0 (y * e * q)
| x < p * p = f ps' 1 x 1 y
| otherwise = f ps x 1 0 y
where (x', m) = divMod x p
a000026_list = map a000026 [1..]
-- Reinhard Zumkeller, Aug 27 2011
(Python)
from math import prod
from sympy import factorint
def a(n): f = factorint(n); return prod(p*f[p] for p in f)
print([a(n) for n in range(1, 73)]) # Michael S. Branicky, May 27 2021
CROSSREFS
KEYWORD
nonn,easy,nice,mult
AUTHOR
EXTENSIONS
Example, program, definition, comments and more terms added by Olivier Gérard (02/99).
STATUS
approved