login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A127975 Repeat 3^n three times. 5
1, 1, 1, 3, 3, 3, 9, 9, 9, 27, 27, 27, 81, 81, 81, 243, 243, 243, 729, 729, 729, 2187, 2187, 2187, 6561, 6561, 6561, 19683, 19683, 19683, 59049, 59049, 59049, 177147, 177147, 177147, 531441, 531441, 531441, 1594323, 1594323, 1594323, 4782969, 4782969, 4782969 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

a(n) is the number of functions f:[n+1]->[3] with f(1)=1 and with f(x)=f(y) whenever y=ceiling(x/3). - Dennis P. Walsh, Sep 06 2018

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 0..6000

Index entries for linear recurrences with constant coefficients, signature (0,0,3).

FORMULA

G.f.: (1+x+x^2)/(1-3*x^3).

a(n) = 3^A002264(n) = 3^floor(n/3). - Paolo P. Lava, Jul 17 2008, and Vincenzo Librandi, Sep 20 2011

EXAMPLE

a(6)=9 since there are exactly 9 functions f:[7]->[3], denoted by <f(1),f(2),...,f(7)>, with f(1)=1 and with f(x)=f(y) whenever y=ceiling(x/3). The nine functions are <1,1,1,1,1,1,1>, <1,1,1,1,1,1,2>, <1,1,1,1,1,1,3>, <1,1,1,2,2,2,1>, <1,1,1,2,2,2,2>, <1,1,1,2,2,2,3>, <1,1,1,3,3,3,1>, <1,1,1,3,3,3,2>, and <1,1,1,3,3,3,3>. - Dennis P. Walsh, Sep 06 2018

MAPLE

seq(3^floor(n/3), n=0..45); # Dennis P. Walsh, Sep 06 2018

MATHEMATICA

CoefficientList[Series[(1+x+x^2)/(1-3*x^3), {x, 0, 50}], x] (* or *) Table[3^(Floor[n/3]), {n, 0, 50}] (* G. C. Greubel, Apr 30 2017 *)

PROG

(MAGMA) [3^(Floor(n/3)):n in [0..50]]; // Vincenzo Librandi, Sep 20 2011

(PARI) a(n)=3^(n\3) \\ Charles R Greathouse IV, Oct 03 2016

CROSSREFS

Cf. A108411, A111575.

Sequence in context: A132171 A304682 A217645 * A060828 A332337 A161808

Adjacent sequences:  A127972 A127973 A127974 * A127976 A127977 A127978

KEYWORD

nonn,easy

AUTHOR

Paul Barry, Feb 09 2007

EXTENSIONS

Edited and corrected by R. J. Mathar, Jun 14 2008

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 25 11:18 EST 2020. Contains 338623 sequences. (Running on oeis4.)