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!)
A236313 Recurrence: a(2n) = 3a(n)-1, a(2n+1) = 1. 5
1, 2, 1, 5, 1, 2, 1, 14, 1, 2, 1, 5, 1, 2, 1, 41, 1, 2, 1, 5, 1, 2, 1, 14, 1, 2, 1, 5, 1, 2, 1, 122, 1, 2, 1, 5, 1, 2, 1, 14, 1, 2, 1, 5, 1, 2, 1, 41, 1, 2, 1, 5, 1, 2, 1, 14, 1, 2, 1, 5, 1, 2, 1, 365, 1, 2, 1, 5, 1, 2, 1, 14, 1, 2, 1, 5, 1, 2, 1, 41, 1, 2, 1, 5, 1, 2, 1, 14, 1, 2, 1, 5, 1, 2, 1, 122, 1, 2, 1, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
First differences of Stanley sequence S(0,1) (A005836) and S(1,2) (A003278).
In the binary expansion of n, delete everything left of the rightmost 1 bit, then interpret as ternary, add one, and divide by 2.
A007051 is this sequence in strictly increasing order. - Max Barrentine, Sep 11 2015
Empirical: a(n) is the smallest natural number k such that no two adjacent subsequences t and u consisting of consecutive entries of (a(1), a(2), ..., a(n-1), k) are such that the sum of the entries of t is equal to the sum of the entries of u. For example, according to this definition, a(4) cannot be equal to 1, 2, 3, or 4. - John M. Campbell, Mar 20 2017
LINKS
FORMULA
a(n) = (1/2)*(1 + 3^A007814(n)) = A007051(A007814(n)).
a(n) = (1/2)*A061393(n), for n>=1.
Multiplicative with a(2^e) = (1 + 3^e)/2, a(p^e) = 1 for odd prime p. - Andrew Howroyd, Jul 31 2018
G.f.: Sum_{k>=0} 3^k * x^(2^k) / (1 + x^(2^k)). - Ilya Gutkovskiy, Dec 14 2020
Dirichlet g.f.: zeta(s)*(2^s-2)/(2^s-3). - Amiram Eldar, Dec 29 2022
MATHEMATICA
t = {1}; Do[If[OddQ[n], AppendTo[t, 1], AppendTo[t, 3*t[[n/2]] - 1]], {n, 2, 100}]; t (* T. D. Noe, Apr 10 2014 *)
a[n_] := a[n] =If[OddQ@ n, 1, 3 a[n/2] - 1]; Array[a, 92] (* Robert G. Wilson v, Jul 31 2018 *)
PROG
(PARI) a(n)=(1+3^valuation(n, 2))/2
(Magma) [(1+3^Valuation(n, 2))/2: n in [1..100]]; // Bruno Berselli, Jan 22 2014
CROSSREFS
Sequence in context: A246964 A157334 A320667 * A222481 A351954 A353577
KEYWORD
nonn,mult
AUTHOR
Ralf Stephan, Jan 22 2014
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 April 12 07:56 EDT 2024. Contains 371626 sequences. (Running on oeis4.)