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 21-30 of 30 results.

A099173 Array, A(k,n), read by diagonals: g.f. of k-th row x/(1-2*x-(k-1)*x^2).

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 4, 4, 0, 1, 2, 5, 8, 5, 0, 1, 2, 6, 12, 16, 6, 0, 1, 2, 7, 16, 29, 32, 7, 0, 1, 2, 8, 20, 44, 70, 64, 8, 0, 1, 2, 9, 24, 61, 120, 169, 128, 9, 0, 1, 2, 10, 28, 80, 182, 328, 408, 256, 10, 0, 1, 2, 11, 32, 101, 256, 547, 896, 985, 512, 11
Offset: 0

Views

Author

Ralf Stephan, Oct 13 2004

Keywords

Examples

			Square array, A(n, k), begins as:
  0, 1, 2,  3,  4,   5,    6,    7,     8, ... A001477;
  0, 1, 2,  4,  8,  16,   32,   64,   128, ... A000079;
  0, 1, 2,  5, 12,  29,   70,  169,   408, ... A000129;
  0, 1, 2,  6, 16,  44,  120,  328,   896, ... A002605;
  0, 1, 2,  7, 20,  61,  182,  547,  1640, ... A015518;
  0, 1, 2,  8, 24,  80,  256,  832,  2688, ... A063727;
  0, 1, 2,  9, 28, 101,  342, 1189,  4088, ... A002532;
  0, 1, 2, 10, 32, 124,  440, 1624,  5888, ... A083099;
  0, 1, 2, 11, 36, 149,  550, 2143,  8136, ... A015519;
  0, 1, 2, 12, 40, 176,  672, 2752, 10880, ... A003683;
  0, 1, 2, 13, 44, 205,  806, 3457, 14168, ... A002534;
  0, 1, 2, 14, 48, 236,  952, 4264, 18048, ... A083102;
  0, 1, 2, 15, 52, 269, 1110, 5179, 22568, ... A015520;
  0, 1, 2, 16, 56, 304, 1280, 6208, 27776, ... A091914;
Antidiagonal triangle, T(n, k), begins as:
  0;
  0,  1;
  0,  1,  2;
  0,  1,  2,  3;
  0,  1,  2,  4,  4;
  0,  1,  2,  5,  8,  5;
  0,  1,  2,  6, 12, 16,   6;
  0,  1,  2,  7, 16, 29,  32,   7;
  0,  1,  2,  8, 20, 44,  70,  64,   8;
  0,  1,  2,  9, 24, 61, 120, 169, 128,   9;
  0,  1,  2, 10, 28, 80, 182, 328, 408, 256,  10;
		

Crossrefs

Rows m: A001477 (m=0), A000079 (m=1), A000129 (m=2), A002605 (m=3), A015518 (m=4), A063727 (m=5), A002532 (m=6), A083099 (m=7), A015519 (m=8), A003683 (m=9), A002534 (m=10), A083102 (m=11), A015520 (m=12), A091914 (m=13).
Columns q: A000004 (q=0), A000012 (q=1), A009056 (q=2), A008586 (q=3).
Main diagonal gives A357502.

Programs

  • Magma
    A099173:= func< n,k | (&+[n^j*Binomial(k,2*j+1): j in [0..Floor(k/2)]]) >;
    [A099173(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Feb 17 2023
    
  • Mathematica
    A[k_, n_]:= Which[k==0, n, n==0, 0, True, ((1+Sqrt[k])^n - (1-Sqrt[k])^n)/(2 Sqrt[k])]; Table[A[k-n, n]//Simplify, {k, 0, 12}, {n, 0, k}]//Flatten (* Jean-François Alcover, Jan 21 2019 *)
  • PARI
    A(k,n)=sum(i=0,n\2,k^i*binomial(n,2*i+1))
    
  • SageMath
    def A099173(n,k): return sum( n^j*binomial(k, 2*j+1) for j in range((k//2)+1) )
    flatten([[A099173(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Feb 17 2023

Formula

A(n, k) = Sum_{i=0..floor(k/2)} n^i * C(k, 2*i+1) (array).
Recurrence: A(n, k) = 2*A(n, k-1) + (n-1)*A(n, k-2), with A(n, 0) = 0, A(n, 1) = 1.
T(n, k) = A(n-k, k) (antidiagonal triangle).
T(2*n, n) = A357502(n).
A(n, k) = ((1+sqrt(n))^k - (1-sqrt(n))^k)/(2*sqrt(n)). - Jean-François Alcover, Jan 21 2019

A164539 a(n) = 2*a(n-1) + 7*a(n-2) for n > 1; a(0) = 1, a(1) = 13.

Original entry on oeis.org

1, 13, 33, 157, 545, 2189, 8193, 31709, 120769, 463501, 1772385, 6789277, 25985249, 99495437, 380887617, 1458243293, 5582699905, 21373102861, 81825105057, 313261930141, 1199299595681, 4591432702349, 17577962574465, 67295954065373
Offset: 0

Views

Author

Al Hakanson (hawkuu(AT)gmail.com), Aug 15 2009

Keywords

Comments

Binomial transform of A164675. Inverse binomial transform of A164540.
Pisano period lengths: 1, 1, 8, 1, 24, 8, 3, 2, 24, 24, 15, 8, 168, 3, 24, 2, 4, 24, 120, 24, ... - R. J. Mathar, Aug 10 2012

Crossrefs

Programs

  • Magma
    Z:=PolynomialRing(Integers()); N:=NumberField(x^2-2); S:=[ ((1+3*r)*(1+2*r)^n+(1-3*r)*(1-2*r)^n)/2: n in [0..23] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Aug 20 2009
  • Mathematica
    LinearRecurrence[{2,7},{1,13},50] (* Harvey P. Dale, Oct 16 2011 *)

Formula

a(n) = 2*a(n-1) + 7*a(n-2) for n > 1; a(0) = 1, a(1) = 13.
G.f.: (1+11*x)/(1-2*x-7*x^2).
a(n) = ((1+3*sqrt(2))*(1+2*sqrt(2))^n + (1-3*sqrt(2))*(1-2*sqrt(2))^n)/2.
a(n) = 11*A015519(n) + A015519(n+1). - R. J. Mathar, Aug 10 2012

Extensions

Edited and extended beyond a(5) by Klaus Brockhaus, Aug 20 2009

A109447 Binomial coefficients C(n,k) with n-k odd, read by rows.

Original entry on oeis.org

1, 2, 1, 3, 4, 4, 1, 10, 5, 6, 20, 6, 1, 21, 35, 7, 8, 56, 56, 8, 1, 36, 126, 84, 9, 10, 120, 252, 120, 10, 1, 55, 330, 462, 165, 11, 12, 220, 792, 792, 220, 12, 1, 78, 715, 1716, 1287, 286, 13, 14, 364, 2002, 3432, 2002, 364, 14, 1, 105, 1365, 5005, 6435, 3003, 455, 15
Offset: 1

Views

Author

Philippe Deléham, Aug 27 2005

Keywords

Comments

The same as A119900 without 0's. A reflected version of A034867 or A202064. - Alois P. Heinz, Feb 07 2014
From Vladimir Shevelev, Feb 07 2014: (Start)
Also table of coefficients of polynomials P_1(x)=1, P_2(x)=2, for n>=2, P_(n+1)(x) = 2*P_n(x)+(x-1)* P_(n-1)(x). The polynomials P_n(x)/2^(n-1) are connected with sequences A000045 (x=5), A001045 (x=9), A006130 (x=13), A006131 (x=17), A015440 (x=21), A015441 (x=25), A015442 (x=29), A015443 (x=33), A015445 (x=37), A015446 (x=41), A015447 (x=45), A053404 (x=49); also the polynomials P_n(x) are connected with sequences A000129, A002605, A015518, A063727, A085449, A002532, A083099, A015519, A003683, A002534, A083102, A015520. (End)

Examples

			Starred terms in Pascal's triangle (A007318), read by rows:
1;
1*, 1;
1, 2*, 1;
1*, 3, 3*, 1;
1, 4*, 6, 4*, 1;
1*, 5, 10*, 10, 5*, 1;
1, 6*, 15, 20*, 15, 6*, 1;
1*, 7, 21*, 35, 35*, 21, 7*, 1;
1, 8*, 28, 56*, 70, 56*, 28, 8*, 1;
1*, 9, 36*, 84, 126*, 126, 84*, 36, 9*, 1;
Triangle T(n,k) begins:
1;
2;
1,    3;
4,    4;
1,   10,  5;
6,   20,  6;
1,   21,  35,   7;
8,   56,  56,   8;
1,   36, 126,  84,  9;
10, 120, 252, 120, 10;
		

Crossrefs

Cf. A109446.

Programs

  • Maple
    T:= (n, k)-> binomial(n, 2*k+1-irem(n, 2)):
    seq(seq(T(n, k), k=0..ceil((n-2)/2)), n=1..20);  # Alois P. Heinz, Feb 07 2014
  • Mathematica
    Flatten[ Table[ If[ OddQ[n - k], Binomial[n, k], {}], {n, 0, 15}, {k, 0, n}]] (* Robert G. Wilson v *)

Extensions

More terms from Robert G. Wilson v, Aug 30 2005
Corrected offset by Alois P. Heinz, Feb 07 2014

A160444 Expansion of g.f.: x^2*(1 + x - x^2)/(1 - 2*x^2 - 2*x^4).

Original entry on oeis.org

0, 1, 1, 1, 2, 4, 6, 10, 16, 28, 44, 76, 120, 208, 328, 568, 896, 1552, 2448, 4240, 6688, 11584, 18272, 31648, 49920, 86464, 136384, 236224, 372608, 645376, 1017984, 1763200, 2781184, 4817152, 7598336, 13160704, 20759040, 35955712, 56714752
Offset: 1

Views

Author

Willibald Limbrunner (w.limbrunner(AT)gmx.de), May 14 2009

Keywords

Comments

This sequence is the case k=3 of a family of sequences with recurrences a(2*n+1) = a(2*n) + a(2*n-1), a(2*n+2) = k*a(2*n-1) + a(2*n), a(1)=0, a(2)=1. Values of k, for k >= 0, are given by A057979 (k=0), A158780 (k=1), A002965 (k=2), this sequence (k=3). See "Family of sequences for k" link for other connected sequences.
It seems that the ratio of two successive numbers with even, or two successive numbers with odd, indices approaches sqrt(k) for these sequences as n-> infinity.
This algorithm can be found in a historical figure named "Villardsche Figur" of the 13th century. There you can see a geometrical interpretation.

Crossrefs

Programs

  • Magma
    I:=[0,1,1,1]; [n le 4 select I[n] else 2*(Self(n-2) +Self(n-4)): n in [1..40]]; // G. C. Greubel, Feb 18 2023
    
  • Mathematica
    LinearRecurrence[{0,2,0,2}, {0,1,1,1}, 40] (* G. C. Greubel, Feb 18 2023 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A160444
        if (n<5): return ((n+1)//3)
        else: return 2*(a(n-2) + a(n-4))
    [a(n) for n in range(1, 41)] # G. C. Greubel, Feb 18 2023

Formula

a(n) = 2*a(n-2) + 2*a(n-4).
a(2*n+1) = A002605(n).
a(2*n) = A026150(n-1).

Extensions

Edited by R. J. Mathar, May 14 2009

A291001 p-INVERT of (1,1,1,1,1,...), where p(S) = 1 - 8*S^2.

Original entry on oeis.org

0, 8, 16, 88, 288, 1192, 4400, 17144, 65088, 250184, 955984, 3663256, 14018400, 53679592, 205487984, 786733112, 3011882112, 11530896008, 44144966800, 169006205656, 647027178912, 2477097797416, 9483385847216, 36306456276344, 138996613483200, 532138420900808
Offset: 0

Views

Author

Clark Kimberling, Aug 22 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2), ...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
See A291000 for a guide to related sequences.

Crossrefs

Programs

  • Magma
    [n le 2 select 8*(n-1) else 2*Self(n-1) +7*Self(n-2): n in [1..41]]; // G. C. Greubel, Apr 25 2023
    
  • Mathematica
    z = 60; s = x/(1 - x); p = 1 - s^8;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1]  (* A000012 *)
    Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1]  (* A291001 *)
    LinearRecurrence[{2,7}, {0,8}, 41] (* G. C. Greubel, Apr 25 2023 *)
  • SageMath
    A291001=BinaryRecurrenceSequence(2,7,0,8)
    [A291001(n) for n in range(41)] # G. C. Greubel, Apr 25 2023

Formula

G.f.: 8*x/(1 - 2*x - 7*x^2).
a(n) = 2*a(n-1) + 7*a(n-2) for n >= 3.
a(n) = 8*A015519(n).
a(n) = sqrt(2)*((1+2*sqrt(2))^n - (1-2*sqrt(2))^n). - Colin Barker, Aug 23 2017

A305492 a(n) = ((1 + y)^n - (1 - y)^n)/y with y = sqrt(8).

Original entry on oeis.org

0, 2, 4, 22, 72, 298, 1100, 4286, 16272, 62546, 238996, 915814, 3504600, 13419898, 51371996, 196683278, 752970528, 2882724002, 11036241700, 42251551414, 161756794728, 619274449354, 2370846461804, 9076614069086, 34749153370800
Offset: 0

Views

Author

Peter Luschny, Jun 02 2018

Keywords

Examples

			Array ((1+y)^n - (1-y)^n)/y with y = sqrt(k).
[k\n]
[1]   1, 2, 4,  8, 16, 32,   64,  128,    256,   512,   1024, ...
[2]   0, 2, 4, 10, 24, 58,  140,  338,    816,  1970,   4756, ...
[3]   0, 2, 4, 12, 32, 88,  240,  656,   1792,  4896,  13376, ...
[4]   0, 2, 4, 14, 40, 122, 364,  1094,  3280,  9842,  29524, ...
[5]   0, 2, 4, 16, 48, 160, 512,  1664,  5376, 17408,  56320, ...
[6]   0, 2, 4, 18, 56, 202, 684,  2378,  8176, 28242,  97364, ...
[7]   0, 2, 4, 20, 64, 248, 880,  3248, 11776, 43040, 156736, ...
[8]   0, 2, 4, 22, 72, 298, 1100, 4286, 16272, 62546, 238996, ...
[9]   0, 2, 4, 24, 80, 352, 1344, 5504, 21760, 87552, 349184, ...
		

Crossrefs

Let f(n, y) = ((1 + y)^n - (1 - y)^n)/y.
f(n, 1 ) = A000079(n);
f(n, sqrt(2)) = A163271(n+1);
f(n, sqrt(3)) = A028860(n+2);
f(n, 2 ) = A152011(n) for n>0;
f(n, sqrt(5)) = A103435(n);
f(n, sqrt(6)) = A083694(n);
f(n, sqrt(7)) = A274520(n);
f(n, sqrt(8)) = a(n);
f(n, 3 ) = A192382(n+1);
Cf. A305491.
Equals 2 * A015519.

Programs

  • Maple
    egf :=  (n,x) -> 2*exp(x)*sinh(sqrt(n)*x)/sqrt(n):
    ser := series(egf(8,x), x, 26):
    seq(n!*coeff(ser,x, n), n=0..24);
  • Mathematica
    Table[Simplify[((1 + Sqrt[8])^n - (1 - Sqrt[8])^n)/ Sqrt[8]], {n, 0, 24}]
  • PARI
    concat(0, Vec(2*x / (1 - 2*x - 7*x^2) + O(x^40))) \\ Colin Barker, Jun 05 2018

Formula

E.g.f.: 2*exp(x)*sinh(sqrt(n)*x)/sqrt(n) for n = 8.
From Colin Barker, Jun 02 2018: (Start)
G.f.: 2*x / (1 - 2*x - 7*x^2).
a(n) = 2*a(n-1) + 7*a(n-2) for n>1.
(End)

A220588 a(n) = 2^n - n^2 - n.

Original entry on oeis.org

1, 0, -2, -4, -4, 2, 22, 72, 184, 422, 914, 1916, 3940, 8010, 16174, 32528, 65264, 130766, 261802, 523908, 1048156, 2096690, 4193798, 8388056, 16776616, 33553782, 67108162, 134216972, 268434644, 536870042, 1073740894, 2147482656, 4294966240, 8589933470, 17179867994
Offset: 0

Views

Author

Dario Piazzalunga, Dec 16 2012

Keywords

Examples

			a(3) = -4 because 2^3 - 3^2 - 3 = 8 - 9 - 3 = -4.
a(4) = -4 because 2^4 - 4^2 - 4 = 16 - 16 - 4 = -4.
a(5) = 2 because 2^5 - 5^2 - 5 = 32 - 25 - 5 = 2.
a(6) = 22 because 2^6 - 6^2 - 6 = 64 - 36 - 6 = 22.
		

Crossrefs

Programs

  • Mathematica
    Table[2^n - n^2 - n, {n, 0, 32}] (* Alonso del Arte, Dec 16 2012 *)
  • Maxima
    A220588(n):=2^n-n^2-n$ makelist(A220588(n),n,0,20); /* Martin Ettl, Dec 18 2012 */
    
  • PARI
    Vec((1 - 5*x + 7*x^2 - x^3) / ((1 - x)^3*(1 - 2*x)) + O(x^40)) \\ Colin Barker, Aug 16 2017

Formula

a(n) = 2*a(n - 1) + ((n - 3)^2 + 3(n - 3)) = 2*a(n - 1) + A028552(n - 3) for n > 4.
a(n) = (2*a(n-1) + 7*a(n-2))*2 = A015519/2 for n > 4.
From Colin Barker, Aug 16 2017: (Start)
G.f.: (1 - 5*x + 7*x^2 - x^3) / ((1 - x)^3*(1 - 2*x)).
a(n) = 5*a(n-1) - 9*a(n-2) + 7*a(n-3) - 2*a(n-4) for n>3.
(End)

Extensions

a(3) corrected by Charles A. Dagino, Aug 16 2017

A247584 a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + 3*a(n-5) with a(0) = a(1) = a(2) = a(3) = a(4) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 13, 43, 113, 253, 509, 969, 1849, 3719, 8009, 18027, 40897, 91257, 198697, 423777, 894081, 1886011, 4007301, 8594411, 18560081, 40181493, 86872293, 187197193, 402060793, 861827743, 1846685729, 3960390059, 8504658049, 18283290609, 39325827729
Offset: 0

Views

Author

Alexander Samokrutov, Sep 20 2014

Keywords

Comments

a(n)/a(n-1) tends to 2.1486... = 1 + 2^(1/5), the real root of the polynomial x^5 - 5*x^4 + 10*x^3 - 10*x^2 + 5*x - 3.
If x^5 = 2 and n >= 0, then there are unique integers a, b, c, d, g such that (1 + x)^n = a + b*x + c*x^2 + d*x^3 + g*x^4. The coefficient a is a(n) (from A052102). - Alexander Samokrutov, Jul 11 2015
If x=a(n), y=a(n+1), z=a(n+2), s=a(n+3), t=a(n+4) then x, y, z, s, t satisfies Diophantine equation (see link). - Alexander Samokrutov, Jul 11 2015

Crossrefs

Cf. A005531.

Programs

  • Magma
    [n le 5 select 1 else 5*Self(n-1) -10*Self(n-2) +10*Self(n-3) -5*Self(n-4) +3*Self(n-5): n in [1..40]]; // Vincenzo Librandi, Jul 11 2015
    
  • Maple
    m:=50; S:=series( (1-x)^4/(1 -5*x +10*x^2 -10*x^3 +5*x^4 -3*x^5), x, m+1):
    seq(coeff(S, x, j), j=0..m); # G. C. Greubel, Apr 15 2021
  • Mathematica
    LinearRecurrence[{5,-10,10,-5,3}, {1,1,1,1,1}, 50] (* Vincenzo Librandi, Jul 11 2015 *)
  • Maxima
    makelist(sum(2^k*binomial(n,5*k), k, 0, floor(n/5)), n, 0, 50); /* Alexander Samokrutov, Jul 11 2015 */
    
  • PARI
    Vec((1-x)^4/(1-5*x+10*x^2-10*x^3+5*x^4-3*x^5) + O(x^100)) \\ Colin Barker, Sep 22 2014
    
  • Sage
    [sum(2^j*binomial(n, 5*j) for j in (0..n//5)) for n in (0..50)] # G. C. Greubel, Apr 15 2021

Formula

a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + 3*a(n-5).
a(n) = Sum_{k=0...floor(n/5)} (2^k*binomial(n,5*k)). - Alexander Samokrutov, Jul 11 2015
G.f.: (1-x)^4/(1 -5*x +10*x^2 -10*x^3 +5*x^4 -3*x^5). - Colin Barker, Sep 22 2014

A111016 Starting with the fraction 1/1, prime denominators of fractions built according to the rule: add top and bottom to get the new bottom, add top and 10 times bottom to get the new top.

Original entry on oeis.org

2, 13, 3457, 17797573, 105563930438375514795375041782813, 548910881501677043216804568782519749, 30150614379007816426425199846022140036752745857422145810701353231167111517347138427741849789
Offset: 1

Views

Author

Cino Hilliard, Oct 02 2005

Keywords

Comments

The next term (a(8)) has 924 digits. - Harvey P. Dale, Feb 06 2014

References

  • John Derbyshire, Prime Obsession, Joseph Henry Press, April 2004, p. 16.

Crossrefs

Also A015519(a(n)) is prime.

Programs

  • Mathematica
    nxt[{t_,b_}]:={t+10b,t+b}; Select[Transpose[NestList[nxt,{1,1},60]][[2]], PrimeQ] (* Harvey P. Dale, Feb 06 2014 *)
  • PARI
    primenum(n,k,typ) = \ k=mult,typ=1 num,2 denom. output prime num or denom. { local(a,b,x,tmp,v); a=1;b=1; for(x=1,n, tmp=b; b=a+b; a=k*tmp+a; if(typ==1,v=a,v=b); if(isprime(v),print1(v","); ) ); print(); print(a/b+.) }

Formula

Given a(0)=1, b(0)=1 then for i=1, 2, .. a(i)/b(i) = (a(i-1)+2*b(i-1)) /(a(i-1) + b(i-1)).

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 16 2007
One more term (a(7)) from Harvey P. Dale, Feb 06 2014

A292847 a(n) is the smallest odd prime of the form ((1 + sqrt(2*n))^k - (1 - sqrt(2*n))^k)/(2*sqrt(2*n)).

Original entry on oeis.org

5, 7, 101, 11, 13, 269, 17, 19, 509, 23, 709, 821, 29, 31, 46957, 55399, 37, 168846239, 41, 43, 9177868096974864412935432937651459122761, 47, 485329129, 2789, 53, 3229, 3461, 59, 61, 1563353111, 139237612541, 67, 5021, 71, 73, 484639, 6221, 79, 6869, 83, 7549
Offset: 1

Views

Author

XU Pingya, Sep 24 2017

Keywords

Examples

			For k = {1, 2, 3, 4, 5}, ((1 + sqrt(6))^k - (1 - sqrt(6))^k)/(2*sqrt(6)) = {1, 2, 9, 28, 101}. 101 is odd prime, so a(3) = 101.
		

Crossrefs

Programs

  • Mathematica
    g[n_, k_] := ((1 + Sqrt[n])^k - (1 - Sqrt[n])^k)/(2Sqrt[n]);
    Table[k = 3; While[! PrimeQ[Expand@g[2n, k]], k++]; Expand@g[2n, k], {n, 41}]
  • PARI
    g(n,k) = ([0,1;2*n-1,2]^k*[0;1])[1,1]
    a(n) = for(k=3,oo,if(ispseudoprime(g(n,k)),return(g(n,k)))) \\ Jason Yuen, Apr 12 2025

Formula

When 2*n + 3 = p is prime, a(n) = p.
Previous Showing 21-30 of 30 results.