A099018 Duplicate of A033484.
1, 4, 10, 22, 46, 94, 190, 382, 766, 1534, 3070, 6142, 12286, 24574, 49150, 98302, 196606, 393214, 786430, 1572862, 3145726, 6291454, 12582910, 25165822
Offset: 0
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
a(4) = 14 because the 14 = 6 + 4 + 4 rationals (in lowest terms) for n = 3 are (see the Jun 14 2017 formula above): 1/2, 1, 3/2, 2, 5/2, 3; 1/4, 3/4, 5/4, 7/4; 1/8, 3/8, 5/8, 7/8. - _Wolfdieter Lang_, Jun 14 2017
a000918 = (subtract 2) . (2 ^) a000918_list = iterate ((subtract 2) . (* 2) . (+ 2)) (- 1) -- Reinhard Zumkeller, Apr 23 2013
[2^n - 2: n in [0..40]]; // Vincenzo Librandi, Jun 23 2011
seq(2^n-2,n=0..20) ;
Table[2^n - 2, {n, 0, 29}] (* Alonso del Arte, Dec 01 2012 *)
a(n)=2^n-2 \\ Charles R Greathouse IV, Jun 16 2011
def A000918(n): return (1<Chai Wah Wu, Jun 10 2025
After 3 folds one sees 4 fold lines. Example: a(3) = 6 because the strings 001, 010, 100, 011, 101, 110 have the property. Binary: 1, 10, 100, 110, 1010, 1110, 10110, 11110, 101110, 111110, 1011110, 1111110, 10111110, 11111110, 101111110, 111111110, 1011111110, 1111111110, 10111111110, ... - _Jason Kimberley_, Nov 02 2011 Example: Partial sums of powers of 2 repeated 2 times: a(3) = 1+1+2 = 4; a(4) = 1+1+2+2 = 6; a(5) = 1+1+2+2+4 = 10. _Yuchun Ji_, Nov 16 2018
import Data.List (transpose) a027383 n = a027383_list !! n a027383_list = concat $ transpose [a033484_list, drop 2 a000918_list] -- Reinhard Zumkeller, Jun 17 2015
[2^Floor((n+2)/2)+2^Floor((n+1)/2)-2: n in [0..50]]; // Vincenzo Librandi, Aug 16 2011
a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=2*a[n-2]+2 od: seq(a[n], n=1..41); # Zerinvary Lajos, Mar 16 2008
a[n_?EvenQ] := 3*2^(n/2)-2; a[n_?OddQ] := 2^(2+(n-1)/2)-2; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Oct 21 2011, after Quim Castellsaguer *) LinearRecurrence[{1, 2, -2}, {1, 2, 4}, 41] (* Robert G. Wilson v, Oct 06 2014 *) Table[Length[Select[Tuples[{0,1},n],And[Max@@Length/@Split[#]<=2,!MatchQ[Length/@Split[#],{_,2,ins:1..,2,_}/;OddQ[Plus[ins]]]]&]],{n,0,15}] (* Gus Wiseman, Nov 28 2019 *)
a(n)=2^(n\2+1)+2^((n+1)\2)-2 \\ Charles R Greathouse IV, Oct 21 2011
def a(n): return 2**((n+2)//2) + 2**((n+1)//2) - 2 print([a(n) for n in range(43)]) # Michael S. Branicky, Feb 19 2022
a(3) = 3*2^2 - 1 = 3*4 - 1 = 11.
Concatenation([0], List([1..35], n-> 3*2^(n-1)-1)); # G. C. Greubel, May 06 2019
[Floor(3*2^(n-1) - 1): n in [0..35]]; // Vincenzo Librandi, May 18 2011
Join[{0},3*2^Range[0,34]-1] (* Harvey P. Dale, May 05 2013 *)
a(n)=3*2^n\2 - 1 \\ Charles R Greathouse IV, Apr 08 2016
[0]+[3*2^(n-1)-1 for n in (1..35)] # G. C. Greubel, May 06 2019
[3*2^n+0^n-3 : n in [0..30]]; // Vincenzo Librandi, Nov 11 2011
Join[{1}, LinearRecurrence[{3, -2}, {3, 9}, 30]] (* Jean-François Alcover, Jan 08 2019 *) CoefficientList[Series[(1+2x^2)/((1-2x)(1-x)),{x,0,40}],x] (* Harvey P. Dale, Jan 02 2022 *)
def a(n): return 3*2**n+0**n-3 # Torlach Rush, Jan 09 2025
Triangle starts 1; 1, 1; 1, 0, 1; 1, 1, -1, 1; 1, 0, 2, -2, 1; 1, 1, -2, 4, -3, 1; 1, 0, 3, -6, 7, -4, 1; Matrix log begins: 0; 1, 0; 1, 0, 0; 1, 1, -1, 0; 1, 1, 1, -2, 0; 1, 1, 1, 1, -3, 0; ... Production matrix begins 1, 1, 0, -1, 1, 0, 0, -1, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, -1, 1. - _Paul Barry_, Apr 08 2011
T:= function(n,k) if k=0 or k=n then return 1; else return T(n-1,k-1) - T(n-1,k); fi; end; Flat(List([0..12], n-> List([0..n], k-> T(n,k) ))); # G. C. Greubel, Nov 13 2019
a112468 n k = a112468_tabl !! n !! k a112468_row n = a112468_tabl !! n a112468_tabl = iterate (\xs -> zipWith (-) ([2] ++ xs) (xs ++ [0])) [1] -- Reinhard Zumkeller, Jan 03 2014
function T(n,k) if k eq 0 or k eq n then return 1; else return T(n-1,k-1) - T(n-1,k); end if; return T; end function; [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 13 2019
T := (n,k,m) -> (1-m)^(-n+k)-m^(k+1)*pochhammer(n-k,k+1)*hypergeom( [1,n+1],[k+2],m)/(k+1)!; A112468 := (n,k) -> T(n,n-k,-1); seq(print(seq(simplify(A112468(n,k)),k=0..n)),n=0..10); # Peter Luschny, Jul 25 2014
T[n_, 0] = 1; T[n_, n_] = 1; T[n_, k_ ]:= T[n, k] = T[n-1, k-1] - T[n-1, k]; Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* Jean-François Alcover, Mar 06 2013 *)
{T(n,k)=local(m=1,x=X+X*O(X^n),y=Y+Y*O(Y^k)); polcoeff(polcoeff((1+(m-1)*x)*(1+m*x)/(1+m*x-x*y)/(1-x),n,X),k,Y)} \\ Paul D. Hanna, Jan 20 2006
T(n,k) = if(k==0 || k==n, 1, T(n-1, k-1) - T(n-1, k)); \\ G. C. Greubel, Nov 13 2019
@CachedFunction def T(n, k): if (k<0 or n<0): return 0 elif (k==0 or k==n): return 1 else: return T(n-1, k-1) - T(n-1, k) [[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 13 2019
[3*2^n-1: n in [0..30]]; // Vincenzo Librandi, Oct 28 2011
Table[3*2^n - 1 , {n,0,25}] (* G. C. Greubel, Sep 01 2016 *) LinearRecurrence[{3,-2},{2,5},40] (* Harvey P. Dale, Mar 01 2024 *)
a(n)=3*2^n-1 \\ Charles R Greathouse IV, Sep 24 2015
List([0..30],n->3*(2^n-1)-2*n); # Muniru A Asiru, Oct 26 2018
a050488 n = sum $ zipWith (*) a000079_list (reverse $ take n a005408_list) -- Reinhard Zumkeller, Jul 24 2015
[3*(2^n-1) - 2*n: n in [0..30]]; // G. C. Greubel, Oct 23 2018
seq(coeff(series(x*(x+1)/((1-x)^2*(1-2*x)),x,n+1), x, n), n = 0 .. 30); # Muniru A Asiru, Oct 26 2018
Table[3(2^n-1)-2n,{n,0,30}] (* or *) LinearRecurrence[{4,-5,2}, {0,1,5}, 40] (* Harvey P. Dale, Apr 09 2018 *)
a(n)=3*(2^n-1)-2*n \\ Charles R Greathouse IV, Sep 24 2015
for n in range(0, 30): print(3*(2**n-1) - 2*n, end=', ') # Stefano Spezia, Oct 27 2018
I:=[1, 4, 8]; [n le 3 select I[n] else 3*Self(n-1)+Self(n-2)-6*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jul 21 2013
with(LinearAlgebra): nmax:=27; m:=5; A[5]:= [0,0,1,0,0,0,1,1,1]: A:=Matrix([[0,0,0,0,1,0,0,0,1], [0,0,0,1,0,1,0,0,0], [0,0,0,0,1,0,1,0,0], [0,1,0,0,0,0,0,1,0], A[5], [0,1,0,0,0,0,0,1,0], [0,0,1,0,1,0,0,0,0], [0,0,0,1,0,1,0,0,0], [1,0,0,0,1,0,0,0,0]]): for n from 0 to nmax do B(n):=A^n: a(n):= add(B(n)[m,k],k=1..9): od: seq(a(n), n=0..nmax);
CoefficientList[Series[(1 + x - 5 x^2) / (1 - 3 x - x^2 + 6 x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 21 2013 *) LinearRecurrence[{3,1,-6},{1,4,8},40] (* Harvey P. Dale, Dec 25 2024 *)
a(n)=([0,1,0; 0,0,1; -6,1,3]^n*[1;4;8])[1,1] \\ Charles R Greathouse IV, Oct 03 2016
List([0..40], n-> 3^n +n ); # G. C. Greubel, May 21 2019
[3^n +n: n in [0..40]]; // G. C. Greubel, May 21 2019
Table[3^n +n, {n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Jan 18 2009, modified by G. C. Greubel, May 21 2019 *) LinearRecurrence[{5,-7,3},{1,4,11},30] (* Harvey P. Dale, Aug 01 2020 *)
{a(n) = 3^n + n}; \\ G. C. Greubel, May 21 2019
[3^n +n for n in (0..40)] # G. C. Greubel, May 21 2019
Comments