cp's OEIS Frontend

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.

User: Jamel Ghanouchi

Jamel Ghanouchi's wiki page.

Jamel Ghanouchi has authored 12 sequences. Here are the ten most recent ones:

A245906 Numbers of the form 4n^2 + 1 or 4n^2 + 8n + 1.

Original entry on oeis.org

5, 13, 17, 33, 37, 61, 65, 97, 101, 141, 145, 193, 197, 253, 257, 321, 325, 397, 401, 481, 485, 573, 577, 673, 677, 781, 785, 897, 901, 1021, 1025, 1153, 1157, 1293, 1297, 1441, 1445, 1597, 1601, 1761, 1765, 1933, 1937, 2113, 2117, 2301, 2305, 2497, 2501, 2701
Offset: 1

Author

Jamel Ghanouchi, Nov 13 2014

Keywords

Programs

  • Magma
    [IsEven(n) select n^2+4*n+1 else (n+1)^2+1: n in [1..50]]; // Bruno Berselli, Dec 02 2014
  • Mathematica
    fn[n_]:=Module[{c=4n^2+1},{c,c+8n}]; Flatten[Array[fn,30]] (* or *) LinearRecurrence[{1,2,-2,-1,1},{5,13,17,33,37},60] (* Harvey P. Dale, May 21 2015 *)
  • PARI
    list(lim)=Set(concat(vector(sqrtint((lim-1)\4),n,4*n^2+1), vector(sqrtint(lim\1+3)\2-1,n,4*n^2+8*n+1))) \\ Charles R Greathouse IV, Nov 13 2014
    
  • PARI
    a(n)=if(n%2,(n+1)^2+1,n^2+4*n+1) \\ Charles R Greathouse IV, Nov 20 2014
    

Formula

a(n) = n^2 + O(n). - Charles R Greathouse IV, Nov 20 2014
G.f.: x*(5+8*x-6*x^2+x^4)/((1+x)^2*(1-x)^3). [Bruno Berselli, Dec 02 2014]
a(n) = (2*n*(n+5)-(2n+1)*(-1)^n+11)/2. [Bruno Berselli, Dec 02 2014]

Extensions

Extended by Charles R Greathouse IV, Nov 13 2014

A181355 a(3*n+1) = 4^(2^n), a(3*n+2) = 3^(2^n), a(3*n+3) = 4^(2^n) - 3^(2^n).

Original entry on oeis.org

4, 3, 1, 16, 9, 7, 256, 81, 175, 65536, 6561, 58975, 4294967296, 43046721, 4251920575, 18446744073709551616, 1853020188851841, 18444891053520699775, 340282366920938463463374607431768211456, 3433683820292512484657849089281
Offset: 1

Author

Jamel Ghanouchi, Jan 27 2011

Keywords

Comments

Previous name was: Consider pairs of fractions (x,y) starting (4,3) and updated via z:=1/(1/x+1/y), x->x-z, y->y-z. The sequence shows the triples (numerator(x), numerator(y), numerator(x)-numerator(y)) after each update.

Examples

			(x=4,y=3) is shown as the first triple (4,3,1) in the sequence. This generates z=12/7 which generates the new pair (x,y) = (16/7,9/7) shown as (16,9,7). - _R. J. Mathar_, Feb 09 2011
		

Programs

  • Maple
    x := 4 ; y := 3 ;
    for loo from 1 to 7 do printf("%d, %d, %d, ", numer(x), numer(y), numer(x)-numer(y)) ; z := 1/(1/x+1/y) ; x := x-z ; y := y-z ; end do: # R. J. Mathar, Feb 09 2011

Formula

a(3*n+1) = 4^(2^n), a(3*n+2) = 3^(2^n), a(3*n+3) = 4^(2^n) - 3^(2^n). - Philippe Deléham , Oct 29 2013

Extensions

Corrected by Philippe Deléham, Oct 29 2013
New name using Philippe Deléham's formula, Joerg Arndt, Nov 14 2014

A167541 a(n) = -(n - 4)*(n - 5)*(n - 12)/6.

Original entry on oeis.org

2, 5, 8, 10, 10, 7, 0, -12, -30, -55, -88, -130, -182, -245, -320, -408, -510, -627, -760, -910, -1078, -1265, -1472, -1700, -1950, -2223, -2520, -2842, -3190, -3565, -3968, -4400, -4862, -5355, -5880, -6438, -7030, -7657, -8320, -9020, -9758, -10535, -11352
Offset: 6

Author

Jamel Ghanouchi, Nov 06 2009

Keywords

Comments

Essentially the same as A111396.
The coefficient of x^(n-6) of the Polynomial B_n(x) defined in A135929.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{4,-6,4,-1},{2,5,8,10},50] (* Harvey P. Dale, May 27 2012 *)

Formula

a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
G.f.: x^6*(2 - 3*x)/(x - 1)^4.
a(n) = -A111396(n-12) for n > 11. - Bruno Berselli, Oct 02 2018

Extensions

Minor edits by N. J. A. Sloane, Nov 09 2009
Definition simplified, sequence extended by R. J. Mathar, Nov 12 2009

A167543 a(n) = (n-5)*(n-6)*(n-7)*(n-16)/24.

Original entry on oeis.org

-2, -7, -15, -25, -35, -42, -42, -30, 0, 55, 143, 273, 455, 700, 1020, 1428, 1938, 2565, 3325, 4235, 5313, 6578, 8050, 9750, 11700, 13923, 16443, 19285, 22475, 26040, 30008, 34408, 39270, 44625, 50505, 56943, 63973, 71630, 79950, 88970, 98728, 109263, 120615
Offset: 8

Author

Jamel Ghanouchi, Nov 06 2009

Keywords

Crossrefs

Programs

  • Magma
    [Binomial(n-5,3)*(n-16)/4: n in [8..60]]; // G. C. Greubel, Jul 30 2022
    
  • Mathematica
    Table[(n-5)*(n-6)*(n-7)*(n-16)/24, {n,8,60}] (* G. C. Greubel, Jun 15 2016 *)
  • SageMath
    [binomial(n-5,3)*(n-16)/4 for n in (8..60)] # G. C. Greubel, Jul 30 2022

Formula

a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
G.f.: x^8*(-2+3*x)/(1-x)^5.
E.g.f.: (1/24)*( -3360 - 1800*x - 420*x^2 - 52*x^3 - 3*x^4 + (3360 - 1560*x + 300*x^2 - 28*x^3 + x^4)*exp(x) ). - G. C. Greubel, Jul 30 2022

Extensions

Definition simplified, sequence extended by R. J. Mathar, Nov 12 2009

A167375 a(n)=3*a(n-1)-a(n-2) with a(0)=1, a(1)=3, a(2)=11.

Original entry on oeis.org

1, 3, 11, 30, 79, 207, 542, 1419, 3715, 9726, 25463, 66663, 174526, 456915, 1196219, 3131742, 8199007, 21465279, 56196830, 147125211, 385178803, 1008411198, 2640054791, 6911753175, 18095204734, 47373861027, 124026378347, 324705274014, 850089443695
Offset: 0

Author

Jamel Ghanouchi, Nov 02 2009

Keywords

Crossrefs

Programs

  • Magma
    I:=[1,3,11]; [n le 3 select I[n] else 3*Self(n-1)-Self(n-2): n in [1..50]]; // Vincenzo Librandi, Jun 26 2014
  • Mathematica
    Join[{1},LinearRecurrence[{3,-1},{3,11},30]] (* Harvey P. Dale, Jun 25 2014 *)
    CoefficientList[Series[(3 x^2 + 1)/(1 - 3 x + x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 26 2014 *)
    Table[3LucasL[2n+1]-Fibonacci[2n], {n,0,20}] (* Rigoberto Florez, Dec 24 2018 *)

Formula

a(n) = (-1)^n*A098150(n-1), n>0.
G.f.: (3*x^2+1)/(1-3*x+x^2).
a(n) = 3*L(2n+1)-F(2n), where F(n) is the n-th Fibonacci number and L(n) is the n-th Lucas number. - Rigoberto Florez, Dec 24 2018

Extensions

Edited by R. J. Mathar, Nov 03 2009

A167536 a(n) = 3^(2^n) - 2^(2^n).

Original entry on oeis.org

1, 5, 65, 6305, 42981185, 1853015893884545, 3433683820274065740584139537665, 11790184577738583171520532579045597727214748217668409340885505
Offset: 0

Author

Jamel Ghanouchi, Nov 06 2009

Keywords

Crossrefs

Cf. A118004.

Programs

Formula

a(n)= A001047(2^n).

Extensions

Edited by R. J. Mathar, Nov 11 2009
Offset changed from 1 to 0 from Vincenzo Librandi, Jun 15 2016

A167373 Expansion of (1+x)*(3*x+1)/(1+x+x^2).

Original entry on oeis.org

1, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1, -2, 3, -1
Offset: 0

Author

Jamel Ghanouchi, Nov 02 2009

Keywords

Comments

Bisection of A138034.
Also row 2n of A137276 or A135929.

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972, Chapter 22.

Crossrefs

Programs

  • Maple
    A167373 := proc(n)
        option remember;
        if n < 4 then
            op(n+1,[1,3,-1,-2]) ;
        else
            procname(n-3) ;
        end if;
    end proc:
    seq(A167373(n),n=0..20) ; # R. J. Mathar, Feb 06 2020
  • Mathematica
    CoefficientList[Series[(1 + x)*(3*x + 1)/(1 + x + x^2), {x, 0, 50}], x] (* G. C. Greubel, Jun 12 2016 *)
    LinearRecurrence[{-1,-1},{1,3,-1},120] (* Harvey P. Dale, Apr 05 2023 *)

Formula

G.f.: (1+x)*(3*x+1)/(1+x+x^2).
a(n) = a(n-3), n>4.
a(n) = - a(n-1) - a(n-2) for n>2.
a(n) = 4*sin(2*n*Pi/3)/sqrt(3)-2*cos(2*n*Pi/3) for n>0 with a(0)=1. - Wesley Ivan Hurt, Jun 12 2016

Extensions

Edited by R. J. Mathar, Nov 03 2009
Further edited and extended by Simon Plouffe, Nov 23 2009
Recomputed by N. J. A. Sloane, Dec 20 2009

A167380 a(1)=1, a(2)=2, and continued periodically with 4, 5, 1, -4, -5, -1 .

Original entry on oeis.org

1, 2, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5, -1, 4, 5, 1, -4, -5
Offset: 1

Author

Jamel Ghanouchi, Nov 02 2009

Keywords

Programs

  • Maple
    A167380 := proc(n) if n <= 2 then n; else op(1+ (n mod 6),[-4,-5,-1,4,5,1]) ; end if; end proc: seq(A167380(n),n=1..120) ; # R. J. Mathar, Nov 02 2009
  • Mathematica
    PadRight[{1,2},120,{-5,-1,4,5,1,-4}] (* or *) Join[{1,2},LinearRecurrence[ {1,-1},{4,5},120]] (* Harvey P. Dale, Mar 08 2015 *)

Formula

a(1)=1. a(2)=2. a(6k-3)=4. a(6k-2)=5. a(6k-1)=1. a(6k)=-4. a(6k+1)=-5. a(6k+2)=-1.
From R. J. Mathar, Nov 03 2009: (Start)
a(n) = a(n-1) - a(n-2), n > 4.
G.f.: x*(1+x)*(3*x^2+1)/(1-x+x^2). (End)

Extensions

Unrelated material removed, and values corrected according to definition, by R. J. Mathar, Nov 05 2009

A167386 a(n) = (-1)^n*n*(n+1)*(2*n-5)/6.

Original entry on oeis.org

1, -1, -2, 10, -25, 49, -84, 132, -195, 275, -374, 494, -637, 805, -1000, 1224, -1479, 1767, -2090, 2450, -2849, 3289, -3772, 4300, -4875, 5499, -6174, 6902, -7685, 8525, -9424, 10384, -11407, 12495, -13650, 14874, -16169, 17537, -18980, 20500, -22099, 23779
Offset: 1

Author

Jamel Ghanouchi, Nov 02 2009

Keywords

Programs

Formula

a(n) = -4*a(n-1) - 6*a(n-2) - 4*a(n-3) - a(n-4).
G.f.: x*(1+3*x)/(1+x)^4.

Extensions

Note that for a sequence in which every other term is zero, the OEIS policy is to omit those zeros. - N. J. A. Sloane, Nov 08 2009
Zeros removed by skipping even-indexed polynomials - R. J. Mathar, Nov 12 2009

A167387 a(n) = (-1)^(n+1) * n*(n-1)*(n-4)*(n+1)/12.

Original entry on oeis.org

1, -2, 0, 10, -35, 84, -168, 300, -495, 770, -1144, 1638, -2275, 3080, -4080, 5304, -6783, 8550, -10640, 13090, -15939, 19228, -23000, 27300, -32175, 37674, -43848, 50750, -58435, 66960, -76384, 86768, -98175, 110670, -124320, 139194, -155363, 172900
Offset: 2

Author

Jamel Ghanouchi, Nov 02 2009

Keywords

Comments

The coefficient of [x^4] of the Polynomial B_{2n}(x) defined in A137276.
Essentially the same as A052472.

Crossrefs

Programs

  • GAP
    List([2..40], n-> (-1)^(n+1)*(n-4)*Binomial(n+1,3)/2); # G. C. Greubel, May 19 2019
  • Magma
    [(-1)^(n+1)*n*(n-1)*(n-4)*(n+1)/12: n in [2..40]]; // Vincenzo Librandi, Jun 13 2016
    
  • Mathematica
    Table[(-1)^(n+1)*(n+1)*n*(n-1)*(n-4)/12, {n, 2, 40}] (* G. C. Greubel, Jun 12 2016 *)
    LinearRecurrence[{-5, -10, -10, -5, -1}, {1, -2, 0, 10, -35}, 40] (* Vincenzo Librandi, Jun 13 2016 *)
  • PARI
    vector(40, n, n++; (-1)^(n+1)*(n-4)*binomial(n+1,3)/2) \\ G. C. Greubel, May 19 2019
    
  • Sage
    [(-1)^(n+1)*(n-4)*binomial(n+1,3)/2 for n in (2..40)] # G. C. Greubel, May 19 2019
    

Formula

a(n) = -5*a(n-1) -10*a(n-2) -10*a(n-3) -5*a(n-4) -a(n-5).
G.f.: x^2*(1+3*x)/(1+x)^5.
E.g.f.: x^2*(6 + 2*x - x^2)*exp(-x)/12. - G. C. Greubel, May 19 2019