OFFSET
1,2
COMMENTS
A permutation of the positive integers.
The partition given by the prime signature of A025487(n) has Heinz number a(n). - Pontus von Brömssen, Mar 25 2023
LINKS
EXAMPLE
PROG
(Python)
from math import prod
from itertools import count
from functools import lru_cache
from sympy import prime, integer_log, factorint
from oeis_sequences.OEISsequences import bisection
def A181820(n):
@lru_cache(maxsize=None)
def g(x, m, j): return sum(g(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 -= g(x, k, 1)
return c
return prod(prime(e) for e in factorint(bisection(f, n, n)).values()) # Chai Wah Wu, Mar 30 2026
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Matthew Vandermast, Dec 07 2010
STATUS
approved
