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 11-20 of 40 results. Next

A073724 a(n) = (4^(n+1) + 6n + 5)/9.

Original entry on oeis.org

1, 3, 9, 31, 117, 459, 1825, 7287, 29133, 116515, 466041, 1864143, 7456549, 29826171, 119304657, 477218599, 1908874365, 7635497427, 30541989673, 122167958655, 488671834581, 1954687338283, 7818749353089, 31274997412311
Offset: 0

Views

Author

Wouter Meeussen, Sep 01 2002

Keywords

Comments

a(n) is the number of times a disk is moved from peg 1 to peg 2 during a move of a tower of 2n or (2n-1) disks from peg 1 to peg 2 ("Tower of Hanoi" problem). Binomial transform of A025579.
An approximation to A091841.

Examples

			Moving a tower of 4 disks = 2^4 - 1 moves, coded {1,0,5,1,2,3,1,0,5,4,2,5,1,0,5}. The move from peg 1 to peg 2 has code "0" and this occurs 3 times. For 3 disks we also find 3 zeros in {0,1,3,0,4,5,0}. Hence a(2)=3. The coding corresponds to the rank of the permutation {'from peg' 1, 'to peg' 2, 'by peg' 3} or {1,2,3} with rank 0.
		

Crossrefs

Cf. A001045, A002450, A007583, A020988, A025579, A047849 (first differences), A090822, A091841.

Programs

  • Magma
    [(4^(n+1)+6*n+5)/9: n in [0..40] ]; // Vincenzo Librandi, Apr 28 2011
  • Mathematica
    Table[(4^(n+1)+6n+5)/9, {n, 0, 24}]
  • PARI
    a(n)=(4*4^n+6*n+5)/9
    
  • PARI
    a(n)=polcoeff((1-3*x)/(1-4*x)/(1-x)^2+x*O(x^n),n)
    

Formula

G.f.: (1-3*x)/((1-4*x)*(1-x)^2).
a(n) = Sum_{k=0..n} A047849(k). - L. Edson Jeffery, May 01 2021
From Elmo R. Oliveira, Dec 11 2023: (Start)
a(n) = 6*a(n-1) - 9*a(n-2) + 4*a(n-3) for n>2.
E.g.f.: (1/9)*(4*(exp(4*x)) + 6*x*exp(x) + 5*exp(x)). (End)

A121314 Triangle T(n,k), 0 <= k <= n, read by rows given by [0, 1, 0, 0, 0, 0, ...] DELTA [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 3, 1, 0, 1, 5, 6, 1, 0, 1, 7, 15, 10, 1, 0, 1, 9, 28, 35, 15, 1, 0, 1, 11, 45, 84, 70, 21, 1, 0, 1, 13, 66, 165, 210, 126, 28, 1, 0, 1, 15, 91, 286, 495, 462, 210, 36, 1
Offset: 0

Views

Author

Philippe Deléham, Aug 25 2006

Keywords

Comments

A054142 with first diagonal 1, 0, 0, 0, 0, 0, 0, 0, ...
Mirror image of triangle in A165253.

Examples

			Triangle begins
  1;
  0,  1;
  0,  1,  1;
  0,  1,  3,  1;
  0,  1,  5,  6,  1;
  0,  1,  7, 15, 10,  1;
  0,  1,  9, 28, 35, 15,  1;
  0,  1, 11, 45, 84, 70, 21,  1;
		

Crossrefs

Formula

T(0,0)=1; T(n,0)=0 for n > 0; T(n+1,k+1) = binomial(2*n-k,k)for n >= 0 and k >= 0.
Sum_{k=0..n} T(n,k)*x^k = A001519(n), A047849(n), A165310(n), A165311(n), A165312(n), A165314(n), A165322(n), A165323(n), A165324(n) for x = 1,2,3,4,5,6,7,8,9 respectively.
Sum_{k=0..n} 2^k*T(n,k) = (4^n+2)/3.
Sum_{k=0..n} 2^(n-k)*T(n,k) = A001835(n).
Sum_{k=0..n} 3^k*4^(n-k)*T(n,k) = A054879(n). - Philippe Deléham, Aug 26 2006
Sum_{k=0..n} T(n,k)*(-1)^k*2^(3n-2k) = A143126(n). - Philippe Deléham, Oct 31 2008
Sum_{k=0..n} T(n,k)*(-1)^k*3^(n-k) = A138340(n)/4^n. - Philippe Deléham, Nov 01 2008
G.f.: (1-(y+1)*x)/(1-(2y+1)*x+y^2*x^2). - Philippe Deléham, Nov 01 2011
T(n,k) = T(n-1,k) + 2*T(n-1,k-1) - T(n-2,k-2), T(0,0) = T(1,1) = 1, T(1,0) = 0. - Philippe Deléham, Feb 19 2012

A191668 Dispersion of A016825 (4k+2, k>0), by antidiagonals.

Original entry on oeis.org

1, 2, 3, 6, 10, 4, 22, 38, 14, 5, 86, 150, 54, 18, 7, 342, 598, 214, 70, 26, 8, 1366, 2390, 854, 278, 102, 30, 9, 5462, 9558, 3414, 1110, 406, 118, 34, 11, 21846, 38230, 13654, 4438, 1622, 470, 134, 42, 12, 87382, 152918, 54614, 17750, 6486, 1878, 534, 166
Offset: 1

Views

Author

Clark Kimberling, Jun 11 2011

Keywords

Comments

For a background discussion of dispersions, see A191426.
...
Each of the sequences (4n, n>2), (4n+1, n>0), (3n+2, n>=0), generates a dispersion. Each complement (beginning with its first term >1) also generates a dispersion. The six sequences and dispersions are listed here:
...
A191452=dispersion of A008586 (4k, k>=1)
A191667=dispersion of A016813 (4k+1, k>=1)
A191668=dispersion of A016825 (4k+2, k>=0)
A191669=dispersion of A004767 (4k+3, k>=0)
A191670=dispersion of A042968 (1 or 2 or 3 mod 4 and >=2)
A191671=dispersion of A004772 (0 or 1 or 3 mod 4 and >=2)
A191672=dispersion of A004773 (0 or 1 or 2 mod 4 and >=2)
A191673=dispersion of A004773 (0 or 2 or 3 mod 4 and >=2)
...
EXCEPT for at most 2 initial terms (so that column 1 always starts with 1):
A191452 has 1st col A042968, all else A008486
A191667 has 1st col A004772, all else A016813
A191668 has 1st col A042965, all else A016825
A191669 has 1st col A004773, all else A004767
A191670 has 1st col A008486, all else A042968
A191671 has 1st col A016813, all else A004772
A191672 has 1st col A016825, all else A042965
A191673 has 1st col A004767, all else A004773
...
Regarding the dispersions A191670-A191673, there is a formula for sequences of the type "(a or b or c mod m)", (as in the Mathematica program below):
If f(n)=(n mod 3), then (a,b,c,a,b,c,a,b,c,...) is given by
a*f(n+2)+b*f(n+1)+c*f(n), so that "(a or b or c mod m)" is given by
a*f(n+2)+b*f(n+1)+c*f(n)+m*floor((n-1)/3)), for n>=1.

Examples

			Northwest corner:
.    1   2    6   22    86    342   1366    5462   21846    87382
.    3  10   38  150   598   2390   9558   38230  152918   611670
.    4  14   54  214   854   3414  13654   54614  218454   873814
.    5  18   70  278  1110   4438  17750   70998  283990  1135958
.    7  26  102  406  1622   6486  25942  103766  415062  1660246
.    8  30  118  470  1878   7510  30038  120150  480598  1922390
.    9  34  134  534  2134   8534  34134  136534  546134  2184534
.   11  42  166  662  2646  10582  42326  169302  677206  2708822
.   12  46  182  726  2902  11606  46422  185686  742742  2970966
.   13  50  198  790  3158  12630  50518  202070  808278  3233110
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of the increasing sequence f[n] *)
    r = 40; r1 = 12;  c = 40; c1 = 12;
    f[n_] := 4*n-2
    Table[f[n], {n, 1, 30}]  (* A016825 *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]] (* A191668 *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191668 *)
    (* Conjectured: *) Grid[Table[(8 + (3*Floor[(4*n + 1)/3] - 2)*4^k)/12, {n, 10}, {k, 10}]] (* L. Edson Jeffery, Feb 14 2015 *)

Formula

Conjecture: a(n,k) = (8 + (3*floor((4*n + 1)/3) - 2)*4^k)/12 = (8 + (3*A042965(n+1) - 2)*A000302(k))/12. - L. Edson Jeffery, Feb 14 2015

A256264 Partial sums of A256263.

Original entry on oeis.org

0, 1, 2, 5, 6, 9, 14, 21, 22, 25, 30, 37, 42, 53, 70, 85, 86, 89, 94, 101, 106, 117, 134, 149, 154, 165, 182, 205, 234, 269, 310, 341, 342, 345, 350, 357, 362, 373, 390, 405, 410, 421, 438, 461, 490, 525, 566, 597, 602, 613, 630, 653, 682, 717, 758, 805, 858, 917, 982, 1053, 1130, 1213, 1302, 1365
Offset: 0

Views

Author

Omar E. Pol, Mar 30 2015

Keywords

Comments

First differs from A255747 at a(27).

Examples

			Also, written as an irregular triangle in which the row lengths are the terms of A011782, the sequence begins:
0,
1,
2,   5,
6,   9, 14,  21,
22, 25, 30,  37,  42,  53,  70,  85;
86, 89, 94, 101, 106, 117, 134, 149, 154, 165, 182, 205, 234, 269,310,341;
...
It appears that the first column gives 0 together with the terms of A047849, hence the right border gives A002450.
It appears that this triangle at least shares with the triangles from the following sequences; A151920, A255737, A255747, A256249, the positive elements of the columns k, if k is a power of 2.
From _Omar E. Pol, Jan 02 2016: (Start)
Illustration of initial terms in the fourth quadrant of the square grid:
---------------------------------------------------------------------------
n    a(n)                 Compact diagram
---------------------------------------------------------------------------
0     0     _
1     1    |_|_ _
2     2      |_| |
3     5      |_ _|_ _ _ _
4     6          |_| | | |
5     9          |_ _| | |
6    14          |_ _ _| |
7    21          |_ _ _ _|_ _ _ _ _ _ _ _
8    22                  |_| | | |_ _  | |
9    25                  |_ _| | |_  | | |
10   30                  |_ _ _| | | | | |
11   37                  |_ _ _ _| | | | |
12   42                  | | |_ _ _| | | |
13   53                  | |_ _ _ _ _| | |
14   70                  |_ _ _ _ _ _ _| |
15   85                  |_ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
16   86                                  |_| | | |_ _  | |_ _ _ _ _ _  | |
17   89                                  |_ _| | |_  | | |_ _ _ _ _  | | |
18   94                                  |_ _ _| | | | | |_ _ _ _  | | | |
19  101                                  |_ _ _ _| | | | |_ _ _  | | | | |
20  106                                  | | |_ _ _| | | |_ _  | | | | | |
21  117                                  | |_ _ _ _ _| | |_  | | | | | | |
22  134                                  |_ _ _ _ _ _ _| | | | | | | | | |
23  149                                  |_ _ _ _ _ _ _ _| | | | | | | | |
24  154                                  | | | | | | |_ _ _| | | | | | | |
25  165                                  | | | | | |_ _ _ _ _| | | | | | |
26  182                                  | | | | |_ _ _ _ _ _ _| | | | | |
27  205                                  | | | |_ _ _ _ _ _ _ _ _| | | | |
28  234                                  | | |_ _ _ _ _ _ _ _ _ _ _| | | |
29  269                                  | |_ _ _ _ _ _ _ _ _ _ _ _ _| | |
30  310                                  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
31  341                                  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
.
a(n) is also the total number of cells in the first n regions of the diagram. A256263(n) gives the number of cells in the n-th region of the diagram.
(End)
		

Crossrefs

Programs

  • Mathematica
    Accumulate@Flatten@Join[{0}, NestList[Join[#, Range[Length[#] - 1]*6 - 1, {2 #[[-1]] + 1}] &, {1}, 5]] (* Ivan Neretin, Feb 14 2017 *)

Formula

a(n) = (A256260(n+1) - 1)/4.

A167030 a(n) = (2^n - (-1)^n - 3)/3.

Original entry on oeis.org

-1, 0, 0, 2, 4, 10, 20, 42, 84, 170, 340, 682, 1364, 2730, 5460, 10922, 21844, 43690, 87380, 174762, 349524, 699050, 1398100, 2796202, 5592404, 11184810, 22369620, 44739242, 89478484, 178956970, 357913940, 715827882
Offset: 0

Views

Author

Paul Curtz, Oct 27 2009

Keywords

Crossrefs

A026644 is an essentially identical sequence.

Programs

  • Magma
    [(2^n-(-1)^n)/3 -1: n in [0..40] ]; // Vincenzo Librandi, Apr 28 2011
    
  • Mathematica
    f[n_] := (2^n - (-1)^n - 3)/3; Array[f, 32, 0]
  • PARI
    a(n)=(2^n-(-1)^n)/3-1 \\ Charles R Greathouse IV, Oct 07 2015

Formula

a(n) = A001045(n) - 1.
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3).
G.f.: (1 - 2*x - x^2)/((x^2 - 1)*(1-2*x)).
2*a(n) = A153772(n+1).
a(2n+1) - a(2n) = A047849(n).
a(2n+1) = A020988(n); a(2n+2) = 2*A020988(n).
a(n+2) = 2*A000975(n).
a(2n+2) = a(2n) + 2^(2n).
E.g.f.: (1/3)*(exp(2*x) - 3*exp(x) - exp(-x)). - G. C. Greubel, May 30 2016

Extensions

Edited by R. J. Mathar, Dec 17 2010

A178789 a(n) = 4^(n-1) + 2: Number of acute angles after n iterations of the Koch snowflake construction.

Original entry on oeis.org

3, 6, 18, 66, 258, 1026, 4098, 16386, 65538, 262146, 1048578, 4194306, 16777218, 67108866, 268435458, 1073741826, 4294967298, 17179869186, 68719476738, 274877906946, 1099511627778, 4398046511106, 17592186044418, 70368744177666
Offset: 1

Views

Author

Keywords

Comments

Starting from an equilateral triangle, at each step each straight segment is replaced by a "/\" shape of four segments of equal length, with the acute angle in the middle pointing to the exterior. The sequence counts the angles which are (i.e., already were) at both extremities, plus the one newly created acute angle in the middle of each former segment. At step n, there are 3*4^(n-1) straight segments, therefore a(n+1) = a(n) + 3*4^(n-1). - M. F. Hasler, Dec 17 2013

Crossrefs

Programs

  • Magma
    [2^(2*(n-1)) + 2: n in [1..30]]; // Vincenzo Librandi, Feb 02 2013
    
  • Maple
    A178789:=n->2+4^(n-1); seq(A178789(n), n=1..30); # Wesley Ivan Hurt, Dec 17 2013
  • Mathematica
    a=b=3;lst={a};Do[a=a+b;b*=4;AppendTo[lst,a],{n,40}];lst
    Flatten[Table[2^(2*(n-1)) + 2, {n, 1, 50}]](* or *)   CoefficientList[Series[(3 - 9*x)/(1 - 5*x + 4*x^2),{x, 0, 100}], x] (* Vincenzo Librandi, Feb 02 2013 *)
  • PARI
    A178789=n->4^(n-1)+2  \\ - M. F. Hasler, Dec 17 2013

Formula

G.f.: 3*x*(1 - 3*x)/(1 - 5*x + 4*x^2).
a(n) = 3 * A047849(n-1).
a(n) = 2^(2*(n-1)) + 2. - Vincenzo Librandi, Feb 02 2013
a(n+1) = a(n) + 3*4^(n-1) = a(n) + A002001(n) for n > 0. - M. F. Hasler, Dec 17 2013
a(n) = 2 + A000302(n-1). - Omar E. Pol, Dec 18 2013

A163868 a(n) = (4^n + 11)/3.

Original entry on oeis.org

4, 5, 9, 25, 89, 345, 1369, 5465, 21849, 87385, 349529, 1398105, 5592409, 22369625, 89478489, 357913945, 1431655769, 5726623065, 22906492249, 91625968985, 366503875929, 1466015503705, 5864062014809, 23456248059225, 93824992236889, 375299968947545
Offset: 0

Views

Author

Juri-Stepan Gerasimov, Aug 08 2009

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5,-4}, {4,5}, 50] (* G. C. Greubel, Aug 06 2017 *)
    (4^Range[0,30]+11)/3 (* Harvey P. Dale, Sep 10 2023 *)
  • PARI
    x='x+O('x^50); Vec((4 - 15*x)/((4*x-1)*(x-1))) \\ G. C. Greubel, Aug 06 2017

Formula

a(n) = 4*a(n-1) - 11 = A155701(n) + 1 = A163834(n) + 2 = A047849(n) + 3.
From R. J. Mathar, Aug 11 2009: (Start)
a(n)= 5*a(n-1) - 4*a(n-2).
G.f.: (4 - 15*x)/((4*x-1)*(x-1)). (End)
E.g.f.: (1/3)*(exp(4*x) + 11*exp(x)). - G. C. Greubel, Aug 06 2017

Extensions

a(11) corrected by R. J. Mathar, Aug 11 2009

A199571 Table version of the array of number of round trips of length L from any of the N vertices of the cycle graph C_N.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 4, 0, 1, 0, 0, 2, 0, 1, 0, 16, 2, 2, 0, 1, 0, 0, 6, 0, 2, 0, 1, 0, 64, 10, 8, 0, 2, 0, 1, 0, 0, 22, 0, 6, 0, 2, 0, 1, 0, 256, 42, 32, 2, 6, 0, 2, 0, 1, 0, 0, 86, 0, 20, 0, 6, 0, 2, 0, 1, 0, 1024, 170, 128, 14, 22, 0, 6, 0, 2, 0, 1, 0, 0
Offset: 0

Views

Author

Wolfdieter Lang, Nov 08 2011

Keywords

Comments

Let w(N,L) be the number of return paths (round trip walks) of length L >= 0 from any vertex of the cycle graph C_N, N >= 1. (Due to cyclic symmetry, this array w(N,L) is independent of the start vertex.) w(N,L) = trace(AC(N)^L)/N = Sum_{k=0..N-1} x^{(N)}_k, with the N X N adjacency matrix AC(N) of the cycle graph C_N, and x^{(N)}_k are the zeros of the characteristic polynomial C(N,x) of AC(N). See A198637 for the coefficient triangle for C(N,x). C(N,x) = 2*(T(N,x/2)-1) for N >= 2. These zeros are x^{(N)}_k = 2*cos(2*Pi*k/N), N >= 2 (from T(N,x/2)=1). For N=1 one has C(1,x)=x with x^{(1)}_0 = 0. This sum formula for w(n,L) has been given in a comment to A054877 (N=5 case) by H. Kociemba. For N=1 one uses 0^0 := 1 to obtain w(1,L) = delta(L,0) (Kronecker's delta-symbol).
The o.g.f. G(N,x) := Sum_{L>=0} w(N,L)*x^L is, by a general result on moments of zeros of polynomials (see the W. Lang reference, theorem 5, p. 244),
y*(d/dx)C(N,x)/(N*C(N,x)), with y=1/x. This becomes for N >= 2: G(N,x) = y*S(N-1,y)/(2*T(N,y/2)-1) with y=1/x. For N=1 one has G(1,x)=1 (not 1/(1-2*x)). In the formula section this N >= 2 result is given explicitly, using the Binet-de Moivre form of the S- and T-polynomials.

Examples

			The triangle a(K,N) = w(N,K-N+1) begins
K\N  1    2     3    4    5    6    7   8   9  10 ...
0:   1
1:   0    1
2:   0    0     1
3:   0    4     0    1
4:   0    0     2    0    1
5:   0   16     2    2    0    1
6:   0    0     6    0    2    0    1
7:   0   64    10    8    0    2    0   1
8:   0    0    22    0    6    0    2   0   1
9:   0  256    42   32    2    6    0   2   0   1
...
The array w(N,L) begins
N\L   0   1   2   3   4   5   6   7    8    9    10 ...
1:    1   0   0   0   0   0   0   0    0    0     0
2:    1   0   4   0  16   0  64   0  256    0  1024
3:    1   0   2   2   6  10  22  42   86  170   342
4:    1   0   2   0   8   0  32   0  128    0   512
5:    1   0   2   0   6   2  20  14   70   72   254
6:    1   0   2   0   6   0  22   0   86    0   342
7:    1   0   2   0   6   0  20   2   70   18   252
8:    1   0   2   0   6   0  20   0   72    0   272
9:    1   0   2   0   6   0  20   0   70    2   252
10:   1   0   2   0   6   0  20   0   70    0   254
...
w(1,0)=1, one vertex considered.
For N >= 2 the vertices (nodes) of C_N are numbered consecutively in the positive sense by 1,2,...,N. W.l.o.g. one can take the vertex number 1 as start of the return trip.
w(3,4)=6 from the six return paths 12121, 13131, 12131, 13121, 12321 and 13231.
w(5,5)=2 from the two return paths 123451 and 154321.
		

Crossrefs

Cf. A198633 (walks on the P_N graph).
The N=1,...,10 sequences are A000007, A199572, A078008, A199573, A054877, A047849, A094659, A063376, A094233, A095929.

Formula

a(K,L) = w(N,K-N+1), K >= 0, n=1,...,K+1, with w(N,L) defined as return walk numbers of length L of the cycle graph C_N in the comment section above.
w(N,L) = Sum_{k=0..N-1} (2*cos(2*Pi*k)/N)^L, N >= 2. For N=1 one has w(1,0)=1 and w(1,L)=0 if L >= 1.
O.g.f. G(N,x) for w(N,L): for N >= 2:
y*S(N-1,y)/(2*(T(N,y/2)-1)) with y=1/x, and for N=1 one has G(1,x)=1. This can, for N >= 2, be written as
G(N,x) = sinh(N*log(2*x/(1-sqrt(1-(2*x)^2))))/(sqrt(1-(2*x)^2)*(cosh(N*log(2*x/(1-sqrt(1-(2*x)^2))))-1)).

A073097 Let x(n) denote the number of 4's among the n first elements of the continued fraction for sum k>=0 1/2^(2^k) (A007400), y(n) the number of 6's and z(n) the number of 2's. Then a(n)=x(n)-y(n)-z(n)-1.

Original entry on oeis.org

-1, -1, 0, -1, 0, 1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0, 1, 0, -1, 0, -1, 0, -1, 0, 1, 0, -1, 0, -1
Offset: 0

Views

Author

Benoit Cloitre, Aug 18 2002

Keywords

Comments

The positive sequence has a(n) = mod(A000120(A047849(n)),2) = mod(A000120(A078008(2n)),2) - Paul Barry, Jan 13 2005
Cosh(1) in 'reflected factorial' base is 1.10101010101010101010101010101010101010101010... - see A091337 for Sinh(1) (from Robert G. Wilson v, May 04 2005)

Crossrefs

Programs

  • PARI
    up_to = 65537;
    A007400(n) = if(n<3, [0, 1, 4][n+1], if(n%8==1, A007400((n+1)/2), if(n%8==2, A007400((n+2)/2), [2, 0, 0, 2, 4, 4, 6, 4, 2, 0, 0, 2, 4, 6, 4, 4][(n%16)+1]))); \\ From A007400
    A073097list(up_to) = { my(v=vector(up_to), x4=0, y6=0, z2=0, k); for(n=1, up_to, k=A007400(n); if(2==k,z2++,if(4==k,x4++,if(6==k,y6++))); v[n] = (x4-y6-z2-1)); (v); };
    v073097 = A073097list(up_to);
    A073097(n) = if(!n,-1,v073097[n]); \\ Antti Karttunen, Jan 12 2019

Formula

It seems that a(2k+1) = 0 for k>=1.
The positive sequence (assuming the pattern continues) has g.f. (1+x-x^2)/((1-x)(1-x^2)), with a(n)=(1-(1)^n)/2+0^n = mod((1+A001045(n+1))/2, 2) = mod(A005578, 2). The partial sums are A008619(n+1). - Paul Barry, Apr 28 2004

A154570 The main diagonal of the successive differences of A154127.

Original entry on oeis.org

1, 3, -4, 2, -6, -2, -14, -18, -46, -82, -174, -338, -686, -1362, -2734, -5458, -10926, -21842, -43694, -87378, -174766, -349522, -699054, -1398098, -2796206, -5592402, -11184814, -22369618, -44739246, -89478482, -178956974, -357913938, -715827886
Offset: 0

Views

Author

Paul Curtz, Jan 12 2009

Keywords

Crossrefs

Programs

Formula

a(n) = a(n-1) + 2*a(n-2), n>0.
a(n+2) = 2*(-1)^(n+1)*A140966(n).
a(n+5) = -2*A083582(n).
a(2n+1) = 3 - A078008(2n) = 3 - A047849(n).
a(2n+2) = -4 - A078008(2n+1) = -4 - A020988(n).
G.f.: (1+2*x-9*x^2)/((1+x)*(1-2*x)). - R. J. Mathar, Feb 25 2009

Extensions

Edited and extended by R. J. Mathar, Feb 25 2009
Previous Showing 11-20 of 40 results. Next