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!)
A303611 a(n) = (-1 - (-2)^(n-2)) mod 2^n. 0
2, 1, 11, 7, 47, 31, 191, 127, 767, 511, 3071, 2047, 12287, 8191, 49151, 32767, 196607, 131071, 786431, 524287, 3145727, 2097151, 12582911, 8388607, 50331647, 33554431, 201326591, 134217727, 805306367, 536870911, 3221225471, 2147483647, 12884901887, 8589934591 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
A198693 and A083420 interleaved. From 11 onwards, apparently A283651 and A290195 contain the same terms. - Bruno Berselli, May 07 2018
LINKS
Olivier Rozier, Parity sequences of the 3x+1 map on the 2-adic integers and Euclidean embedding, arXiv:1805.00133v1 [math.DS], 2018, see Definition 4.4 on p. 21.
FORMULA
a(n) = 2^(n-2) - 1 for odd n, otherwise a(n) = 3*2^(n-2) - 1, with n>1.
From Bruno Berselli, May 07 2018: (Start)
O.g.f.: x^2*(2 - x + 2*x^2)/((1 - x)*(1 - 2*x)*(1 + 2*x)).
E.g.f.: (1 + 2*x - 4*exp(x) + exp(-2*x) + 2*exp(2*x))/4.
a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3).
a(n) = (2 + (-1)^n)*2^(n-2) - 1. (End)
MATHEMATICA
Table[If[OddQ[n], 2^(n - 2) - 1, 3 2^(n - 2) - 1], {n, 2, 80}]
LinearRecurrence[{1, 4, -4}, {2, 1, 11}, 30]
PROG
(Magma) [IsOdd(n) select 2^(n-2)-1 else 3*2^(n-2)-1: n in [2..40]];
(Magma) I:=[2, 1, 11]; [n le 3 select I[n] else Self(n-1)+4*Self(n-2)-4*Self(n-3): n in [1..35]];
(PARI) a(n) = a(n) = if (n%2, 2^(n-2) - 1, 3*2^(n-2) - 1); \\ Michel Marcus, May 30 2018
CROSSREFS
All terms belong to A052955 and A180516.
Sequence in context: A306547 A143888 A016546 * A356446 A141504 A141482
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, May 07 2018
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 25 10:51 EDT 2024. Contains 371967 sequences. (Running on oeis4.)