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.

A079707 In prime factorization of n replace odd primes with their prime predecessor.

Original entry on oeis.org

1, 2, 2, 4, 3, 4, 5, 8, 4, 6, 7, 8, 11, 10, 6, 16, 13, 8, 17, 12, 10, 14, 19, 16, 9, 22, 8, 20, 23, 12, 29, 32, 14, 26, 15, 16, 31, 34, 22, 24, 37, 20, 41, 28, 12, 38, 43, 32, 25, 18, 26, 44, 47, 16, 21, 40, 34, 46, 53, 24, 59, 58, 20, 64, 33, 28, 61, 52, 38, 30, 67, 32, 71, 62, 18
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 31 2003

Keywords

Comments

Result after A061395(n)-1 iterations = A061142(n).

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[p == 2, 2, NextPrime[p, -1]]^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 29 2022 *)
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i,1] == 2, f[i,1], precprime(f[i,1]-1))^f[i,2]);} \\ Amiram Eldar, Nov 29 2022

Formula

a(n) <= n; a(n) < n iff n > 1 is odd; a(n) = n iff n = 2^k.
A001222(a(n)) = A001222(n).
For 3-smooth numbers: a(2^i * 3^j) = 2^(i+j).
Multiplicative with 2->2 and prime(k)->prime(k-1), k>1.
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime > 2} ((p^2-p)/(p^2 - prevprime(p))) = 0.3310558934..., where prevprime is A151799. - Amiram Eldar, Nov 29 2022