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.

Previous Showing 41-50 of 50 results.

A357745 Numbers on the 8 main spokes of a square spiral with 1 in the center.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19, 21, 23, 25, 28, 31, 34, 37, 40, 43, 46, 49, 53, 57, 61, 65, 69, 73, 77, 81, 86, 91, 96, 101, 106, 111, 116, 121, 127, 133, 139, 145, 151, 157, 163, 169, 176, 183, 190, 197, 204, 211, 218, 225, 233, 241, 249, 257, 265, 273
Offset: 1

Views

Author

Karl-Heinz Hofmann, Dec 22 2022

Keywords

Comments

The 8 main spokes are (with 1 in the center, 2 to the east, 3 to the northeast): east: A054552; northeast: A054554; north: A054556; northwest: A053755; west: A054567; southwest: A054569; south: A033951; southeast: A016754.
Alternatively the 8 main spokes are pairwise part of the 4 main axes: horizontal: A317186; vertical: A267682; diagonal: A002061; antidiagonal: A080335.
And lastly the 4 main axes are giving two main crosses: Horizontal-vertical cross: A039823; Diagonal-antidiagonal cross: A200975.

Examples

			See visualization in links.
		

Crossrefs

Programs

  • Mathematica
    Rest@ CoefficientList[Series[x (1 - x^8 + x^9)/((1 - x)^3*(1 + x) (1 + x^2) (1 + x^4)), {x, 0, 63}], x] (* Michael De Vlieger, Dec 29 2022 *)
    a[n_] := BitShiftRight[(n + 3)^2, 4] + Boole[BitAnd[n, 7] != 1]; Array[a, 65] (* Amiram Eldar, Dec 30 2022, after the PARI code *)
    LinearRecurrence[{2,-1,0,0,0,0,0,1,-2,1},{1,2,3,4,5,6,7,8,9,11},70] (* Harvey P. Dale, Jul 13 2025 *)
  • PARI
    a(n) = sqr(n+3)>>4 + (bitand(n,7)!=1); \\ Kevin Ryde, Dec 30 2022
  • Python
    def A357745(n): return ((n+3)**2 >> 4) + 1 if n % 8 != 1 else (n+3)**2 >> 4
    

Formula

G.f.: x*(1-x^8+x^9)/((1-x)^3*(1+x)*(1+x^2)*(1+x^4)). - Joerg Arndt, Dec 29 2022
a(n) = floor((n+3)^2 / 16) + (1 if n != 1 mod 8). - Kevin Ryde, Dec 30 2022

A082041 a(n) = 16*n^2 + 4*n + 1.

Original entry on oeis.org

1, 21, 73, 157, 273, 421, 601, 813, 1057, 1333, 1641, 1981, 2353, 2757, 3193, 3661, 4161, 4693, 5257, 5853, 6481, 7141, 7833, 8557, 9313, 10101, 10921, 11773, 12657, 13573, 14521, 15501, 16513, 17557, 18633, 19741, 20881, 22053, 23257, 24493
Offset: 0

Views

Author

Paul Barry, Apr 02 2003

Keywords

Comments

Also sequence found by reading the segment (1,21) together with the line from 21, in the direction 21, 73, ..., in the square spiral whose vertices are the generalized decagonal numbers A074377. - Omar E. Pol, Nov 02 2012

Crossrefs

Column k=4 of A082039.

Programs

  • Mathematica
    Table[16n^2+4n+1,{n,0,50}] (* or *) LinearRecurrence[{3,-3,1},{1,21,73},50] (* Harvey P. Dale, Sep 28 2024 *)
  • PARI
    a(n)=16*n^2+4*n+1 \\ Charles R Greathouse IV, Jun 17 2017

Formula

G.f.: (-1-18*x-13*x^2)/(x-1)^3 . - R. J. Mathar, Dec 03 2014
From Elmo R. Oliveira, Oct 28 2024: (Start)
E.g.f.: exp(x)*(1 + 20*x + 16*x^2).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

A102094 a(n) = (2*n-1)*(2*n+1)^2.

Original entry on oeis.org

9, 75, 245, 567, 1089, 1859, 2925, 4335, 6137, 8379, 11109, 14375, 18225, 22707, 27869, 33759, 40425, 47915, 56277, 65559, 75809, 87075, 99405, 112847, 127449, 143259, 160325, 178695, 198417, 219539, 242109, 266175, 291785, 318987, 347829, 378359, 410625
Offset: 1

Views

Author

Gerald McGarvey, Feb 13 2005

Keywords

Comments

Numbers which are both the sum of 2n+1 consecutive odd integers and, after skipping one odd integer, the sum of the 2n-1 immediately higher consecutive odd integers. See A082108(n-1) for the smallest of the 2n+1 odd integers, and A054569(n+1) for the skipped number. Odd integer counterpart to A059270. - Charlie Marion, Apr 30 2020

References

  • G. Boros and V. Moll, Irresistible Integrals: Symbolics, Analysis and Experiments in the Evaluation of Integrals, Cambridge University Press, Cambridge, 2004, p. 123.
  • J. Ewell, An Eulerian Method for Representing Pi^2 by Series, The Rocky Mountain Journal of Mathematics 1992 v.22, pp. 165-168.

Crossrefs

Cf. A002388.

Programs

  • GAP
    List([1..40], n-> (2*n-1)*(2*n+1)^2); # G. C. Greubel, Oct 27 2019
  • Magma
    [(2*n-1)*(2*n+1)^2: n in [1..40]]; // G. C. Greubel, Oct 27 2019
    
  • Maple
    seq((2*n-1)*(2*n+1)^2, n=1..40); # G. C. Greubel, Oct 27 2019
  • Mathematica
    Table[(2n-1)(2n+1)^2,{n,40}] (* or *) LinearRecurrence[{4,-6,4,-1},{9,75,245,567},40] (* Harvey P. Dale, Jul 24 2012 *)
  • PARI
    vector(40, n, (2*n-1)*(2*n+1)^2) \\ G. C. Greubel, Oct 27 2019
    
  • Sage
    [(2*n-1)*(2*n+1)^2 for n in (1..40)] # G. C. Greubel, Oct 27 2019
    

Formula

Sum_{n>=1} 1/a(n) = (12 - Pi^2)/16.
Sum_{n>=1} n/a(n) = (Pi^2 - 4)/32. - Sign flipped by Bernard Schott, May 06 2020
From Harvey P. Dale, Jul 24 2012: (Start)
a(1)=9, a(2)=75, a(3)=245, a(4)=567, a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
G.f.: (9 + 39*x - x^2 + x^3)/(1-x)^4. (End)
E.g.f.: 1 + (-1 + 10*x + 28*x^2 + 8*x^3)*exp(x). - G. C. Greubel, Oct 27 2019

Extensions

More terms from Harvey P. Dale, Jul 24 2012

A244687 The spiral of Champernowne read by the Southwest ray.

Original entry on oeis.org

1, 7, 5, 6, 1, 0, 3, 1, 7, 1, 1, 5, 2, 2, 7, 3, 3, 3, 4, 5, 3, 6, 6, 7, 8, 8, 5, 0, 5, 1, 2, 2, 7, 3, 0, 5, 1, 6, 0, 8, 7, 9, 2, 1, 5, 3, 6, 5, 5, 7, 2, 9, 7, 1, 0, 3, 1, 5, 0, 7, 7, 0, 2, 2, 5, 5, 6, 8, 5, 0, 2, 3, 7, 6, 0, 9, 1, 2, 0, 5, 7, 8, 2, 2, 5, 5, 6, 8, 5, 2, 2, 6, 7, 9, 0, 3, 1, 7, 0, 0, 0, 4, 0, 5, 1
Offset: 1

Views

Author

Robert G. Wilson v, Jul 04 2014

Keywords

Examples

			See A244677 for the spiral of David Gawen Champernowne.
		

Crossrefs

Programs

  • Mathematica
    almostNatural[n_, b_] := Block[{m = 0, d = n, i = 1, l, p}, While[m <= d, l = m; m = (b - 1) i*b^(i - 1) + l; i++]; i--; p = Mod[d - l, i]; q = Floor[(d - l)/i] + b^(i - 1); If[p != 0, IntegerDigits[q, b][[p]], Mod[q - 1, b]]]; f[n_] := 4n^2 - 6n + 3 (* see A244677 formula section *); Array[ almostNatural[ f@#, 10] &, 105]

Formula

See A244677 formula section.

A303273 Array T(n,k) = binomial(n, 2) + k*n + 1 read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 4, 4, 1, 4, 6, 7, 7, 1, 5, 8, 10, 11, 11, 1, 6, 10, 13, 15, 16, 16, 1, 7, 12, 16, 19, 21, 22, 22, 1, 8, 14, 19, 23, 26, 28, 29, 29, 1, 9, 16, 22, 27, 31, 34, 36, 37, 37, 1, 10, 18, 25, 31, 36, 40, 43, 45, 46, 46, 1, 11, 20, 28, 35, 41
Offset: 0

Views

Author

Keywords

Comments

Columns are linear recurrence sequences with signature (3,-3,1).
8*T(n,k) + A166147(k-1) are squares.
Columns k are binomial transforms of [1, k, 1, 0, 0, 0, ...].
Antidiagonals sums yield A116731.

Examples

			The array T(n,k) begins
1    1    1    1    1    1    1    1    1    1    1    1    1  ...  A000012
1    2    3    4    5    6    7    8    9   10   11   12   13  ...  A000027
2    4    6    8   10   12   14   16   18   20   22   24   26  ...  A005843
4    7   10   13   16   19   22   25   28   31   34   37   40  ...  A016777
7   11   15   19   23   27   31   35   39   43   47   51   55  ...  A004767
11  16   21   26   31   36   41   46   51   56   61   66   71  ...  A016861
16  22   28   34   40   46   52   58   64   70   76   82   88  ...  A016957
22  29   36   43   50   57   64   71   78   85   92   99  106  ...  A016993
29  37   45   53   61   69   77   85   93  101  109  117  125  ...  A004770
37  46   55   64   73   82   91  100  109  118  127  136  145  ...  A017173
46  56   66   76   86   96  106  116  126  136  146  156  166  ...  A017341
56  67   78   89  100  111  122  133  144  155  166  177  188  ...  A017401
67  79   91  103  115  127  139  151  163  175  187  199  211  ...  A017605
79  92  105  118  131  144  157  170  183  196  209  222  235  ...  A190991
...
The inverse binomial transforms of the columns are
1    1    1    1    1    1    1    1    1    1    1    1    1  ...
0    1    2    3    4    5    6    7    8    9   10   11   12  ...
1    1    1    1    1    1    1    1    1    1    1    1    1  ...
0    0    0    0    0    0    0    0    0    0    0    0    0  ...
0    0    0    0    0    0    0    0    0    0    0    0    0  ...
0    0    0    0    0    0    0    0    0    0    0    0    0  ...
...
T(k,n-k) = A087401(n,k) + 1 as triangle
1
1   1
1   2   2
1   3   4   4
1   4   6   7   7
1   5   8  10  11  11
1   6  10  13  15  16  16
1   7  12  16  19  21  22  22
1   8  14  19  23  26  28  29  29
1   9  16  22  27  31  34  36  37  37
1  10  18  25  31  36  40  43  45  46  46
...
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics: A Foundation for Computer Science, Addison-Wesley, 1994.

Crossrefs

Programs

  • Maple
    T := (n, k) -> binomial(n, 2) + k*n + 1;
    for n from 0 to 20 do seq(T(n, k), k = 0 .. 20) od;
  • Mathematica
    Table[With[{n = m - k}, Binomial[n, 2] + k n + 1], {m, 0, 11}, {k, m, 0, -1}] // Flatten (* Michael De Vlieger, Apr 21 2018 *)
  • Maxima
    T(n, k) := binomial(n, 2)+ k*n + 1$
    for n:0 thru 20 do
        print(makelist(T(n, k), k, 0, 20));
    
  • PARI
    T(n,k) = binomial(n, 2) + k*n + 1;
    tabl(nn) = for (n=0, nn, for (k=0, nn, print1(T(n, k), ", ")); print); \\ Michel Marcus, May 17 2018

Formula

G.f.: (3*x^2*y - 3*x*y + y - 2*x^2 + 2*x - 1)/((x - 1)^3*(y - 1)^2).
E.g.f.: (1/2)*(2*x*y + x^2 + 2)*exp(y + x).
T(n,k) = 3*T(n-1,k) - 3*T(n-2,k) + T(n-3,k), with T(0,k) = 1, T(1,k) = k + 1 and T(2,k) = 2*k + 2.
T(n,k) = T(n-1,k) + n + k - 1.
T(n,k) = T(n,k-1) + n, with T(n,0) = 1.
T(n,0) = A152947(n+1).
T(n,1) = A000124(n).
T(n,2) = A000217(n).
T(n,3) = A034856(n+1).
T(n,4) = A052905(n).
T(n,5) = A051936(n+4).
T(n,6) = A246172(n+1).
T(n,7) = A302537(n).
T(n,8) = A056121(n+1) + 1.
T(n,9) = A056126(n+1) + 1.
T(n,10) = A051942(n+10) + 1, n > 0.
T(n,11) = A101859(n) + 1.
T(n,12) = A132754(n+1) + 1.
T(n,13) = A132755(n+1) + 1.
T(n,14) = A132756(n+1) + 1.
T(n,15) = A132757(n+1) + 1.
T(n,16) = A132758(n+1) + 1.
T(n,17) = A212427(n+1) + 1.
T(n,18) = A212428(n+1) + 1.
T(n,n) = A143689(n) = A300192(n,2).
T(n,n+1) = A104249(n).
T(n,n+2) = T(n+1,n) = A005448(n+1).
T(n,n+3) = A000326(n+1).
T(n,n+4) = A095794(n+1).
T(n,n+5) = A133694(n+1).
T(n+2,n) = A005449(n+1).
T(n+3,n) = A115067(n+2).
T(n+4,n) = A133694(n+2).
T(2*n,n) = A054556(n+1).
T(2*n,n+1) = A054567(n+1).
T(2*n,n+2) = A033951(n).
T(2*n,n+3) = A001107(n+1).
T(2*n,n+4) = A186353(4*n+1) (conjectured).
T(2*n,n+5) = A184103(8*n+1) (conjectured).
T(2*n,n+6) = A250657(n-1) = A250656(3,n-1), n > 1.
T(n,2*n) = A140066(n+1).
T(n+1,2*n) = A005891(n).
T(n+2,2*n) = A249013(5*n+4) (conjectured).
T(n+3,2*n) = A186384(5*n+3) = A186386(5*n+3) (conjectured).
T(2*n,2*n) = A143689(2*n).
T(2*n+1,2*n+1) = A143689(2*n+1) (= A030503(3*n+3) (conjectured)).
T(2*n,2*n+1) = A104249(2*n) = A093918(2*n+2) = A131355(4*n+1) (= A030503(3*n+5) (conjectured)).
T(2*n+1,2*n) = A085473(n).
a(n+1,5*n+1)=A051865(n+1) + 1.
a(n,2*n+1) = A116668(n).
a(2*n+1,n) = A054569(n+1).
T(3*n,n) = A025742(3*n-1), n > 1 (conjectured).
T(n,3*n) = A140063(n+1).
T(n+1,3*n) = A069099(n+1).
T(n,4*n) = A276819(n).
T(4*n,n) = A154106(n-1), n > 0.
T(2^n,2) = A028401(n+2).
T(1,n)*T(n,1) = A006000(n).
T(n*(n+1),n) = A211905(n+1), n > 0 (conjectured).
T(n*(n+1)+1,n) = A294259(n+1).
T(n,n^2+1) = A081423(n).
T(n,A000217(n)) = A158842(n), n > 0.
T(n,A152947(n+1)) = A060354(n+1).
floor(T(n,n/2)) = A267682(n) (conjectured).
floor(T(n,n/3)) = A025742(n-1), n > 0 (conjectured).
floor(T(n,n/4)) = A263807(n-1), n > 0 (conjectured).
ceiling(T(n,2^n)/n) = A134522(n), n > 0 (conjectured).
ceiling(T(n,n/2+n)/n) = A051755(n+1) (conjectured).
floor(T(n,n)/n) = A133223(n), n > 0 (conjectured).
ceiling(T(n,n)/n) = A007494(n), n > 0.
ceiling(T(n,n^2)/n) = A171769(n), n > 0.
ceiling(T(2*n,n^2)/n) = A046092(n), n > 0.
ceiling(T(2*n,2^n)/n) = A131520(n+2), n > 0.

A325657 a(n) = (1/2)*(-1 + (-1)^n)*(n-1) + n^2.

Original entry on oeis.org

0, 1, 4, 7, 16, 21, 36, 43, 64, 73, 100, 111, 144, 157, 196, 211, 256, 273, 324, 343, 400, 421, 484, 507, 576, 601, 676, 703, 784, 813, 900, 931, 1024, 1057, 1156, 1191, 1296, 1333, 1444, 1483, 1600, 1641, 1764, 1807, 1936, 1981, 2116, 2163, 2304, 2353, 2500, 2551
Offset: 0

Views

Author

Stefano Spezia, May 13 2019

Keywords

Comments

For n > 0, a(n) is the n-th element of the diagonal of the triangle A325655. Equivalently, a(n) is the element M_{n,1} of the matrix M(n) whose permanent is A322277(n).

Crossrefs

Programs

  • GAP
    Flat(List([0..55], n->(1/2)*(- 1 + (- 1)^n)*(n - 1) + n^2));
    
  • Magma
    [(1/2)*(- 1 + (- 1)^n)*(n - 1) + n^2: n in [0..55]];
    
  • Maple
    a:=n->(1/24)*n*(3 - 3*(- 1)^n + 4*n + 6*n^2 + 8*n^3): seq(a(n), n=0..55);
  • Mathematica
    Table[(1/2)*(- 1+(-1)^n)*(n-1)+n^2,{n,0,55}]
  • PARI
    a(n) = (1/2)*(- 1 + (- 1)^n)*(n - 1) + n^2;

Formula

O.g.f.: (-1 - 3*x - x^2 - 3*x^3)/((-1 + x)^3*(1+x)^2).
E.g.f.: (1/2)*exp(-x)*(-1 - x + exp(2*x)*(1 + x + 2*x^2)).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 4
a(n) = n^2 if n is even.
a(n) = n^2 - n + 1 if n is odd.

A357744 a(n) is the least k such that prime(n) * k occurs in one of the eight main spokes of a square spiral with 1 in the center.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 25, 1, 17, 1, 59, 1, 13, 37, 1, 4, 3, 13, 5, 1, 21, 8, 2, 4, 1, 131, 3, 1, 2, 1, 1, 1, 2, 37, 4, 13, 58, 7, 1, 34, 1, 7, 23, 4, 1, 29, 1, 251, 1, 5, 25, 3, 13, 1, 7, 30, 1, 311, 31, 38, 3, 49, 3, 6, 5, 37, 19, 16, 7, 5, 149, 3, 1, 7, 419, 1, 1, 91, 10, 2
Offset: 1

Views

Author

Karl-Heinz Hofmann, Dec 01 2022

Keywords

Comments

Numbers on the spokes of the spiral are A357745.
a(n) = 1 when prime(n) is directly on a main spoke.
a(n) <= prime(n) since odd squares are on the southeast spoke (A016754).

Crossrefs

Programs

  • Python
    from sympy import sieve
    A357744, A357745, aupto = [], [], 82
    for n in range (1, sieve[aupto]**2):
        A357745.append(((n+3)**2 >> 4) + 1 if n % 8 != 1 else (n+3)**2 >> 4)
    for p in sieve[1:aupto + 1]:
        k = 1
        while (p*k) not in A357745: k += 1
        A357744.append(k)
    print(A357744)

A098966 Number of (k+1)-tuples of integers modulo n (x_1,...,x_k,s) such that at least one subset of the x_i sums to s mod n. In other words, n^k times the expected number of distinct subset sums mod n of k integers mod n chosen uniformly at random. Read by antidiagonals, i.e., with entries in the order (n,k)=(1,1),(1,2),(2,1),(1,3),(2,2),(3,1),...

Original entry on oeis.org

1, 1, 3, 1, 7, 5, 1, 15, 21, 7, 1, 31, 73, 43, 9, 1, 63, 233, 215, 73, 11, 1, 127, 717, 951, 497, 111, 13, 1, 255, 2173, 3971, 2865, 959, 157, 15, 1, 511, 6545, 16171, 15161, 6863, 1657, 211, 17, 1, 1023, 19665, 65167, 77369, 44391, 14521, 2631, 273, 19
Offset: 1

Views

Author

Andrew Childs (amchilds(AT)caltech.edu) and Wim van Dam (vandam(AT)cs.ucsb.edu), Oct 13 2004

Keywords

Comments

a(n,k) <= n^(k+1).

Examples

			Table begins
  1,  1,   1,    1,     1, ...
  3,  7,  15,   31,    63, ...
  5, 21,  73,  233,   717, ...
  7, 43, 215,  951,  3971, ...
  9, 73, 497, 2865, 15161, ...
  ...
		

Crossrefs

First column is A005408; second column is A054569; second row is A000225.

Programs

  • Mathematica
    <
    				

Formula

a(n, 1) = 2*n - 1;
a(n, 2) = 4*n^2 - 6*n + 3;
a(n, 3) = 8*n^3 - 28*n^2 + 44*n - 23, n odd;
a(n, 3) = 8*n^3 - 28*n^2 + 44*n - 25, n even;
a(1, k) = 1;
a(2, k) = 2^(k+1) - 1;
a(3, k) = 3^(k+1) - 2*k - 2.

A161372 In Ulam's spiral starting at 101, take the elements not used so far from the two spokes SW, NE, SW, NE, SW, NE ...

Original entry on oeis.org

107, 101, 121, 103, 143, 113, 173, 131, 211, 157, 257, 191, 311, 233, 373, 283, 443, 341, 521, 407, 607, 481, 701, 563, 803, 653, 913, 751, 1031, 857, 1157, 971, 1291, 1093, 1433, 1223, 1583, 1361, 1741, 1507, 1907, 1661, 2081, 1823, 2263, 1993, 2453
Offset: 1

Views

Author

Milton L. Brown (miltbrown(AT)earthlink.net), Jun 08 2009

Keywords

Comments

NE to SW Diagonal of Ulam's Spiral, with 101 at center.
The sequence did not match the original definition. A working definition might be a(2n)=4n^2-10n+107, a(2n-1)=4n^2+2n+101, a(n)=n^2-n+105+2*(-1)^n*(1-2*n), but this seems to be unrelated to Ulam spirals. [R. J. Mathar, Jun 11 2009]

Examples

			SW-NE diagonal in:
  137 136 135 134 133 132 131
  138 117 116 115 114 113 130
  139 118 105 104 103 112 129
  140 119 106 101 102 111 128
  141 120 107 108 109 110 127
  142 121 122 123 124 125 126
  143 144 145 146 147 148 149
		

Crossrefs

Cf. A054569 (SW spoke), A054554 (NE spoke).

Programs

  • Mathematica
    CoefficientList[Series[(107*x^4-6*x^3-194*x^2-6*x+107)/((1+x)^2*(1-x)^3), {x,0,32}], x] (* Georg Fischer, Dec 03 2024 *)

Extensions

Edited by Georg Fischer, Dec 03 2024

A226940 a(0)=0; if a(n-1) is odd, a(n) = n + a(n-1), otherwise a(n) = n - a(n-1).

Original entry on oeis.org

0, 1, 3, 6, -2, 7, 13, 20, -12, 21, 31, 42, -30, 43, 57, 72, -56, 73, 91, 110, -90, 111, 133, 156, -132, 157, 183, 210, -182, 211, 241, 272, -240, 273, 307, 342, -306, 343, 381, 420, -380, 421, 463, 506, -462, 507, 553, 600, -552, 601, 651, 702, -650, 703, 757
Offset: 0

Views

Author

Enrico Santilli, Jun 23 2013

Keywords

Crossrefs

Cf. A081348 (second bisection); A002939, A054554, A054569, A068377.

Programs

  • Magma
    [IsZero(n) select 0 else IsOdd(Self(n)) select n+Self(n) else n-Self(n): n in [0..60]]; // Bruno Berselli, Jul 01 2013
    
  • Mathematica
    LinearRecurrence[{0, 0, 0, 3, 0, 0, 0, -3, 0, 0, 0, 1}, {0, 1, 3, 6, -2, 7, 13, 20, -12, 21, 31, 42}, 60] (* Bruno Berselli, Jul 01 2013 *)
  • Maxima
    makelist(coeff(taylor(x*(1+3*x+6*x^2-2*x^3+4*x^4+4*x^5+2*x^6-6*x^7+3*x^8+x^9)/((1-x)^3*(1+x)^3*(1+x^2)^3), x, 0, n), x, n), n, 0, 60); /* Bruno Berselli, Jul 01 2013 */

Formula

G.f.: x*(1 +3*x +6*x^2 -2*x^3 +4*x^4 +4*x^5 +2*x^6 -6*x^7 +3*x^8 +x^9)/((1-x)^3*(1+x)^3*(1+x^2)^3). [Bruno Berselli, Jul 01 2013]
a(n) = 3*a(n-4) -3*a(n-8) +a(n-12). [Bruno Berselli, Jul 01 2013]
a(4n) = -A002939(n), a(4n+1) = A054569(n+1), a(4n+2) = A054554(n+2), a(4n+3) = A068377(n+2). [Bruno Berselli, Jul 02 2013]

Extensions

More terms from Bruno Berselli, Jul 01 2013
Previous Showing 41-50 of 50 results.