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.

A334878 For any n > 0 with prime factorization Product_{k > 0} prime(k)^e_k (where prime(k) denotes the k-th prime number), let b_k = 1 + max_{k > 0} e_k; a(n) = Sum_{k > 0} e_k * b_k^(k-1).

Original entry on oeis.org

0, 1, 2, 2, 4, 3, 8, 3, 6, 5, 16, 5, 32, 9, 6, 4, 64, 7, 128, 11, 10, 17, 256, 7, 18, 33, 12, 29, 512, 7, 1024, 5, 18, 65, 12, 8, 2048, 129, 34, 19, 4096, 11, 8192, 83, 15, 257, 16384, 9, 54, 19, 66, 245, 32768, 13, 20, 67, 130, 513, 65536, 14, 131072, 1025
Offset: 1

Views

Author

Rémy Sigrist, May 14 2020

Keywords

Comments

In other words, a(n) encodes the prime factorization of n in base 1 + A051903(n).
Every nonnegative integer appears finitely many times in this sequence.

Examples

			For n = 84:
- 84 = 7 * 3 * 2^2 = prime(4) * prime(2) * prime(1)^2,
- b_84 = 1 + 2 = 3,
- so a(84) = 1*3^(4-1) + 1*3^(2-1) + 2*3^(1-1) = 32.
		

Crossrefs

Programs

  • PARI
    a(n) = { if (n==1, 0, my (f=factor(n), b=1+vecmax(f[,2]~)); sum(k=1, #f~, f[k,2]*b^(primepi(f[k,1])-1))) }

Formula

a(2^e) = e for any e >= 0.
a(prime(k)) = 2^(k-1) for any k > 0.
a(prime(k)^e) = e*(e+1)^(k-1) for any k > 0 and e >= 0.
a(n) = A087207(n) for any squarefree number n.