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.

Showing 1-2 of 2 results.

A064988 Multiplicative with a(p^e) = prime(p)^e.

Original entry on oeis.org

1, 3, 5, 9, 11, 15, 17, 27, 25, 33, 31, 45, 41, 51, 55, 81, 59, 75, 67, 99, 85, 93, 83, 135, 121, 123, 125, 153, 109, 165, 127, 243, 155, 177, 187, 225, 157, 201, 205, 297, 179, 255, 191, 279, 275, 249, 211, 405, 289, 363, 295, 369, 241, 375, 341, 459, 335, 327
Offset: 1

Views

Author

Vladeta Jovovic, Oct 30 2001

Keywords

Examples

			a(12) = a(2^2*3) = prime(2)^2 * prime(3) = 3^2*5 = 45, where prime(n) = A000040(n).
		

Crossrefs

Cf. A000040, A003961, A003963 (a left inverse), A006450, A048767, A257538, A290641.
Cf. A076610 (terms sorted into ascending order).

Programs

  • Maple
    a:= n-> mul(ithprime(i[1])^i[2], i=ifactors(n)[2]):
    seq(a(n), n=1..70);  # Alois P. Heinz, Sep 06 2018
  • Mathematica
    Table[If[n == 1, 1, Apply[Times, FactorInteger[n] /. {p_, e_} /; p > 1 :> Prime[p]^e]], {n, 58}] (* Michael De Vlieger, Aug 22 2017 *)
  • PARI
    { for (n=1, 1000, f=factor(n)~; a=1; for (i=1, length(f), a*=prime(f[1, i])^f[2, i]); write("b064988.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 02 2009
    
  • PARI
    a(n) = {my(f = factor(n)); for (k=1, #f~, f[k, 1] = prime(f[k, 1]);); factorback(f);} \\ Michel Marcus, Aug 08 2017
    
  • Python
    from sympy import factorint, prime
    from operator import mul
    def a(n): return 1 if n==1 else reduce(mul, [prime(p)**e for p, e in factorint(n).items()])
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Aug 08 2017
  • Scheme
    (define (A064988 n) (if (= 1 n) n (* (A000040 (A020639 n)) (A064988 (A032742 n))))) ;; Antti Karttunen, Aug 08 2017
    

Formula

From Antti Karttunen, Aug 08 & 22 2017: (Start)
For n = p_{i1} * p_{i2} * ... * p_{ik}, where the indices i1, i2, ..., ik of primes p are not necessarily distinct, a(n) = A006450(i1) * A006450(i2) * ... * A006450(ik).
a(n) = A003961(A290641(n)).
A046523(a(n)) = A046523(n). [Preserves the prime signature of n].
A003963(a(n)) = n.
(End)

A064553 a(1) = 1, a(prime(i)) = i + 1 for i > 0 and a(u * v) = a(u) * a(v) for u, v > 0.

Original entry on oeis.org

1, 2, 3, 4, 4, 6, 5, 8, 9, 8, 6, 12, 7, 10, 12, 16, 8, 18, 9, 16, 15, 12, 10, 24, 16, 14, 27, 20, 11, 24, 12, 32, 18, 16, 20, 36, 13, 18, 21, 32, 14, 30, 15, 24, 36, 20, 16, 48, 25, 32, 24, 28, 17, 54, 24, 40, 27, 22, 18, 48, 19, 24, 45, 64, 28, 36, 20, 32, 30, 40, 21, 72, 22, 26
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 21 2001

Keywords

Comments

a(n) <= n for all n and a(x) = x iff x = 2^i * 3^j for i, j >= 0: a(A003586(n)) = A003586(n) for n > 0. By definition a is completely multiplicative and also surjective. a(p) < a(q) for primes p < q.
Completely multiplicative with a(prime(i)) = i + 1. - Charles R Greathouse IV, Sep 07 2012
a(A080688(n,k)) = A080444(n,k) = n for k=1..A001055(n). - Reinhard Zumkeller, Oct 01 2012

Examples

			a(5) = a(prime(3)) = 3 + 1 = 4; a(14) = a(2*7) = a(prime(1)* prime(4)) = (1+1)*(4+1) = 10.
		

Crossrefs

Programs

  • Haskell
    a064553 1 = 1
    a064553 n = product $ map ((+ 1) . a049084) $ a027746_row n
    -- Reinhard Zumkeller, Apr 09 2012, Feb 17 2012, Jan 28 2011
    
  • Maple
    A064553 := proc(n)
        local a,f,p,e ;
        a := 1 ;
        for f in ifactors(n)[2] do
            p :=op(1,f) ;
            e :=op(2,f) ;
            a := a*(numtheory[pi](p)+1)^e ;
        end do:
        a ;
    end proc: # R. J. Mathar, Sep 07 2012
  • Mathematica
    nn=100; a=Table[0, {nn}]; a[[1]]=1; Do[If[PrimeQ[i], a[[i]]=PrimePi[i]+1, p=FactorInteger[i][[1,1]]; a[[i]] = a[[p]]*a[[i/p]]], {i, 2, nn}]; a (* T. D. Noe, Dec 12 2004, revised Sep 27 2011 *)
    Array[Apply[Times, Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger[ #]] /. p_ /; PrimeQ@ p :> PrimePi@ p + 1] &, 74] (* Michael De Vlieger, Aug 22 2017 *)
  • PARI
    A064553(n)={n=factor(n);n[,1]=apply(f->1+primepi(f),n[,1]);factorback(n)} \\ M. F. Hasler, Aug 28 2012
    
  • Scheme
    (define (A064553 n) (if (= 1 n) n (* (+ 1 (A055396 n)) (A064553 (A032742 n))))) ;; Antti Karttunen, Aug 22 2017

Formula

a(A000040(n)) = n+1.
Let the prime factorization of n be p1^e1...pk^ek, then a(n) = (pi(p1)+1)^e1...(pi(pk)+1)^ek, where pi(p) is the index of prime p. - T. D. Noe, Dec 12 2004
From Antti Karttunen, Aug 22 2017: (Start)
a(n) = A003963(A003961(n)).
a(A181819(n)) = A000005(n).
a(A290641(n)) = n. (End)

Extensions

Displayed values double-checked with new PARI code by M. F. Hasler, Aug 28 2012
Showing 1-2 of 2 results.