A363597 Union of prime powers and numbers that are not squarefree.
1, 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
Examples
1 is in the sequence because it is the empty product. Prime p is in the sequence because it is not a composite squarefree number. Numbers k that have prime power factors p^m | k where at least one prime power factor is such that m > 1 are in the sequence because they are not squarefree composites. Examples include 8, 9, 12, 20, and 36.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range[103], Nand[SquareFreeQ[#], CompositeQ[#]] &]
-
PARI
isok(k) = (k==1) || isprimepower(k) || !issquarefree(k); \\ Michel Marcus, Aug 24 2023
-
Python
from math import isqrt from sympy import mobius, primepi def A363597(n): if n==1: return 1 def f(x): return n-1+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))-primepi(x) m, k = n-1, f(n-1) while m != k: m, k = k, f(k) return m # Chai Wah Wu, Aug 02 2024
Comments