login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A276327 The least significant nonzero digit in greedy A001563-base (A276326), a(0) = 0. 2
0, 1, 2, 3, 1, 1, 2, 3, 2, 1, 2, 3, 3, 1, 2, 3, 4, 1, 1, 1, 2, 3, 1, 1, 2, 3, 2, 1, 2, 3, 3, 1, 2, 3, 4, 1, 2, 1, 2, 3, 1, 1, 2, 3, 2, 1, 2, 3, 3, 1, 2, 3, 4, 1, 3, 1, 2, 3, 1, 1, 2, 3, 2, 1, 2, 3, 3, 1, 2, 3, 4, 1, 4, 1, 2, 3, 1, 1, 2, 3, 2, 1, 2, 3, 3, 1, 2, 3, 4, 1, 5, 1, 2, 3, 1, 1, 1, 1, 2, 3, 1, 1, 2, 3, 2, 1, 2, 3, 3, 1, 2, 3, 4, 1, 1, 1, 2, 3, 1, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(0) = 0; for n >= 1, if A276335(n) = 0 then a(n) = A276333(n), otherwise a(n) = a(A276335(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[Last@ DeleteCases[f@ n, d_ /; d == 0], {n, 120}] (* Michael De Vlieger, Aug 31 2016 *)
PROG
(Scheme, two versions)
;; Implemented with a loop:
(define (A276327 n) (let loop ((n n)) (let ((next_n (A276335 n))) (if (zero? next_n) (A276333 n) (loop next_n)))))
;; As a recurrence:
(definec (A276327 n) (if (zero? n) n (if (zero? (A276335 n)) (A276333 n) (A276327 (A276335 n)))))
CROSSREFS
Sequence in context: A123564 A036466 A065882 * A007884 A190593 A276336
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Aug 30 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 8 02:28 EDT 2024. Contains 374149 sequences. (Running on oeis4.)