[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
Search: a093178 -id:a093178
Displaying 1-10 of 25 results found. page 1 2 3
     Sort: relevance | references | number | modified | created      Format: long | short | data
A130404 Partial sums of A093178. +20
1
1, 2, 3, 6, 7, 12, 13, 20, 21, 30, 31, 42, 43, 56, 57, 72, 73, 90, 91, 110, 111, 132, 133, 156, 157, 182, 183, 210, 211, 240, 241, 272, 273, 306, 307, 342, 343, 380, 381, 420, 421, 462, 463, 506, 507, 552, 553, 600, 601, 650, 651, 702, 703, 756, 757, 812, 813 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Numbers n such that floor(n/2) is a positive triangular number. - Bruno Berselli, Sep 15 2014
LINKS
FORMULA
a(1) = 1; for n > 1, a(n) = a(n-1)+1 if n is odd, a(n) = a(n-1)+(n-1) if n is even.
a(n) = A002061((n+1)/2) = (n^2+3)/4 if n is odd, a(n) = A002378(n/2) = (n^2+2*n)/4) if n is even.
G.f.: x*(1+x-x^2+x^3)/((1-x)^3*(1+x)^2).
a(n) = A093178(n) - A093178(n-1).
a(1) = 1; a(n) = a(n-1) + n^(n mod 2) = (1/4)*(n^2 + 2n + 4 + (n mod 2)*(2n-1)). - Rolf Pleisch, Feb 04 2008
a(n) = (2*(n-1)*(n+2) + (2*n-3)*(-1)^n+7)/8. - Bruno Berselli, Mar 31 2011
MATHEMATICA
Table[If[EvenQ[n], 1, n], {n, 0, 56}] // Accumulate (* Jean-François Alcover, Jun 10 2013 *)
Accumulate[Join[{1}, Riffle[Range[1, 85, 2], 1]]] (* or *) LinearRecurrence[ {1, 2, -2, -1, 1}, {1, 2, 3, 6, 7}, 90] (* Harvey P. Dale, Jun 01 2016 *)
PROG
(PARI) {s=0; for(n=1, 57, s=s+if(n%2>0, 1, n-1); print1(s, ", "))}
(PARI) {for(n=1, 57, print1(if(n%2>0, (n^2+3)/4, (n^2+2*n)/4), ", "))}
(Magma) &cat[ [ n^2-n+1, n*(n+1) ]: n in [1..29] ];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Klaus Brockhaus, May 25 2007
STATUS
approved
A133935 A007318 * A093178 as a diagonalized matrix. +20
1
1, 1, 1, 1, 2, 3, 1, 3, 9, 1, 1, 4, 18, 4, 5, 1, 5, 30, 10, 25, 1, 1, 6, 45, 20, 75, 6, 7, 1, 7, 63, 35, 175, 21, 49, 1, 1, 8, 84, 56, 350, 56, 196, 8, 9, 1, 9, 108, 84, 630, 126, 588, 36, 81, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
Row sums = A133936: (1, 2, 6, 14, 32, 72, 160, ...).
LINKS
FORMULA
Binomial transform of an infinite lower triangular matrix with A093178: (1, 1, 3, 1, 5, 1, 7, ...) in the main diagonal and the rest zeros.
EXAMPLE
First few rows of the triangle:
1;
1, 1;
1, 2, 3;
1, 3, 9, 1;
1, 4, 18, 4, 5;
1, 5, 30, 10, 25, 1;
1, 6, 45, 20, 75, 6, 7;
1, 7, 63, 35, 175, 21, 49, 1;
...
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Gary W. Adamson, Sep 29 2007
STATUS
approved
A133080 Interpolation operator: Triangle with an even number of zeros in each line followed by 1 or 2 ones. +10
29
1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
A133080 * [1,2,3,...] = A114753: (1, 3, 3, 7, 5, 11, 7, 15, ...).
Inverse of A133080: subdiagonal changes to (-1, 0, -1, 0, -1, ...); main diagonal unchanged.
A133080^(-1) * [1,2,3,...] = A093178: (1, 1, 3, 1, 5, 1, 7, 1, 9, ...).
In A133081, diagonal terms are switched with subdiagonal terms.
LINKS
FORMULA
Infinite lower triangular matrix, (1,1,1,...) in the main diagonal and (1,0,1,0,1,...) in the subdiagonal.
Odd rows, (n-1) zeros followed by "1". Even rows, (n-2) zeros followed by "1, 1".
T(n,n)=1. T(n,k)=0 if 1 <= k < n-1. T(n,n-1)=1 if n even. T(n,n-1)=0 if n odd. - R. J. Mathar, Feb 14 2015
EXAMPLE
First few rows of the triangle are:
1;
1, 1;
0, 0, 1;
0, 0, 1, 1;
0, 0, 0, 0, 1;
0, 0, 0, 0, 1, 1;
0, 0, 0, 0, 0, 0, 1;
...
MAPLE
A133080 := proc(n, k)
if n = k then
1;
elif k=n-1 and type(n, even) then
1;
else
0 ;
end if;
end proc: # R. J. Mathar, Jun 20 2015
MATHEMATICA
T[n_, k_] := If[k == n, 1, If[k == n - 1, (1 + (-1)^n)/2 , 0]];
Table[T[n, k], {n, 1, 10}, {k, 1, n}] (* G. C. Greubel, Oct 21 2017 *)
PROG
(PARI) T(n, k) = if (k==n, 1, if (k == (n-1), 1 - (n % 2), 0)); \\ Michel Marcus, Feb 13 2014
(PARI) firstrows(n) = {my(res = vector(binomial(n + 1, 2)), t=0); for(i=1, n, t+=i; res[t] = 1; if(i%2==0, res[t-1]=1)) ; res} \\ David A. Corneth, Oct 21 2017
CROSSREFS
Cf. A000034 (row sums), A114753, A093178, A133081.
KEYWORD
nonn,easy,tabl
AUTHOR
Gary W. Adamson, Sep 08 2007
STATUS
approved
A049471 Decimal expansion of tan(1). +10
14
1, 5, 5, 7, 4, 0, 7, 7, 2, 4, 6, 5, 4, 9, 0, 2, 2, 3, 0, 5, 0, 6, 9, 7, 4, 8, 0, 7, 4, 5, 8, 3, 6, 0, 1, 7, 3, 0, 8, 7, 2, 5, 0, 7, 7, 2, 3, 8, 1, 5, 2, 0, 0, 3, 8, 3, 8, 3, 9, 4, 6, 6, 0, 5, 6, 9, 8, 8, 6, 1, 3, 9, 7, 1, 5, 1, 7, 2, 7, 2, 8, 9, 5, 5, 5, 0, 9, 9, 9, 6, 5, 2, 0, 2, 2, 4, 2, 9, 8 (list; constant; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
By the Lindemann-Weierstrass theorem, this constant is transcendental. - Charles R Greathouse IV, May 13 2019
LINKS
Mohammad K. Azarian, Forty-Five Nested Equilateral Triangles and cosecant of 1 degree, Problem 813, College Mathematics Journal, Vol. 36, No. 5, November 2005, pp. 413-414.
Mohammad K. Azarian, Solution of Forty-Five Nested Equilateral Triangles and cosecant of 1 degree, Problem 813, College Mathematics Journal, Vol. 37, No. 5, November 2006, pp. 394-395.
FORMULA
Equals Sum_{k>=1} (-1)^(k+1) * B(2*k) * 2^(2*k) * (2^(2*k) - 1) / (2*k)!, where B(k) is the k-th Bernoulli number. - Amiram Eldar, May 15 2021
EXAMPLE
1.5574077246549022305...
MATHEMATICA
RealDigits[Tan[1], 10, 100][[1]] (* Amiram Eldar, May 15 2021 *)
PROG
(PARI) default(realprecision, 20080); x=tan(1); for (n=1, 20000, d=floor(x); x=(x-d)*10; write("b049471.txt", n, " ", d)); \\
CROSSREFS
Cf. A093178 (continued fraction), A009001, A073449.
KEYWORD
cons,easy,nonn
AUTHOR
Albert du Toit (dutwa(AT)intekom.co.za), N. J. A. Sloane
STATUS
approved
A243366 Number T(n,k) of Dyck paths of semilength n having exactly k (possibly overlapping) occurrences of the consecutive steps UDUUDU (with U=(1,1), D=(1,-1)); triangle T(n,k), n>=0, 0<=k<=max(0,floor(n/2)-1), read by rows. +10
13
1, 1, 2, 5, 13, 1, 37, 5, 112, 19, 1, 352, 70, 7, 1136, 259, 34, 1, 3742, 962, 149, 9, 12529, 3585, 627, 54, 1, 42513, 13399, 2584, 279, 11, 145868, 50201, 10529, 1334, 79, 1, 505234, 188481, 42606, 6092, 474, 13, 1764157, 709001, 171563, 27048, 2561, 109, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Conjecture: Generally, column k is asymptotic to c(k) * d^n * n^(k-3/2), where d = 3.8821590268628506747194368909643384... is the root of the equation d^8 - 2*d^7 - 10*d^6 + 12*d^5 - 5*d^4 - 2*d^3 - 5*d^2 - 8*d - 3 = 0, and c(k) are specific constants (independent on n). - Vaclav Kotesovec, Jun 05 2014
LINKS
EXAMPLE
T(4,1) = 1: UDUUDUDD.
T(5,1) = 5: UDUDUUDUDD, UDUUDUDDUD, UDUUDUDUDD, UDUUDUUDDD, UUDUUDUDDD.
T(6,1) = 19: UDUDUDUUDUDD, UDUDUUDUDDUD, UDUDUUDUDUDD, UDUDUUDUUDDD, UDUUDUDDUDUD, UDUUDUDDUUDD, UDUUDUDUDDUD, UDUUDUDUDUDD, UDUUDUDUUDDD, UDUUDUUDDDUD, UDUUDUUDDUDD, UDUUDUUUDDDD, UUDDUDUUDUDD, UUDUDUUDUDDD, UUDUUDUDDDUD, UUDUUDUDDUDD, UUDUUDUDUDDD, UUDUUDUUDDDD, UUUDUUDUDDDD.
T(6,2) = 1: UDUUDUUDUDDD.
T(7,2) = 7: UDUDUUDUUDUDDD, UDUUDUDUUDUDDD, UDUUDUUDUDDDUD, UDUUDUUDUDDUDD, UDUUDUUDUDUDDD, UDUUDUUDUUDDDD, UUDUUDUUDUDDDD.
T(8,3) = 1: UDUUDUUDUUDUDDDD.
Triangle T(n,k) begins:
: 0 : 1;
: 1 : 1;
: 2 : 2;
: 3 : 5;
: 4 : 13, 1;
: 5 : 37, 5;
: 6 : 112, 19, 1;
: 7 : 352, 70, 7;
: 8 : 1136, 259, 34, 1;
: 9 : 3742, 962, 149, 9;
: 10 : 12529, 3585, 627, 54, 1;
MAPLE
b:= proc(x, y, t) option remember; `if`(y<0 or y>x, 0,
`if`(x=0, 1, expand(b(x-1, y+1, [2, 2, 4, 5, 2, 4][t])*
`if`(t=6, z, 1) +b(x-1, y-1, [1, 3, 1, 3, 6, 1][t]))))
end:
T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0, 1)):
seq(T(n), n=0..20);
MATHEMATICA
b[x_, y_, t_] := b[x, y, t] = If[y<0 || y>x, 0, If[x == 0, 1, Expand[b[x-1, y+1, {2, 2, 4, 5, 2, 4}[[t]]]*If[t == 6, z, 1] + b[x-1, y-1, {1, 3, 1, 3, 6, 1}[[t]]]]]]; T[n_] := Function[{p}, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[2*n, 0, 1]]; Table[T[n], {n, 0, 20}] // Flatten (* Jean-François Alcover, Feb 05 2015, after Alois P. Heinz *)
CROSSREFS
Row sums give A000108.
T(n,floor(n/2)-1) gives A093178(n) for n>3.
T(45,k) = A243752(45,k).
T(n,0) = A243753(n,45).
KEYWORD
nonn,tabf
AUTHOR
Alois P. Heinz, Jun 03 2014
STATUS
approved
A124625 Even numbers sandwiched between 1's. +10
11
1, 0, 1, 2, 1, 4, 1, 6, 1, 8, 1, 10, 1, 12, 1, 14, 1, 16, 1, 18, 1, 20, 1, 22, 1, 24, 1, 26, 1, 28, 1, 30, 1, 32, 1, 34, 1, 36, 1, 38, 1, 40, 1, 42, 1, 44, 1, 46, 1, 48, 1, 50, 1, 52, 1, 54, 1, 56, 1, 58, 1, 60, 1, 62, 1, 64, 1, 66, 1, 68, 1, 70, 1, 72, 1, 74, 1, 76, 1, 78, 1, 80, 1, 82, 1, 84 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
Interleaving of A000012 and A005843.
Created to simplify the definition of A129952.
a(n) = abs(A009531(n-1)).
Starting (1, 2, 1, 4,...): square (1 + x - x^2 - x^3 + x^4 + x^5 - ...) = (1 + 2x - x^2 - 4x^3 + x^4 + 6x^5 - ...).
With a(3) taken as 0, a(n+2) = n^k+1 mod 2*n, n>=1, for any k>=2, also for k=n. - Wolfdieter Lang, Dec 21 2011
Also !(n+2) mod n for n>0 where !n is a subfactorial number (A000166). - Michel Lagneau, Sep 05 2012
Greatest common divisor of n-1 and (n-1) mod 2. - Bruno Berselli, Mar 07 2017
REFERENCES
Murat Sahin and Elif Tan, Conditional (strong) divisibility sequences, Fib. Q., 56 (No. 1, 2018), 18-31.
LINKS
FORMULA
a(n) = 1 for even n, a(n) = n-1 for odd n.
a(2*k) = 1, a(2*k+1) = 2*k.
G.f.: (1 - x^2 + 2*x^3)/((1 - x)^2*(1 + x)^2).
a(n) = (n - (n - 2)*(-1)^n)/2. - Bruno Berselli, May 06 2011
E.g.f.: 1 + x^2*U(0)/2 where U(k)= 1 + 2*x*(k+1)/(2*k + 3 - x*(2*k+3)/(x + 4*(k+2)*(k+1)/U(k+1)) (continued fraction, 3rd kind, 3-step). - Sergei N. Gladkovskii, Oct 20 2012
a(n) = 2*floor(n/2) - (n-1)*((n-1) mod 2). - Wesley Ivan Hurt, Oct 19 2013
a(n) = (n-1)^((1-(-1)^n)/2). - Wesley Ivan Hurt, Mar 21 2015
a(n) = (n-1) - a(a(n-1))*a(n-1), a(0) = 0. - Eli Jaffe, Jun 07 2016
E.g.f.: (x + 1)*cosh(x) - sinh(x). - Ilya Gutkovskiy, Jun 07 2016
a(n) = (-1)^n mod n for n > 0. - Franz Vrabec, Mar 06 2020
a(n) = (n-1)^(n mod 2). - Karl V. Keller, Jr., Aug 01 2020
MAPLE
A124625:=n->(n-(n-2)*(-1)^n)/2; seq(A124625(k), k=0..100); # Wesley Ivan Hurt, Oct 19 2013
MATHEMATICA
Join[{1}, Riffle[2Range[0, 50], 1]] (* Harvey P. Dale, Nov 02 2011 *)
PROG
(PARI) {for(n=0, 85, print1(if(n%2>0, n-1, 1), ", "))}
(Magma) &cat[[1, 2*k]: k in [0..42]];
(Python) print([(n-1)**(n%2) for n in range(0, 86)]) # Karl V. Keller, Jr., Jul 26 2020
CROSSREFS
Cf. A000012 (all 1's), A005843 (even numbers), A009531, A093178, A152271.
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jun 13 2007
EXTENSIONS
More terms from Klaus Brockhaus, Jun 16 2007
Edited by N. J. A. Sloane, May 21 2008 at the suggestion of R. J. Mathar
STATUS
approved
A241269 Denominator of c(n) = (n^2+n+2)/((n+1)*(n+2)*(n+3)). +10
8
3, 6, 15, 60, 105, 21, 126, 360, 495, 330, 429, 1092, 1365, 420, 1020, 2448, 2907, 1710, 1995, 4620, 5313, 759, 3450, 7800, 8775, 4914, 5481, 12180, 13485, 3720, 8184, 17952, 19635, 10710, 11655, 25308, 27417, 3705, 15990, 34440, 37023, 19866, 21285, 45540 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
All terms are multiples of 3.
Difference table of c(n):
1/3, 1/6, 2/15, 7/60, 2/21,...
-1/6, -1/30, -1/60, -1/84, -1/105,...
2/15, 1/60, 1/210, 1/420, 1/630,...
-7/60, -1/84, -1/420, -1/1260, -1/2520,... .
This is an autosequence of the second kind; the inverse binomial transform is the signed sequence. The main diagonal is the first upper diagonal multiplied by 2.
Denominators of the main diagonal: A051133(n+1).
Denominators of the first upper diagonal; A000911(n).
c(n) is a companion to A026741(n)/A045896(n).
Based on the Akiyama-Tanigawa transform applied to 1/(n+1) which yields the Bernoulli numbers A164555(n)/A027642(n).
Are the numerators of the main diagonal (-1)^n? If yes, what is the value of 1/3 - 1/30 + 1/210,... or 1 - 1/10 + 1/70 - 1/420, ... , from A002802(n)?
Is a(n+40) - a(n) divisible by 10?
No: a(5) = 21 but a(45) = 12972. # Robert Israel, Jul 17 2023
Are the common divisors to A014206(n) and A007531(n+3) of period 16: repeat 2, 4, 4, 2, 2, 16, 4, 2, 2, 4, 4, 2, 2, 8, 4, 2?
Reduce c(n) = f(n) = b(n)/a(n) = 1/3, 1/6, 2/15, 7/60, 11/105, 2/21, 11/126, 29/360, ... .
Consider the successively interleaved autosequences (also called eigensequences) of the second kind and of the first kind
1, 1/2, 1/3, 1/4, 1/5, 1/6, ...
0, 1/6, 1/6, 3/20, 2/15, 5/42, ...
1/3, 1/6, 2/15, 7/60, 11/105, 2/21, ...
0, 1/10, 1/10, 13/140, 3/35, 5/63, ...
1/5, 1/10, 3/35, 11/140, 23/315, 43/630, ...
0, 1/14, 1/14, 17/252, 4/63, ...
This array is Au1(m,n). Au1(0,0)=1, Au1(0,1)=1/2.
Au1(m+1,n) = 2*Au1(m,n+1) - Au1(m,n).
First row: see A003506, Leibniz's Harmonic Triangle.
Second row: A026741/A045896.
a(n) is the denominator of the third row f(n).
The first column is 1, 0, 1/3, 0, 1/5, 0, 1/7, 0, ... . Numerators: A093178(n+1). This incites, considering tan(1), to introduce before the first row
Ta0(n) = 0, 1/2, 1/2, 5/12, 1/3, 4/15, 13/60, 151/840, ... .
LINKS
FORMULA
c(n) = A014206(n)/A007531(n+3).
The sum of the difference table main diagonal is 1/3 - 1/30 + 1/210 - ... = 10*A086466-4 = 4*(sqrt(5)*log(phi)-1) = 0.3040894... - Jean-François Alcover, Apr 22 2014
a(n) = (n+1)*(n+2)*(n+3)/gcd(4*n - 4, n^2 + n + 2), where gcd(4*n - 4, n^2 + n + 2) is periodic with period 16. - Robert Israel, Jul 17 2023
MAPLE
seq(denom((n^2+n+2)/((n+1)*(n+2)*(n+3))), n=0..1000);
MATHEMATICA
Denominator[Table[(n^2+n+2)/Times@@(n+{1, 2, 3}), {n, 0, 50}]] (* Harvey P. Dale, Mar 27 2015 *)
PROG
(PARI) for(n=0, 100, print1(denominator((n^2+n+2)/((n+1)*(n+2)*(n+3))), ", ")) \\ Colin Barker, Apr 18 2014
KEYWORD
nonn,frac,look
AUTHOR
Paul Curtz, Apr 18 2014
EXTENSIONS
More terms from Colin Barker, Apr 18 2014
STATUS
approved
A009001 Expansion of e.g.f: (1+x)*cos(x). +10
6
1, 1, -1, -3, 1, 5, -1, -7, 1, 9, -1, -11, 1, 13, -1, -15, 1, 17, -1, -19, 1, 21, -1, -23, 1, 25, -1, -27, 1, 29, -1, -31, 1, 33, -1, -35, 1, 37, -1, -39, 1, 41, -1, -43, 1, 45, -1, -47, 1, 49, -1, -51, 1, 53, -1, -55, 1, 57, -1, -59, 1, 61, -1, -63, 1, 65, -1, -67, 1, 69, -1, -71, 1, 73, -1, -75, 1, 77, -1, -79, 1, 81, -1, -83, 1, 85 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
If signs are ignored, continued fraction for tan(1) (cf. A093178).
LINKS
FORMULA
a(n) = (-1)^(n/2) if n is even, n*(-1)^((n-1)/2) if n is odd.
a(n) = -a(n-2) if n is even, 2*a(n-1) - a(n-2) if n is odd. - Michael Somos, Jan 26 2014
From Henry Bottomley, Oct 19 2001: (Start)
a(n) = (n^n mod (n+1))*(-1)^floor(n/2) for n > 0.
a(n) = (-1)^n*(a(n-2) - a(n-1)) - a(n-3) for n > 2. (End)
G.f.: (1+x+x^2-x^3)/(1+x^2)^2.
E.g.f.: (1+x)*cos(x) = U(0) where U(k) = 1 + x - x^2/((2*k+1)*(2*k+2)) * U(k+1). - Sergei N. Gladkovskii, Oct 17 2012 [Edited by Michael Somos, Jan 26 2014]
From James C. McMahon, Oct 12 2023: (Start)
a(0) = 1; for n > 1,
a(n) = a(n-1) * n if n mod 4 = 1,
a(n-1) - n if n mod 4 = 2,
a(n-1) * n if n mod 4 = 3,
a(n-1) + n if n mod 4 = 4. (End)
EXAMPLE
tan(1) = 1.557407724654902230... = 1 + 1/(1 + 1/(1 + 1/(3 + 1/(1 + ...)))). - Harry J. Smith, Jun 15 2009
G.f. = 1 + x - x^2 - 3*x^3 + x^4 + 5*x^5 - x^6 - 7*x^7 + x^8 + 9*x^9 - x^10 + ...
MAPLE
seq(coeff(series(factorial(n)*(1+x)*cos(x), x, n+1), x, n), n=0..90); # Muniru A Asiru, Jul 21 2018
MATHEMATICA
With[{nn=90}, CoefficientList[Series[(1+x)Cos[x], {x, 0, nn}], x]Range[0, nn]!] (* Harvey P. Dale, Jul 15 2012 *)
LinearRecurrence[{0, -2, 0, -1}, {1, 1, -1, -3}, 100] (* Jean-François Alcover, Feb 21 2020 *)
FoldList[If[Mod[#2, 4]==1, #1*#2, If[Mod[#2, 4]==2, #1-#2, If[Mod[#2, 4] ==3, #1*#2, #1+#2]]]&, 1, Range[1, 85]] (* James C. McMahon, Oct 12 2023 *)
PROG
(PARI) {a(n) = (-1)^(n\2) * if( n%2, n, 1)} /* Michael Somos, Oct 16 2006 */
(PARI) { allocatemem(932245000); default(realprecision, 79000); x=contfrac(tan(1)); for (n=0, 20000, write("b009001.txt", n, " ", (-1)^(n\2)*x[n+1])); } \\ Harry J. Smith, Jun 15 2009
(Magma) m:=50; R<x>:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!((1+x)*Cos(x))); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, Jul 21 2018
CROSSREFS
Cf. A009531, A049471 (decimal expansion of tan(1)).
KEYWORD
sign,easy,nice
AUTHOR
EXTENSIONS
Formula corrected by Olivier Gérard, Mar 15 1997
Definition clarified by Harvey P. Dale, Jul 15 2012
STATUS
approved
A224344 Number T(n,k) of compositions of n using exactly k primes (counted with multiplicity); triangle T(n,k), n>=0, 0<=k<=floor(n/2), read by rows. +10
6
1, 1, 1, 1, 1, 3, 2, 5, 1, 3, 8, 5, 5, 13, 13, 1, 7, 23, 27, 7, 11, 39, 52, 25, 1, 17, 65, 99, 66, 9, 27, 106, 186, 151, 41, 1, 40, 177, 340, 323, 133, 11, 61, 293, 608, 666, 358, 61, 1, 92, 482, 1076, 1330, 867, 236, 13, 142, 781, 1894, 2581, 1971, 737, 85, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
LINKS
FORMULA
Sum_{k=1..floor(n/2)} k * T(n,k) = A102291(n).
EXAMPLE
A(5,1) = 8: [2,1,1,1], [1,2,1,1], [1,1,2,1], [1,1,1,2], [3,1,1], [1,3,1], [1,1,3], [5].
Triangle T(n,k) begins:
1;
1;
1, 1;
1, 3;
2, 5, 1;
3, 8, 5;
5, 13, 13, 1;
7, 23, 27, 7;
11, 39, 52, 25, 1;
17, 65, 99, 66, 9;
27, 106, 186, 151, 41, 1;
40, 177, 340, 323, 133, 11;
...
MAPLE
T:= proc(n) option remember; local j; if n=0 then 1
else []; for j to n do zip((x, y)->x+y, %,
[`if`(isprime(j), 0, NULL), T(n-j)], 0) od; %[] fi
end:
seq(T(n), n=0..16);
MATHEMATICA
zip[f_, x_List, y_List, z_] := With[{m = Max[Length[x], Length[y]]}, Thread[f[PadRight[x, m, z], PadRight[y, m, z]]]]; T[n_] := T[n] = Module[{j, pc}, If[n == 0, {1}, pc = {}; For[j = 1, j <= n, j++, pc = zip[Plus, pc, Join[If[PrimeQ[j], {0}, {}], T[n-j]], 0]]; pc]]; Table[T[n], {n, 0, 16}] // Flatten (* Jean-François Alcover, Jan 29 2014, after Alois P. Heinz *)
CROSSREFS
Column k=0 gives: A052284.
Row sums are: A011782.
Row lengths are: A008619.
T(floor(n/2)) = A093178(n).
T(2n,n-1) = A001844(n-1) for n>0.
KEYWORD
nonn,tabf
AUTHOR
Alois P. Heinz, May 23 2013
STATUS
approved
A019426 Continued fraction for tan(1/3). +10
4
0, 2, 1, 7, 1, 13, 1, 19, 1, 25, 1, 31, 1, 37, 1, 43, 1, 49, 1, 55, 1, 61, 1, 67, 1, 73, 1, 79, 1, 85, 1, 91, 1, 97, 1, 103, 1, 109, 1, 115, 1, 121, 1, 127, 1, 133, 1, 139, 1, 145, 1, 151, 1, 157, 1, 163, 1, 169, 1, 175, 1, 181, 1, 187, 1, 193, 1, 199, 1, 205, 1, 211, 1, 217, 1, 223, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
The simple continued fraction expansion of 3*tan(1/3) is [1; 25, 1, 3, 1, 61, 1, 7, 1, 97, 1, 11, 1, ..., 36*n + 25, 1, 4*n + 3, 1, ...], while the simple continued fraction expansion of (1/3)*tan(1/3) is [0; 8, 1, 1, 1, 43, 1, 5, 1, 79, 1, 9, 1, 115, 1, 13, 1, ..., 36*n + 7, 1, 4*n + 1, 1, ...]. See my comment in A019425. - Peter Bala, Sep 30 2023
LINKS
G. Xiao, Contfrac
FORMULA
From Bruno Berselli, Sep 21 2012: (Start)
G.f.: x*(2+x+3*x^2-x^3+x^4)/(1-x^2)^2.
a(n) = 2*a(n-2)-a(n-4) with n>4, a(0)=0, a(1)=2, a(2)=1, a(3)=7, a(4)=1.
a(n) = 1+3*(1-(-1)^n)*(n-1)/2 with n>1, a(0)=0, a(1)=2.
For k>0: a(2k) = 1, a(4k+1) = 2*a(2k+1)-1 and a(4k+3) = 2*a(2k+1)+5, with a(0)=0, a(1)=2. (End)
EXAMPLE
0.346253549510575491038543565... = 0 + 1/(2 + 1/(1 + 1/(7 + 1/(1 + ...)))). - Harry J. Smith, Jun 13 2009
MATHEMATICA
ContinuedFraction[Tan[1/3], 80] (* Bruno Berselli, Sep 21 2012 *)
PROG
(PARI) { allocatemem(932245000); default(realprecision, 88000); x=contfrac(tan(1/3)); for (n=0, 20000, write("b019426.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 13 2009
(Magma) [n le 1 select 2*n else 1+3*(1-(-1)^n)*(n-1)/2: n in [0..80]]; // Bruno Berselli, Sep 21 2012
CROSSREFS
Cf. A161012 (decimal expansion of tan(1/3)).
Cf. continued fractions for tan(1/m): A019425 (m=2), A019427 (m=4), A019428 (m=5), A019429 (m=6), A019430 (m=7), A019431 (m=8), A019432 (m=9), A019433 (m=10), A093178 (m=1).
KEYWORD
nonn,easy,cofr
AUTHOR
STATUS
approved
page 1 2 3

Search completed in 0.013 seconds

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 29 23:34 EDT 2024. Contains 375520 sequences. (Running on oeis4.)