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-10 of 13 results. Next

A100047 A Chebyshev transform of the Fibonacci numbers.

Original entry on oeis.org

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

Views

Author

Paul Barry, Oct 31 2004

Keywords

Comments

Multiplicative with a(p^e) = (-1)^(e+1) if p = 2, 0 if p = 5, 1 if p == 1 or 9 (mod 10), (-1)^e if p == 3 or 7 (mod 10). - David W. Wilson, Jun 10 2005
This sequence is a divisibility sequence, i.e., a(n) divides a(m) whenever n divides m. Case P1 = 1, P2 = -1, Q = 1 of the 3 parameter family of 4th-order linear divisibility sequences found by Williams and Guy. - Peter Bala, Mar 24 2014
From Peter Bala, Mar 24 2014: (Start)
This is the particular case P1 = 1, P2 = -1, Q = 1 of the following results:
Let P1, P2 and Q be integers. Let alpha and beta denote the roots of the quadratic equation x^2 - 1/2*P1*x + 1/4*P2 = 0. Let T(n,x;Q) denote the bivariate Chebyshev polynomial of the first kind defined by T(n,x;Q) = 1/2*( (x + sqrt(x^2 - Q))^n + (x - sqrt(x^2 - Q))^n ) (when Q = 1, T(n,x;Q) reduces to the ordinary Chebyshev polynomial of the first kind T(n,x)). Then we have
1) The sequence A(n) := ( T(n,alpha;Q) - T(n,beta;Q) )/(alpha - beta) is a linear divisibility sequence of the fourth order.
2) A(n) belongs to the 3-parameter family of fourth-order divisibility sequences found by Williams and Guy.
3) The o.g.f. of the sequence A(n) is the rational function x*(1 - Q*x^2)/(1 - P1*x + (P2 + 2*Q)*x^2 - P1*Q*x^3 + Q^2*x^4).
4) The o.g.f. is the Chebyshev transform of the rational function x/(1 - P1*x + P2*x^2), where the Chebyshev transform takes the function A(x) to the function (1 - Q*x^2)/(1 + Q*x^2)*A(x/(1 + Q*x^2)).
5) Let q = sqrt(Q) and set a = sqrt( q + (P2)/(4*q) + (P1)/2 ) and b = sqrt( q + (P2)/(4*q) - (P1)/2 ). Then the o.g.f. of the sequence A(n) is the Hadamard product of the rational functions x/(1 - (a + b)*x + q*x^2) and x/(1 - (a - b)*x + q*x^2). Thus A(n) is the product of two (usually, non-integer) Lucas-type sequences.
6) A(n) = the bottom left entry of the 2 X 2 matrix 2*T(n,1/2*M;Q), where M is the 2 X 2 matrix [0, -P2; 1, P1].
For examples of the above see A006238, A054493, A078070, A092184, A098306, A100048, A108196, A138573, A152090 and A218134. (End)

Examples

			A Chebyshev transform of the Fibonacci numbers A000045: if A(x) is the g.f. of a sequence, map it to ((1-x^2)/(1+x^2))A(x/(1+x^2)).
The denominator is the 10th cyclotomic polynomial.
G.f. = x + x^2 - x^3 - x^4 - x^6 - x^7 + x^8 + x^9 + x^11 + x^12 - x^13 + ...
		

Crossrefs

Programs

  • Maple
    a := n -> (-1)^iquo(n, 5)*signum(mods(n, 5)):
    seq(a(n), n=0..89); # after Michael Somos, Peter Luschny, Dec 30 2018
  • Mathematica
    a[ n_] := {1, 1, -1, -1, 0, -1, -1, 1, 1, 0}[[Mod[ n, 10, 1]]]; (* Michael Somos, May 24 2015 *)
    a[ n_] := (-1)^Quotient[ n, 5] Sign[ Mod[ n, 5, -2]]; (* Michael Somos, May 24 2015 *)
    a[ n_] := (-1)^Quotient[n, 5] {1, 1, -1, -1, 0}[[Mod[ n, 5, 1]]]; (* Michael Somos, May 24 2015 *)
    LinearRecurrence[{1, -1, 1, -1}, {0, 1, 1, -1}, 90] (* Jean-François Alcover, Jun 11 2019 *)
  • PARI
    {a(n) = (-1)^(n\5) * [0, 1, 1, -1, -1][n%5+1]}; /* Michael Somos, May 24 2015 */
    
  • PARI
    {a(n) = (-1)^(n\5) * sign( centerlift( Mod(n, 5)))}; /* Michael Somos, May 24 2015 */

Formula

G.f.: x*(1 - x^2)/(1 - x + x^2 - x^3 + x^4).
a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4).
a(n) = n*Sum_{k=0..floor(n/2)} (-1)^k *binomial(n-k, k)*A000045(n-2*k)/(n -k).
From Peter Bala, Mar 24 2014: (Start)
a(n) = (T(n,alpha) - T(n,beta))/(alpha - beta), where alpha = (1 + sqrt(5))/4 and beta = (1 - sqrt(5))/4 and T(n,x) denotes the Chebyshev polynomial of the first kind.
a(n) = bottom left entry of the matrix T(n, M), where M is the 2 X 2 matrix [0, 1/4; 1, 1/2].
The o.g.f. is the Hadamard product of the rational functions x/(1 - 1/2*(sqrt(5) + 1)*x + x^2) and x/(1 - 1/2*(sqrt(5) - 1)*x + x^2). (End)
Euler transform of length 10 sequence [ 1, -2, 0, 0, -1, 0, 0, 0, 0, 1]. - Michael Somos, May 24 2015
a(n) = a(-n) = -a(n + 5) for all n in Z. - Michael Somos, May 24 2015
|A011558(n)| = |A080891(n)| = |a(n)| = A244895(n). - Michael Somos, May 24 2015

A153091 a(n) = least positive k such that k*5^n*(5^n-1)+j is prime, with j = -1 or 1 or both.

Original entry on oeis.org

1, 1, 3, 1, 2, 5, 5, 1, 2, 2, 18, 12, 12, 7, 1, 1, 4, 1, 9, 2, 36, 10, 70, 1, 3, 16, 6, 3, 2, 9, 74, 4, 6, 19, 20, 8, 14, 2, 2, 62, 3, 29, 47, 11, 47, 16, 58, 1, 49, 18, 51, 3, 12, 5, 18, 23, 1, 19, 54, 7, 35, 12, 7, 1, 12, 3, 5, 121, 70, 89, 12, 61, 33, 36, 9, 17, 135, 35, 21, 23, 20, 86, 18
Offset: 1

Views

Author

Pierre CAMI, Dec 18 2008

Keywords

Examples

			For n = 1, 1*5^1*(5^1-1)-1 = 19 is prime, so a(1) = 1.
For n = 2, 1*5^2*(5^2-1)-1 = 599 is prime, as well as 1*5^2*(5^2-1)+1 = 601, so a(2) = 1.
For n = 3, k = 3 is the least k satisfying the required condition: 3*5^3*(5^3-1)-1 = 46499 is prime, so a(3) = 3.
		

Crossrefs

Programs

  • Mathematica
    A153091[n_] := Module[{k = 0}, While[NoneTrue[++k*# + {-1, 1}, PrimeQ]] & [5^n*(5^n - 1)]; k];
    Array[A153091, 100] (* Paolo Xausa, Jun 30 2025 *)

Formula

Limit_{n->oo} ( (Sum_{i=1..n} a(i)) / (n*(n+1)/2) ) = 13*log(5)/40.
Limit_{n->oo} ( (Sum_{i=1..n} a(2*i)) / (n*(n+1)) ) = log(5)/4.
Limit_{n->oo} ( (Sum_{i=1..n} a(2*i+1)) / (n*(n+2)) ) = 2*log(5)/5.

Extensions

a(5) corrected by Paolo Xausa, Jun 30 2025

A153092 Least k(n) such that k(n)*6^n*(6^n-1)+j is prime with j= -1 or 1 or both.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 3, 2, 20, 4, 5, 2, 9, 2, 27, 7, 12, 3, 3, 2, 3, 6, 6, 1, 18, 8, 2, 17, 2, 14, 55, 1, 18, 4, 59, 18, 30, 26, 32, 3, 14, 59, 42, 35, 40, 22, 7, 17, 26, 6, 28, 3, 15, 11, 6, 32, 30, 18, 14, 4, 85, 3, 1, 65, 13, 64, 7, 18, 40, 8, 68, 5, 5, 6, 107, 7, 88, 25, 6, 3, 1, 21, 8, 12, 9
Offset: 1

Views

Author

Pierre CAMI, Dec 18 2008

Keywords

Comments

When n increases sum k(n) for i=1 to n / sum n for i=1 to n tends to 2*log(6)/9.

Examples

			1*6^1*(6^1-1)-1=29 prime as 31 so k(1)=1.
		

Crossrefs

Programs

  • Mathematica
    lkn[n_]:=Module[{c=6^n (6^n-1),k=1},While[NoneTrue[k*c+{1,-1},PrimeQ],k++];k]; Array[lkn,90] (* Harvey P. Dale, Feb 29 2024 *)

A153093 Least k(n) such that k(n)*7^n*(7^n-1)+j is prime with j= -1 or 1 or both.

Original entry on oeis.org

1, 1, 1, 2, 9, 1, 2, 1, 1, 5, 13, 1, 6, 1, 6, 14, 4, 4, 7, 5, 6, 5, 12, 3, 6, 3, 9, 3, 20, 9, 14, 7, 43, 22, 5, 11, 4, 4, 48, 14, 8, 56, 36, 7, 83, 47, 47, 1, 2, 74, 15, 12, 22, 15, 17, 47, 20, 20, 5, 8, 12, 26, 6, 26, 55, 16, 32, 45, 24, 46, 19, 58, 6, 29, 19, 26, 83, 45, 17, 48, 6, 16, 152
Offset: 1

Views

Author

Pierre CAMI, Dec 18 2008

Keywords

Comments

When n increases sum k(n) for i=1 to n / sum n for i=1 to n tends to log(7)/3.7.

Examples

			1*7^1*(7^1-1)-1=41 prime as 43 so k(1)=1.
		

Crossrefs

A153094 Least k(n) such that k(n)*m^n*(m^n-1)+j is prime with j= -1 or 1 or both and 1

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 2, 1, 1, 1, 4, 1, 1, 1, 3, 5, 2, 1, 1, 3, 2, 2, 2, 9, 6, 1, 6, 4, 1, 1, 4, 1, 2, 2, 3, 6, 6, 5, 1, 5, 5, 1, 2, 1, 10, 3, 5, 1, 3, 2, 1, 4, 5, 2, 2, 3, 1, 1, 2, 3, 5, 5, 6, 1, 12, 3, 5, 6, 1, 2, 9, 3, 4, 1, 1, 5, 2, 3, 4, 7, 2, 2, 16, 8, 5, 1, 5, 5, 6, 3, 2, 11, 2, 2
Offset: 1

Views

Author

Pierre CAMI, Dec 18 2008

Keywords

Comments

when n increases sum k(n) for i=1 to n / sum n for i=1 to n tends to 0.05, 0

Examples

			1*2^1*(2^1-1)+1=3 prime so k(1)=1
		

A153095 Least m(n) such that k(n)*m(n)^n*(m(n)^n-1)+j is prime with j= -1 or 1 or both and least possible k(n) with 1

Original entry on oeis.org

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

Author

Pierre CAMI, Dec 18 2008

Keywords

Examples

			1*2^1*(2^1-1)+1=3 prime so m(1)=2 1*2^2*(2^2-1)-1=11 as 13 so m(2)=2 1*2^3*(2^3-1)-1=55 composite 1*2^3*(2^3-1)+1=57 composite 1*3^3*(3^3-1)-1=71 prime as 73 so m(3)=3
		

A140824 Expansion of (x-x^3)/(1-3*x+2*x^2-3*x^3+x^4).

Original entry on oeis.org

0, 1, 3, 6, 15, 41, 108, 281, 735, 1926, 5043, 13201, 34560, 90481, 236883, 620166, 1623615, 4250681, 11128428, 29134601, 76275375, 199691526, 522799203, 1368706081, 3583319040, 9381251041, 24560434083, 64300051206, 168339719535, 440719107401, 1153817602668
Offset: 0

Author

N. J. A. Sloane, Sep 07 2009, based on email from R. K. Guy, Mar 09 2009

Keywords

Comments

Case P1 = 3, P2 = 0, Q = 1 of the 3 parameter family of 4th-order linear divisibility sequences found by Williams and Guy. - Peter Bala, Mar 25 2014

Programs

  • Mathematica
    LinearRecurrence[{3, -2, 3, -1}, {0, 1, 3, 6}, 50] (* G. C. Greubel, Aug 08 2017 *)
  • PARI
    x='x+O('x^50); concat([0], Vec((x-x^3)/(1-3*x+2*x^2-3*x^3+x^4))) \\ G. C. Greubel, Aug 08 2017

Formula

a(0) = 0, a(1) = 1, a(2) = 3, a(3) = 6, a(n) - 3 a(n + 1) + 2 a(n + 2) - 3 a(n + 3) + a(n + 4) = 0.
From Peter Bala, Mar 25 2014: (Start)
a(n) = 2/3*( T(n,3/2) - T(n,0) ), where T(n,x) is a Chebyshev polynomial of the first kind.
a(n) = 1/3 * (A005248(n) - (i^n + (-i)^n)) = 1/3 * (Fibonacci(2*n-1) + Fibonacci(2*n+1) - (i^n + (-i)^n)).
a(n) = bottom left entry of the 2 X 2 matrix 2*T(n, 1/2*M), where M is the 2 X 2 matrix [0, 0; 1, 3].
The o.g.f. is the Hadamard product of the rational functions x/(1 - 1/sqrt(2)*(sqrt(5) + i)*x + x^2) and x/(1 - 1/sqrt(2)*(sqrt(5) - i)*x + x^2). See the remarks in A100047 for the general connection between Chebyshev polynomials and 4th-order linear divisibility sequences. (End)
a(n) = A099483(n) - A099483(n-2). - R. J. Mathar, Feb 10 2016

A171064 G.f.: -x*(x-1)*(1+x)/(1-x-7*x^2-x^3+x^4).

Original entry on oeis.org

0, 1, 1, 7, 15, 64, 175, 631, 1905, 6433, 20224, 66529, 212625, 692119, 2226799, 7217728, 23284815, 75343591, 243328225, 786800449, 2542156800, 8217744577, 26556314401, 85835882791, 277405671375, 896595420736, 2897714688751
Offset: 0

Author

R. J. Mathar, at the request of R. K. Guy, Sep 03 2010

Keywords

Comments

The member k=7 of a family of sequences starting 0,1,1,k with recurrence a(n) = a(n-1)+k*a(n-2)+a(n-3)-a(n-4).

Crossrefs

Cf. A116201 (k=1), A105309 (k=2), A152090 (k=3), A007598 (k=4), A005178 (k=5), A003757 (k=6).

Programs

  • Magma
    I:=[0, 1, 1, 7]; [n le 4 select I[n] else Self(n-1) + 7*Self(n-2) + Self(n-3) - Self(n-4): n in [1..30]]; // Vincenzo Librandi, Dec 19 2012
  • Mathematica
    CoefficientList[Series[-x*(x - 1)*(1 + x)/(1 - x - 7*x^2 - x^3 + x^4), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 19 2012 *)
    LinearRecurrence[{1,7,1,-1},{0,1,1,7},30] (* Harvey P. Dale, Nov 15 2020 *)

Formula

a(n) = +a(n-1) +7*a(n-2) +a(n-3) -a(n-4).
The roots (r1..r4) of the characteristic polynomials for this "family" of sequences have the following form (not simplified) for k= 1,2,3,4,5,6.... r1=(sqrt(4*k+10+2*sqrt(4*k+9))+sqrt(4*k-6+2*sqrt(4*k+9)))/4. r2=(sqrt(4*k+10+2*sqrt(4*k+9))-sqrt(4*k-6+2*sqrt(4*k+9)))/4. r3=(-sqrt(4*k+10-2*sqrt(4*k+9))-sqrt(4*k-6-2*sqrt(4*k+9)))/4. r4=(-sqrt(4*k+10-2*sqrt(4*k+9))+sqrt(4*k-6-2*sqrt(4*k+9)))/4. For k=1,2,3, r3 and r4 are complex . Closed-form (not simplified) is as follows for all k (note:for k1-k3 set r3 and r4 =0 and round a(n) to nearest integer): a(n)=sqrt(4*k+9)/(4*k+9)*(((r1)^n+(r2)^n)-((r3)^n+(r4)^n)). [Tim Monahan, Sep 17 2011]

A171065 G.f. -x*(x-1)*(1+x)/(1-x-8*x^2-x^3+x^4).

Original entry on oeis.org

0, 1, 1, 8, 17, 81, 224, 881, 2737, 9928, 32481, 113761, 380800, 1313441, 4441121, 15215688, 51677297, 176530481, 600723424, 2049428881, 6980069457, 23799693448, 81088954561, 276417142721, 941948403200, 3210574806081
Offset: 0

Author

R. J. Mathar, at the request of R. K. Guy, Sep 03 2010

Keywords

Comments

The member k=8 of a family of sequences starting 0,1,1,k with recurrence a(n) = a(n-1)+k*a(n-2)+a(n-3)-a(n-4).
This is the case P1 = 1, P2 = -10, Q = 1 of the 3 parameter family of 4th-order linear divisibility sequences found by Williams and Guy. - Peter Bala, Mar 31 2014

Crossrefs

Cf. A116201 (k=1), A105309 (k=2), A152090 (k=3), A007598 (k=4), A005178 (k=5), A003757 (k=6). A100047.

Programs

  • Magma
    I:=[0, 1, 1, 8]; [n le 4 select I[n] else Self(n-1) + 8*Self(n-2) + Self(n-3) - Self(n-4): n in [1..30]]; // Vincenzo Librandi, Dec 19 2012
  • Mathematica
    CoefficientList[Series[-x*(x - 1)*(1 + x)/(1 - x - 8*x^2 - x^3 + x^4), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 19 2012 *)
    LinearRecurrence[{1,8,1,-1},{0,1,1,8},30] (* Harvey P. Dale, Dec 27 2017 *)

Formula

a(n)= +a(n-1) +8*a(n-2) +a(n-3) -a(n-4).
From Peter Bala, Mar 31 2014: (Start)
a(n) = ( T(n,alpha) - T(n,beta) )/(alpha - beta), where alpha = (1 + sqrt(41))/4 and beta = (1 - sqrt(41))/4 and T(n,x) denotes the Chebyshev polynomial of the first kind.
a(n) = the bottom left entry of the 2 X 2 matrix T(n, M), where M is the 2 X 2 matrix [0, 5/2; 1, 1/2].
a(n) = U(n-1,i*(1 + sqrt(2))/2)*U(n-1,i*(1 + sqrt(2))/2), where U(n,x) denotes the Chebyshev polynomial of the second kind.
See the remarks in A100047 for the general connection between Chebyshev polynomials and 4th-order linear divisibility sequences. (End)

A171066 G.f. -x*(x-1)*(1+x)/(1-x-9*x^2-x^3+x^4).

Original entry on oeis.org

0, 1, 1, 9, 19, 100, 279, 1189, 3781, 14661, 49600, 184141, 641421, 2333629, 8240959, 29700900, 105561739, 378777169, 1350292761, 4835148121, 17260998400, 61748847081, 220582688041, 788748162049, 2818480203099, 10076047502500
Offset: 0

Author

R. J. Mathar, at the request of R. K. Guy, Sep 03 2010

Keywords

Comments

The member k=9 of a family of sequences starting 0,1,1,k with recurrence a(n) = a(n-1)+k*a(n-2)+a(n-3)-a(n-4).

Crossrefs

Cf. A116201 (k=1), A105309 (k=2), A152090 (k=3), A007598 (k=4), A005178 (k=5), A003757 (k=6).

Programs

  • Magma
    I:=[0, 1, 1, 9]; [n le 4 select I[n] else Self(n-1) + 9*Self(n-2) + Self(n-3) - Self(n-4): n in [1..30]]; // Vincenzo Librandi, Dec 19 2012
  • Mathematica
    CoefficientList[Series[-x*(x - 1)*(1 + x)/(1 - x - 9*x^2 - x^3 + x^4), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 19 2012 *)

Formula

a(n)= +a(n-1) +9*a(n-2) +a(n-3) -a(n-4)
Showing 1-10 of 13 results. Next