login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A265746
Jacobsthal greedy base (A265747) interpreted as base-3 numbers, then shown in decimal.
4
0, 1, 2, 3, 4, 9, 10, 11, 12, 13, 18, 27, 28, 29, 30, 31, 36, 37, 38, 39, 40, 81, 82, 83, 84, 85, 90, 91, 92, 93, 94, 99, 108, 109, 110, 111, 112, 117, 118, 119, 120, 121, 162, 243, 244, 245, 246, 247, 252, 253, 254, 255, 256, 261, 270, 271, 272, 273
OFFSET
0,3
COMMENTS
Analogously to "Fibbinary numbers" (A003714) and "Catquaternary numbers" (A244161), this sequence could be called "Jacoternary numbers".
LINKS
FORMULA
a(0) = 0; for n >= 1, a(n) = 3^(A130249(n)-2) + a(n - A001045(A130249(n))).
MATHEMATICA
a[n_] := FromDigits[IntegerDigits[A265747[n]], 3]; Array[a, 100, 0] (* Amiram Eldar, Jul 21 2023 using A265747[n] *)
PROG
(Scheme, with memoization-macro definec)
(definec (A265746 n) (if (zero? n) n (+ (A000244 (- (A130249 n) 2)) (A265746 (- n (A001045 (A130249 n)))))))
(PARI) a(n) = fromdigits(digits(A265747(n)), 3); \\ Amiram Eldar, Jul 21 2023, using A265747(n)
CROSSREFS
Cf. also A003714, A244161.
Sequence in context: A140238 A135210 A037468 * A047454 A373788 A081870
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Dec 17 2015
STATUS
approved