A089498 Duplicate of A046729.
0, 4, 20, 120, 696, 4060, 23660, 137904, 803760, 4684660, 27304196, 159140520
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.
G.f. = 1 + 7*x + 41*x^2 + 239*x^3 + 1393*x^4 + 8119*x^5 + 17321*x^6 + ... - _Michael Somos_, Jun 26 2022
a002315 n = a002315_list !! n a002315_list = 1 : 7 : zipWith (-) (map (* 6) (tail a002315_list)) a002315_list -- Reinhard Zumkeller, Jan 10 2012
I:=[1,7]; [n le 2 select I[n] else 6*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Mar 22 2015
A002315 := proc(n) option remember; if n = 0 then 1 ; elif n = 1 then 7; else 6*procname(n-1)-procname(n-2) ; end if; end proc: # Zerinvary Lajos, Jul 26 2006, modified R. J. Mathar, Apr 30 2017 a:=n->abs(Im(simplify(ChebyshevT(2*n+1,I)))):seq(a(n),n=0..20); # Leonid Bedratyuk, Dec 17 2017 # third Maple program: a:= n-> (<<0|1>, <-1|6>>^n. <<1, 7>>)[1, 1]: seq(a(n), n=0..22); # Alois P. Heinz, Aug 25 2024
a[0] = 1; a[1] = 7; a[n_] := a[n] = 6a[n - 1] - a[n - 2]; Table[ a[n], {n, 0, 20}] (* Robert G. Wilson v, Jun 09 2004 *) Transpose[NestList[Flatten[{Rest[#],ListCorrelate[{-1,6},#]}]&, {1,7},20]][[1]] (* Harvey P. Dale, Mar 23 2011 *) Table[ If[n>0, a=b; b=c; c=6b-a, b=-1; c=1], {n, 0, 20}] (* Jean-François Alcover, Oct 19 2012 *) LinearRecurrence[{6, -1}, {1, 7}, 20] (* Bruno Berselli, Apr 03 2018 *) a[ n_] := -I*(-1)^n*ChebyshevT[2*n + 1, I]; (* Michael Somos, Jun 26 2022 *)
{a(n) = subst(poltchebi(abs(n+1)) - poltchebi(abs(n)), x, 3)/2};
{a(n) = if(n<0, -a(-1-n), polsym(x^2-2*x-1, 2*n+1)[2*n+2]/2)};
{a(n) = my(w=3+quadgen(32)); imag((1+w)*w^n)};
for (i=1,10000,if(Mod(sigma(i^2+1,2),2)==1,print1(i,",")))
{a(n) = -I*(-1)^n*polchebyshev(2*n+1, 1, I)}; /* Michael Somos, Jun 26 2022 */
99^2 + 99^2 = 140^2 + 2. - _Carmine Suriano_, Jan 05 2015 G.f. = 1 + 3*x + 17*x^2 + 99*x^3 + 577*x^4 + 3363*x^5 + 19601*x^6 + 114243*x^7 + ...
a001541 n = a001541_list !! (n-1) a001541_list = 1 : 3 : zipWith (-) (map (* 6) $ tail a001541_list) a001541_list -- Reinhard Zumkeller, Oct 06 2011 (Scheme, with memoization-macro definec) (definec (A001541 n) (cond ((zero? n) 1) ((= 1 n) 3) (else (- (* 6 (A001541 (- n 1))) (A001541 (- n 2)))))) ;; Antti Karttunen, Oct 04 2016
[n: n in [1..10000000] |IsSquare(8*(n^2-1))]; // Vincenzo Librandi, Nov 18 2010
a[0]:=1: a[1]:=3: for n from 2 to 26 do a[n]:=6*a[n-1]-a[n-2] od: seq(a[n], n=0..20); # Zerinvary Lajos, Jul 26 2006 A001541:=-(-1+3*z)/(1-6*z+z**2); # Simon Plouffe in his 1992 dissertation
Table[Simplify[(1/2) (3 + 2 Sqrt[2])^n + (1/2) (3 - 2 Sqrt[2])^n], {n, 0, 20}] (* Artur Jasinski, Feb 10 2010 *) a[ n_] := If[n == 0, 1, With[{m = Abs @ n}, m Sum[4^i Binomial[m + i, 2 i]/(m + i), {i, 0, m}]]]; (* Michael Somos, Jul 11 2011 *) a[ n_] := ChebyshevT[ n, 3]; (* Michael Somos, Jul 11 2011 *) LinearRecurrence[{6, -1}, {1, 3}, 50] (* Vladimir Joseph Stephan Orlovsky, Feb 12 2012 *)
{a(n) = real((3 + quadgen(32))^n)}; /* Michael Somos, Apr 07 2003 */
{a(n) = subst( poltchebi( abs(n)), x, 3)}; /* Michael Somos, Apr 07 2003 */
{a(n) = if( n<0, a(-n), polsym(1 - 6*x + x^2, n) [n+1] / 2)}; /* Michael Somos, Apr 07 2003 */
{a(n) = polchebyshev( n, 1, 3)}; /* Michael Somos, Jul 11 2011 */
a(n)=([1,2,2;2,1,2;2,2,3]^n)[3,3] \\ Vim Wenders, Mar 28 2007
List([0..20], n-> (Lucas(2,-1, 4*n+2)[2] -6)/32 ); # G. C. Greubel, Jan 13 2020
a029549 n = a029549_list !! n a029549_list = [0,6,210] ++ zipWith (+) a029549_list (map (* 35) $ tail delta) where delta = zipWith (-) (tail a029549_list) a029549_list -- Reinhard Zumkeller, Sep 19 2011
(makelist(binom(n,2),n,1,999999),intersection(%%,2*%%)) /* Bill Gosper, Feb 07 2010 */
R:=PowerSeriesRing(Integers(), 25); [0] cat Coefficients(R!(6/(1-35*x+35*x^2-x^3))); // G. C. Greubel, Jul 15 2018
A029549 := proc(n) option remember; if n <= 1 then op(n+1,[0,6]) ; else 34*procname(n-1)-procname(n-2)+6 ; end if; end proc: # R. J. Mathar, Feb 05 2016
Table[Floor[(Sqrt[2] + 1)^(4n + 2)/32], {n, 0, 20} ] (* Original program from author, corrected by Ray Chandler, Jul 09 2015 *) CoefficientList[Series[6/(1 - 35x + 35x^2 - x^3), {x, 0, 14}], x] Intersection[#, 2#] &@ Table[Binomial[n, 2], {n, 999999}] (* Bill Gosper, Feb 07 2010 *) LinearRecurrence[{35, -35, 1}, {0, 6, 210}, 20] (* Harvey P. Dale, Jun 06 2011 *) (LucasL[4Range[20] - 2, 2] -6)/32 (* G. C. Greubel, Jan 13 2020 *)
concat(0,Vec(6/(1-35*x+35*x^2-x^3)+O(x^25))) \\ Charles R Greathouse IV, Jun 13 2013
[(lucas_number2(4*n+2, 2, -1) -6)/32 for n in (0..20)] # G. C. Greubel, Jan 13 2020
val triNums = (0 to 39999).map(n => (n * n + n)/2) triNums.filter( % 2 == 0).filter(n => (triNums.contains(n/2))) // _Alonso del Arte, Jan 12 2020
For n=4: a(4)=697; b(4)=493; 2*binomial(493,2)=485112=binomial(697,2). - _Paul Weisenhorn_, Aug 03 2010
a046090 n = a046090_list !! n a046090_list = 1 : 4 : map (subtract 2) (zipWith (-) (map (* 6) (tail a046090_list)) a046090_list) -- Reinhard Zumkeller, Jan 10 2012
m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-3*x)/((1-6*x+x^2)*(1-x)))); // G. C. Greubel, Jul 15 2018
Digits:=100: seq(round((1+(7+5*sqrt(2))*(3+2*sqrt(2))^(n-1))/2)/2, n=0..20); # Paul Weisenhorn, Aug 03 2010
Join[{1},#+1&/@With[{c=3+2Sqrt[2]},NestList[Floor[c #]+3&,3,20]]] (* Harvey P. Dale, Aug 19 2011 *) LinearRecurrence[{7,-7,1},{1,4,21},25] (* Harvey P. Dale, Apr 13 2012 *) a[n_] := (2-ChebyshevT[n, 3]+ChebyshevT[n+1, 3])/4; Array[a, 21, 0] (* Jean-François Alcover, Jul 10 2016, adapted from PARI *)
a(n)=(2-subst(poltchebi(abs(n))-poltchebi(abs(n+1)),x,3))/4
x='x+O('x^30); Vec((1-3*x)/((1-6*x+x^2)*(1-x))) \\ G. C. Greubel, Jul 15 2018
CoefficientList[ Series[ 3x/(1 - 35 x + 35 x^2 - x^3), {x, 0, 15}], x] (* Robert G. Wilson v, Jun 24 2011 *)
concat(0, Vec(3*x/((1-x)*(1-34*x+x^2)) + O(x^20))) \\ Colin Barker, Jun 18 2015
G.f. = 4*x + 24*x^2 + 140*x^3 + 816*x^4 + 4756*x^5 + ... - _Michael Somos_, Jun 26 2022
a:=[0,4]; [n le 2 select a[n] else 6*Self(n-1) - Self(n-2):n in [1..22]]; // Marius A. Burtea, Sep 19 2019
LinearRecurrence[{6, -1}, {0, 4}, 22] (* Jean-François Alcover, Sep 26 2017 *) Table[((3 + 2 Sqrt[2])^n - (3 - 2 Sqrt[2])^n)/Sqrt[2], {n, 20}] // Expand (* Eric W. Weisstein, Jun 08 2019 *) CoefficientList[Series[(4 x)/(1 - 6 x + x^2), {x, 0, 20}], x] (* Eric W. Weisstein, Jun 08 2019 *) a[ n_] := 4*ChebyshevU[n-1, 3]; (* Michael Somos, Jun 26 2022 *)
{a(n) = 4*polchebyshev(n-1, 2, 3)}; /* Michael Somos, Jun 26 2022 */
[Floor(((Sqrt(2)+1)^(2*n+1)-(Sqrt(2)-1)^(2*n+1)-2*(-1)^n)/16): n in [0..35]]; // Vincenzo Librandi, Jul 05 2011
with(combinat): a:=n->fibonacci(n,2)*fibonacci(n-1,2)/2: seq(a(n), n=1..22); # Zerinvary Lajos, Apr 04 2008
LinearRecurrence[{5,5,-1},{0,1,5},30] (* Harvey P. Dale, Sep 07 2011 *)
Pell(n)=([2, 1; 1, 0]^n)[2, 1]; a(n)=Pell(n)*Pell(n+1)/2 \\ Charles R Greathouse IV, Mar 21 2016
a(n)=([0,1,0; 0,0,1; -1,5,5]^n*[0;1;5])[1,1] \\ Charles R Greathouse IV, Mar 21 2016
[(lucas_number2(2*n+1,2,-1) -2*(-1)^n)/16 for n in (0..30)] # G. C. Greubel, Aug 18 2022
The first rows are: 4 12, 20, 8 24, 48, 28, 80, 120, 36, 56, 72, 12
M = [[1, -2, 2; 2, -1, 2; 2, -2, 3], [1, 2, 2; 2, 1, 2; 2, 2, 3], [-1, 2, 2; -2, 1, 2; -2, 2, 3]]; T(n, k) = my (t=[3; 4; 5], d=digits(3^(n-1)+k-1, 3)); for (i=2, #d, t = M[d[i]+1] * t); return (t[2, 1])
a046727 n = a046727_list !! n a046727_list = 0 : f (tail a001652_list) (tail a046090_list) where f (x::xs) (:y:ys) = x : y : f xs ys -- Reinhard Zumkeller, Jan 10 2012
I:=[0,3,21,119]; [n le 4 select I[n] else 5*Self(n-1)+5*Self(n-2)-Self(n-3): n in [1..30]]; // Vincenzo Librandi, Nov 04 2016
RecurrenceTable[{a[n+2]==6a[n+1] -a[n] -4*(-1)^n, a[0]==3, a[1]==21}, a, {n, 30}] (* Ron Knott, Jul 01 2013 *) LinearRecurrence[{5,5,-1}, {0,3,21,119}, 30] (* Vincenzo Librandi, Nov 04 2016 *)
concat(0, Vec(x*(3+6*x-x^2)/((1+x)*(1-6*x+x^2)) + O(x^30))) \\ Colin Barker, Nov 03 2016
[(lucas_number2(2*n+1,2,-1) +2*(-1)^n)/4 -int(n==0) for n in range(41)] # G. C. Greubel, Feb 11 2023
Comments