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.

A382265 In the prime factorization of n replace the k-th prime with the k-th nonprime number.

Original entry on oeis.org

1, 1, 4, 1, 6, 4, 8, 1, 16, 6, 9, 4, 10, 8, 24, 1, 12, 16, 14, 6, 32, 9, 15, 4, 36, 10, 64, 8, 16, 24, 18, 1, 36, 12, 48, 16, 20, 14, 40, 6, 21, 32, 22, 9, 96, 15, 24, 4, 64, 36, 48, 10, 25, 64, 54, 8, 56, 16, 26, 24, 27, 18, 128, 1, 60, 36, 28, 12, 60, 48, 30, 16, 32, 20, 144
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 19 2025

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; local k; if n=1 then 1 else
          for k from 1+b(n-1) while isprime(k) do od; k fi
        end:
    a:= n-> mul(b(numtheory[pi](i[1]))^i[2], i=ifactors(n)[2]):
    seq(a(n), n=1..75);  # Alois P. Heinz, Mar 21 2025
  • Mathematica
    nonPrime[n_] := FixedPoint[n + PrimePi@# &, n + PrimePi@ n]; (* Robert G. Wilson v at A018252 *)
    non[p_] := non[p] = nonPrime[PrimePi[p]]; f[p_, e_] := non[p]^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Mar 21 2025 *)

Formula

If n = Product prime(k)^e(k) then a(n) = Product nonprime(k)^e(k).