OFFSET
1,2
COMMENTS
Not a permutation of natural numbers: a(4) = a(7) = 5.
Let S_rad(m) be the sequence { k : rad(k) | rad(m) }. This sequence gives the number of k <= rad(m). Seen another way, this sequence gives the position of m in S_rad(m).
The number m appears after its factors in S_rad(m). If k < sqrt(m) then k^2 also appears before m.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000 (terms 1..1809 from Michael De Vlieger)
Michael De Vlieger, Log log scatterplot of a(n), n = 1..1809, accentuating primorial A025487(n) in red, noting a(n) above in black, and labeling n in blue italic below for the first 24 terms.
EXAMPLE
a(1) = 1 since 1 is the only number k that does not exceed 1 such that rad(k) | 1.
a(2) = 2 since k in {1, 2} are such that rad(k) | 2.
a(3) = 3 since k in {1, 2, 4} are such that rad(k) | 4.
a(4) = 5 since k in {1, 2, 3, 4, 6} are such that rad(k) | 6, etc.
MATHEMATICA
rad[x_] := Times @@ FactorInteger[#][[All, 1]];
Map[Function[{n, r},
Count[Range[n], _?(Divisible[r, rad[#]] &)]] @@ {#, rad[#]} &,
{1}~Join~Select[Range[Times @@ Prime@ Range[6]],
# == Transpose@ {Prime@ Range[Length[#]], ReverseSort[#[[All, -1]] ]} &@
FactorInteger[#] &] ]
PROG
(Python)
from itertools import count
from functools import lru_cache
from sympy import prime, integer_log, primefactors
from oeis_sequences.OEISsequences import bisection
def A364225(n):
if n == 1: return 1
@lru_cache(maxsize=None)
def g1(x, m, j): return sum(g1(x//(prime(m)**i), m-1, i) for i in range(j, integer_log(x, prime(m))[0]+1)) if m-1 else max(0, x.bit_length()-j)
def f(x):
c, p = n-1+x, 1
for k in count(1):
p *= prime(k)
if p>x:
break
c -= g1(x, k, 1)
return c
ps = tuple(sorted(primefactors(k:=bisection(f, n, n))))
@lru_cache(maxsize=None)
def g2(x, m): return 1 if x == 1 else sum(g2(x//ps[m]**i, m-1) for i in range(integer_log(x, ps[m])[0]+1)) if m else integer_log(x, ps[0])[0]+1
return g2(k, len(ps)-1) # Chai Wah Wu, Apr 16 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael De Vlieger, Oct 24 2023
STATUS
approved
