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.

A383263 Union of prime powers (A246655) and numbers that are not squarefree (A013929).

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 16, 17, 18, 19, 20, 23, 24, 25, 27, 28, 29, 31, 32, 36, 37, 40, 41, 43, 44, 45, 47, 48, 49, 50, 52, 53, 54, 56, 59, 60, 61, 63, 64, 67, 68, 71, 72, 73, 75, 76, 79, 80, 81, 83, 84, 88, 89, 90, 92, 96, 97, 98, 99, 100, 101, 103
Offset: 1

Views

Author

Peter Luschny, Apr 27 2025

Keywords

Comments

Union of A013929 and A000040. - Chai Wah Wu, Apr 27 2025

Crossrefs

Essentially the same as A363597.

Programs

  • Maple
    with(NumberTheory):
    IsPrimePower := n -> nops(PrimeFactors(n)) = 1:
    IsA383263 := n -> IsPrimePower(n) or not IsSquareFree(n):
    select(IsA383263, [seq(1..104)]);
  • Mathematica
    Select[Range[120], Or[PrimePowerQ[#], ! SquareFreeQ[#]] &] (* Michael De Vlieger, Apr 27 2025 *)
  • PARI
    isok(k) = isprimepower(k) || !issquarefree(k);
    
  • Python
    from math import isqrt
    from sympy import mobius, primepi
    def A383263(n):
        def f(x): return int(n+x+sum(mobius(k)*(x//k**2) for k in range(2, isqrt(x)+1))-primepi(x))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Apr 27 2025
  • SageMath
    def isA383263(n: int) -> bool: return is_prime_power(n) or not is_squarefree(n)