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.

Showing 1-3 of 3 results.

A198392 a(n) = (6*n*(3*n+7)+(2*n+13)*(-1)^n+3)/16 + 1.

Original entry on oeis.org

2, 4, 12, 18, 31, 41, 59, 73, 96, 114, 142, 164, 197, 223, 261, 291, 334, 368, 416, 454, 507, 549, 607, 653, 716, 766, 834, 888, 961, 1019, 1097, 1159, 1242, 1308, 1396, 1466, 1559, 1633, 1731, 1809, 1912, 1994, 2102, 2188, 2301, 2391, 2509, 2603, 2726, 2824, 2952
Offset: 0

Views

Author

Bruno Berselli, Oct 25 2011

Keywords

Comments

For an origin of this sequence, see the triangular spiral illustrated in the Links section.
First bisection gives A117625 (without the initial term).

Crossrefs

Cf. A152832 (by Superseeker).
Cf. sequences related to the triangular spiral: A022266, A022267, A027468, A038764, A045946, A051682, A062708, A062725, A062728, A062741, A064225, A064226, A081266-A081268, A081270-A081272, A081275 [incomplete list].

Programs

  • Magma
    [(6*n*(3*n+7)+(2*n+13)*(-1)^n+3)/16+1: n in [0..50]];
  • Mathematica
    LinearRecurrence[{1,2,-2,-1,1},{2,4,12,18,31},60] (* Harvey P. Dale, Jun 15 2022 *)
  • PARI
    for(n=0, 50, print1((6*n*(3*n+7)+(2*n+13)*(-1)^n+3)/16+1", "));
    

Formula

G.f.: (2+2*x+4*x^2+2*x^3-x^4)/((1+x)^2*(1-x)^3).
a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5).
a(n)-a(-n-1) = A168329(n+1).
a(n)+a(n-1) = A102214(n).
a(2n)-a(2n-1) = A016885(n).
a(2n+1)-a(2n) = A016825(n).

A168326 a(n) = (6*n - 3*(-1)^n - 1)/2.

Original entry on oeis.org

4, 4, 10, 10, 16, 16, 22, 22, 28, 28, 34, 34, 40, 40, 46, 46, 52, 52, 58, 58, 64, 64, 70, 70, 76, 76, 82, 82, 88, 88, 94, 94, 100, 100, 106, 106, 112, 112, 118, 118, 124, 124, 130, 130, 136, 136, 142, 142, 148, 148, 154, 154, 160, 160, 166, 166, 172, 172, 178, 178
Offset: 1

Views

Author

Vincenzo Librandi, Nov 23 2009

Keywords

Crossrefs

Programs

  • Magma
    [n eq 1 select n+3 else 6*n-Self(n-1)-4: n in [1..70]]; // Vincenzo Librandi, Sep 17 2013
  • Mathematica
    With[{c = 6 Range[0, 30] + 4}, Riffle[c, c]] (* or *) RecurrenceTable[ {a[1] == 4, a[n] == 6 n - a[n-1] - 4}, a, {n, 60}] (* Harvey P. Dale, Jun 12 2012 *)
    Table[3 n - 3 (-1)^n/2 - 1/2, {n, 70}] (* Bruno Berselli, Sep 17 2013 *)
    CoefficientList[Series[(4 + 2 x^2) / ((1 + x) (1 - x)^2), {x, 0, 70}], x] (* Vincenzo Librandi, Sep 17 2013 *)

Formula

a(n) = 6*n - a(n-1) - 4, with n>1, a(1)=4.
From Vincenzo Librandi, Sep 17 2013: (Start)
G.f.: 2*x*(2 + x^2)/((1+x)*(1-x)^2).
a(n) = 2*A168236(n) = A168300(n) - 1 = A168329(n) + 1 = A168301(n+1) - 3.
a(n) = a(n-1) +a(n-2) -a(n-3). (End)
E.g.f.: (1/2)*(-3 + 4*exp(x) + (6*x - 1)*exp(2*x))*exp(-x). - G. C. Greubel, Jul 18 2016

Extensions

New definition by Bruno Berselli, Sep 17 2013

A293990 a(n) = (3*n + ((n-2) mod 4))/2.

Original entry on oeis.org

1, 3, 3, 5, 7, 9, 9, 11, 13, 15, 15, 17, 19, 21, 21, 23, 25, 27, 27, 29, 31, 33, 33, 35, 37, 39, 39, 41, 43, 45, 45, 47, 49, 51, 51, 53, 55, 57, 57, 59, 61, 63, 63, 65, 67, 69, 69, 71, 73, 75, 75, 77, 79, 81, 81, 83, 85, 87, 87, 89, 91, 93, 93
Offset: 0

Views

Author

Dimitris Valianatos, Oct 21 2017

Keywords

Comments

The product (2/3) * (4/3) * (6/5) * (6/7) * (8/9) * (10/9) * (12/11) * (12/13) * ... = Pi/(2*sqrt(3)). The denominators are a(n) for n >= 1 and numerators are a(n-1) + A093148(n) for n >= 1 -> [2, 4, 6, 6, 8, 10, 12, 12, ...].
Let r(n) = (a(n)-1)/(a(n)+1) if a(n) mod 4 = 1, (a(n)+1)/(a(n)-1) otherwise; then Product_{n>=1} r(n) = (2/1) * (2/1) * (2/3) * (4/3) * (4/5) * (4/5) * (6/5) * (6/7) * ... = Pi*sqrt(3)/2 = 2.72069904635132677...
The odd numbers of partial sums this sequence, are identified with the A003215 sequence. Also the prime numbers that appear in partial sums in this sequence, are identified with the A002407 sequence.

Crossrefs

Programs

  • Magma
    [(3*n+((n-2) mod 4))/2 : n in [0..100]]; // Wesley Ivan Hurt, Oct 29 2017
  • Maple
    A293990:=n->(3*n+((n-2) mod 4))/2: seq(A293990(n), n=0..100); # Wesley Ivan Hurt, Oct 29 2017
  • Mathematica
    Table[(3*n + Mod[(n - 2), 4])/2, {n, 0, 100}] (* Wesley Ivan Hurt, Oct 29 2017 *)
    f[n_] := (3n + Mod[n - 2, 4])/2; Array[f, 65, 0] (* or *)
    LinearRecurrence[{1, 0, 0, 1, -1}, {1, 3, 3, 5, 7}, 65] (* or *)
    CoefficientList[ Series[(x^4 + 2x^3 + 2x + 1)/((x - 1)^2 (x^3 + x^2 + x + 1)), {x, 0, 64}], x] (* Robert G. Wilson v, Nov 28 2017 *)
  • PARI
    a(n) = (3*n + (n-2)%4) / 2
    
  • PARI
    Vec(x*(1 + 2*x + 2*x^3 + x^4) / ((1 - x)^2*(1 + x)*(1 + x^2)) + O(x^30)) \\ Colin Barker, Oct 21 2017
    
  • PARI
    first(n) = my(start=[1,3,3,5,7,9,9,11]); if(n<=8, return(start)); my(res=vector(n)); for (i=1, 8, res[i] = start[i]); for(i = 1, n-8 ,res[i+8] = res[i] + 12); res \\ David A. Corneth, Oct 21 2017
    

Formula

Sum_{n>=0} 1/a(n)^2 = 5*Pi^2/36 = 1.3707783890401886970... = 10*A086729.
(a(n) - n) * (-1)^(n+1) = A134967(n) for n >= 0.
a(n) - n = A162330(n) for n >= 0.
a(n) - n = A285869(n+1) for n >= 0.
a(n) + a(n+1) = A157932(n+2) for n >= 0.
a(n) + (2*n+1) = A047298(n+1) for n >= 0.
From Colin Barker, Oct 21 2017: (Start)
G.f.: x*(1 + 2*x + 2*x^3 + x^4) / ((1 - x)^2*(1 + x)*(1 + x^2)).
a(n) = a(n-1) + a(n-4) - a(n-5) for n > 5.
(End)
a(n + 8) = a(n) + 12. - David A. Corneth, Oct 21 2017
a(4*k+4) * a(4*k+3) - a(4*k+2) * a(4*k+1) = 2*A063305(k+3) for k >= 0.
Sum_{n>=0} 1/(a(n) + a(n+2))^2 = (4*Pi^2 - 27) / 108 = (A214549 - 1) / 4.
Showing 1-3 of 3 results.