OFFSET
1,2
REFERENCES
R. Honsberger, Mathematical Gems III, M.A.A., 1985, p. 225.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Eric Weisstein's World of Mathematics, Katona's Problem
FORMULA
a(n) = A000792(n-1)+1 for n>1. - Harry Altman, May 17 2011
MATHEMATICA
f[n_] := Min[ Table[2p + 3Ceiling[Log[3, n/2^p]], {p, 0, 2}]]; g[1] = 1; g[n_] := g[n] = Block[{k = g[n - 1]}, While[ f[k] != n, k++ ]; k]; Table[ g[n], {n, 2, 15}] (* Robert G. Wilson v, Jan 15 2005 *)
PROG
(Python)
def A007601(n):
if n == 1: return 1
q, r = divmod(n-1, 3)
return 1+int((3, 4, 6)[r]*3**(q-1)) # Chai Wah Wu, Jan 24 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Robert G. Wilson v, Jan 15 2005
STATUS
approved
