cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A000026 Mosaic numbers or multiplicative projection of n: if n = Product (p_j^k_j) then a(n) = Product (p_j * k_j).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 6, 6, 10, 11, 12, 13, 14, 15, 8, 17, 12, 19, 20, 21, 22, 23, 18, 10, 26, 9, 28, 29, 30, 31, 10, 33, 34, 35, 24, 37, 38, 39, 30, 41, 42, 43, 44, 30, 46, 47, 24, 14, 20, 51, 52, 53, 18, 55, 42, 57, 58, 59, 60, 61, 62, 42, 12, 65, 66, 67, 68, 69, 70, 71, 36
Offset: 1

Views

Author

Keywords

Comments

a(n) = n if n is squarefree.
a(2n) = 2n if and only if n is squarefree. - Peter Munn, Feb 05 2017

Examples

			24 = 2^3*3^1, a(24) = 2*3*3*1 = 18.
		

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).

Crossrefs

Programs

  • 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
    
  • 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 ]
  • 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
    
  • 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

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
a(n) = A005361(n) * A007947(n). - Enrique Pérez Herrero, Jun 24 2010
a(A193551(n)) = n and a(m) != n for m < A193551(n). - Reinhard Zumkeller, Aug 27 2011
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

Extensions

Example, program, definition, comments and more terms added by Olivier Gérard (02/99).