login
A276330
a(n) = largest term of A001563 that divides n, a(0) = 0.
5
0, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 18, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 18, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 18, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 18, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 18, 1, 4, 1, 1, 1, 96
OFFSET
0,5
LINKS
FORMULA
a(0) = 0; for n >= 1, a(n) = A001563(A276329(n)).
Other identities. For all n >= 0:
A276331(n) = n - a(n).
MATHEMATICA
f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], (# #!) &[# - i]]], {i, 0, # - 1}] &@ NestWhile[# + 1 &, 0, (# #!) &[# + 1] <= n &]; Rest[a][[All, 1]]]; {0}~Join~Table[# #! &[Length@ TakeWhile[Reverse@ f@ n, # == 0 &] + 1], {n, 120}] (* Michael De Vlieger, Aug 31 2016 *)
PROG
(Scheme) (define (A276330 n) (if (zero? n) n (A001563 (A276329 n))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 30 2016
STATUS
approved