OFFSET
1,2
COMMENTS
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Conjugate Partition
FORMULA
EXAMPLE
MATHEMATICA
f[n_] := Block[{ww, dec}, dec[x_] := Apply[Times, MapIndexed[Prime[First@ #2]^#1 &, x]]; ww = NestList[Append[#, 1] &, {1}, # - 1] &[-2 + Length@ NestWhileList[NextPrime@ # &, 1, Times @@ {##} <= n &, All] ]; {{{0}}}~Join~Map[Block[{w = #, k = 1}, Sort@ Apply[Join, {{ConstantArray[1, Length@ w]}, If[Length@ # == 0, #, #[[1]]] }] &@ Reap[Do[If[# <= n, Sow[w]; k = 1, If[k >= Length@ w, Break[], k++]] &@ dec@ Set[w, If[k == 1, MapAt[# + 1 &, w, k], PadLeft[#, Length@ w, First@ #] &@ Drop[MapAt[# + Boole[i > 1] &, w, k], k - 1] ]], {i, Infinity}] ][[-1]] ] &, ww]]; Sort[Map[{Times @@ MapIndexed[Prime[First@ #2]^#1 &, #], Times @@ MapIndexed[Prime[First@ #2]^#1 &, Table[LengthWhile[#1, # >= j &], {j, #2}]] & @@ {#, Max[#]}} &, Join @@ f[2310]]][[All, -1]] (* Michael De Vlieger, Oct 16 2018 *)
PROG
(PARI) partitionConj(v)=vector(v[1], i, sum(j=1, #v, v[j]>=i))
primeSignature(n)=vecsort(factor(n)[, 2]~, , 4)
f(n)=if(n==1, return(1)); my(e=partitionConj(primeSignature(n))~); factorback(concat(Mat(primes(#e)~), e))
A025487=[2, 4, 6, 8, 12, 16, 24, 30, 32, 36, 48, 60, 64, 72, 96, 120, 128, 144, 180, 192, 210, 216, 240, 256, 288, 360, 384, 420, 432, 480, 512, 576, 720, 768];
concat(1, apply(f, A025487)) \\ Charles R Greathouse IV, Jun 02 2016
(Python)
from math import prod
from itertools import count
from functools import lru_cache
from sympy import prime, integer_log, primorial, factorint
from oeis_sequences.OEISsequences import bisection
def A181822(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 = n-1+x
for k in count(1):
if primorial(k)>x:
break
c -= g(x, k, 1)
return c
return prod(primorial(e) for e in factorint(bisection(f, n, n)).values()) # Chai Wah Wu, Mar 23 2026
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Matthew Vandermast, Dec 07 2010
STATUS
approved
