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 71-80 of 100 results. Next

A074193 Sum of determinants of 2nd order principal minors of powers of the matrix ((1,1,0,0),(1,0,1,0),(1,0,0,1),(1,0,0,0)).

Original entry on oeis.org

6, -1, -3, -1, 17, -16, -15, 13, 81, -127, -58, 175, 329, -885, -31, 1424, 833, -5543, 2181, 9233, -2298, -31025, 27893, 49495, -54879, -150416, 245697, 204965, -526887, -570895, 1801670, 407711, -3882303, -946397, 11542929, -3442672, -24121039, 10317745, 64959629, -56727711, -127083514
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Aug 20 2002

Keywords

Comments

From Kai Wang, Oct 21 2020: (Start)
Let f(x) = x^4 - x^3 - x^2 - x - 1 be the characteristic polynomial for Tetranacci numbers (A000078). Let {x1,x2,x3,x4} be the roots of f(x). Then a(n) = (x1*x2)^n + (x1*x3)^n + (x1*x4)^n + (x2*x3)^n + (x2*x4)^n + (x3*x4)^n.
Let g(y) = y^6 + y^5 + 2*y^4 + 2*y^3 - 2*y^2 + y - 1 be the characteristic polynomial for a(n). Let {y1,y2,y3,y4,y5,y6} be the roots of g(y). Then a(n) = y1^n + y2^n + y3^n + y4^n + y5^n + y6^n. (End)

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(6+5*x+8*x^2+6*x^3-4*x^4+x^5)/(1+x+2*x^2+2*x^3-2*x^4+x^5-x^6), {x, 0, 50}], x]
    LinearRecurrence[{-1,-2,-2,2,-1,1},{6,-1,-3,-1,17,-16},50] (* Harvey P. Dale, Sep 06 2025 *)
  • PARI
    polsym(x^6 + x^5 + 2*x^4 + 2*x^3 - 2*x^2 + x - 1,44) \\ Joerg Arndt, Oct 22 2020

Formula

a(n) = -a(n-1)-2a(n-2)-2a(n-3)+2a(n-4)-a(n-5)+a(n-6).
G.f.: (6+5x+8x^2+6x^3-4x^4+x^5)/(1+x+2x^2+2x^3-2x^4+x^5-x^6).
abs(a(n)) = abs(A074453(n)). - Joerg Arndt, Oct 22 2020

A102036 Triangle, read by rows, where the terms are generated by the rule: T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k-1) + T(n-3,k-1), with T(0,0)=1.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 6, 5, 1, 1, 9, 15, 7, 1, 1, 12, 33, 28, 9, 1, 1, 15, 60, 81, 45, 11, 1, 1, 18, 96, 189, 161, 66, 13, 1, 1, 21, 141, 378, 459, 281, 91, 15, 1, 1, 24, 195, 675, 1107, 946, 449, 120, 17, 1, 1, 27, 258, 1107, 2349, 2673, 1742, 673, 153, 19, 1
Offset: 0

Views

Author

Paul D. Hanna, Dec 30 2004

Keywords

Comments

Row sums form A077939. This sequence was inspired by Luke Hanna.
Diagonal sums are A000078(n+3). - Philippe Deléham, Feb 16 2014
Riordan array (1/(1-x), x*(1+x+x^2)/(1-x)). - Philippe Deléham, Feb 16 2014

Examples

			Generated by adding preceding terms in the triangle at positions that form the letter 'L':
T(n,k) =
T(n-3,k-1) +
T(n-2,k-1) +
T(n-1,k-1) + T(n-1,k).
Rows begin:
  [1],
  [1,  1],
  [1,  3,   1],
  [1,  6,   5,   1],
  [1,  9,  15,   7,   1],
  [1, 12,  33,  28,   9,   1],
  [1, 15,  60,  81,  45,  11,  1],
  [1, 18,  96, 189, 161,  66, 13,  1],
  [1, 21, 141, 378, 459, 281, 91, 15, 1], ...
		

Crossrefs

Programs

  • Magma
    [[(&+[Binomial(n-m,k)*(&+[Binomial(j,m-j)*Binomial(k,j):j in [0..k]]): m in [0..n-k]]): k in [0..n]]: n in [0..15]]; // G. C. Greubel, Dec 11 2018
    
  • Maple
    T:=(n,k)->add(add((binomial(j,m-j)*binomial(k,j))*binomial(n-m,k),j=0..k),m=0..n-k): seq(seq(T(n,k),k=0..n),n=0..10); # Muniru A Asiru, Dec 11 2018
  • Mathematica
    T[n_, k_] := If[n < k || k < 0, 0, If[n == 0, 1, T[n - 1, k] + T[n - 1, k - 1] + T[n - 2, k - 1] + T[n - 3, k - 1]]]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, Dec 07 2018 *)
    Table[Sum[Binomial[n-m, k]*Sum[Binomial[j, m-j]*Binomial[k, j], {j, 0, k}], {m, 0, n-k}], {n, 0, 15}, {k, 0, n}]//Flatten (* G. C. Greubel, Dec 11 2018 *)
  • Maxima
    T(n,k):=sum((sum(binomial(j,m-j)*binomial(k,j),j,0,k))*binomial(n-m,k),m,0,n-k); /* Vladimir Kruchinin, Apr 21 2015 */
    
  • PARI
    {T(n,k)=if(n
    				
  • Sage
    [[sum(binomial(n-m,k)*sum(binomial(j,m-j)*binomial(k,j) for j in (0..k)) for m in (0..n-k)) for k in (0..n)] for n in range(15)] # G. C. Greubel, Dec 11 2018

Formula

G.f.: 1/(1-y-x*(1+y+y^2)). - Vladimir Kruchinin, Apr 21 2015
T(n,k) = Sum_{m=0..(n-k)} (Sum_{j=0..k} C(j,m-j)*C(k,j))*C(n-m,k). - Vladimir Kruchinin, Apr 21 2015
From Werner Schulte, Dec 07 2018: (Start)
G.f. of column k: Sum_{n>=0} T(n+k,k) * x^n = (1+x+x^2)^k / (1-x)^(k+1) = (1-x^3)^k / (1-x)^(2*k+1).
Let k >= 0 be some fixed integer and a_k(n) be multiplicative with a_k(p^e) = T(e+k,k) for prime p and e >= 0. Then we have the Dirichlet g.f.: Sum{n>0} a_k(n) / n^s = (zeta(s))^(2*k+1) / (zeta(3*s))^k. (End)

A113243 Differences of nonzero tetranacci numbers.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 11, 13, 14, 21, 25, 27, 28, 41, 48, 52, 54, 55, 79, 93, 100, 104, 106, 107, 152, 179, 193, 200, 204, 206, 207, 293, 345, 372, 386, 393, 397, 399, 400, 565, 665, 717, 744, 758, 765, 769, 771, 772, 1089, 1282, 1382, 1434, 1461, 1475, 1482
Offset: 1

Views

Author

Jonathan Vos Post, Oct 19 2005; corrected Oct 20 2005

Keywords

Crossrefs

Programs

  • Maple
    isA113243 := proc(n)
        local i,j ;
        for j from 3 do
            for i from 3 to j do
                if A000078(j) - A000078(i) = n then
                    return true;
                elif A000078(j) - A000078(i) < n then
                    break ;
                end if;
            end do:
            if A000078(j) - A000078(j-1) > n then
                return false;
            end if;
        end do:
    end proc:
    for n from 0 to 10000 do
        if isA113243(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Oct 04 2014
  • Mathematica
    Union[Flatten[Differences/@Subsets[Drop[LinearRecurrence[{1, 1, 1,1}, {0,0, 0, 1}, 16],3],{2}]]] (* James C. McMahon, Jun 23 2024 *)

Formula

{a(n)} = { A000078(i) - A000078(j) such that i>=j>=3 }.

A118897 Triangle read by rows: T(n,k) is the number of binary sequences of length n containing k subsequences 0000 (n,k>=0).

Original entry on oeis.org

1, 2, 4, 8, 15, 1, 29, 2, 1, 56, 5, 2, 1, 108, 12, 5, 2, 1, 208, 28, 12, 5, 2, 1, 401, 62, 29, 12, 5, 2, 1, 773, 136, 65, 30, 12, 5, 2, 1, 1490, 294, 145, 68, 31, 12, 5, 2, 1, 2872, 628, 319, 154, 71, 32, 12, 5, 2, 1, 5536, 1328, 694, 344, 163, 74, 33, 12, 5, 2, 1, 10671, 2787
Offset: 0

Views

Author

Emeric Deutsch, May 04 2006

Keywords

Comments

Row n has n-2 terms (n>=3). Sum of entries in row n is 2^n (A000079). T(n,0) = A000078(n+4) (tetranacci numbers). T(n,1) = A118898(n). Sum(k*T(n,k),n>=0) = (n-3)*2^(n-4) (A001787).

Examples

			T(7,2) = 5 because we have 0000010, 0000011, 0100000, 1100000 and 1000001.
Triangle starts:
    1;
    2;
    4;
    8;
   15,  1;
   29,  2, 1;
   56,  5, 2, 1;
  108, 12, 5, 2, 1;
  ...
		

Crossrefs

Programs

  • Maple
    G:=(1+(1-t)*(z+z^2+z^3))/(1-(1+t)*z-(1-t)*(z^2+z^3+z^4)): Gser:=simplify(series(G,z=0,17)): P[0]:=1: for n from 1 to 14 do P[n]:=sort(coeff(Gser,z^n)) od: 1;2;4;8; for n from 4 to 14 do seq(coeff(P[n],t,j),j=0..n-3) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, t) option remember; `if`(n=0, 1,
          expand(b(n-1, min(3, t+1))*`if`(t>2, x, 1))+b(n-1, 0))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)):
    seq(T(n), n=0..14);  # Alois P. Heinz, Sep 17 2019
  • Mathematica
    nn=15;a=x^3/(1-y x)+x+x^2;b=1/(1-x);f[list_]:=Select[list,#>0&];Map[f,CoefficientList[Series[b (1+a)/(1-a x/(1-x)) ,{x,0,nn}],{x,y}]]//Grid  (* Geoffrey Critzer, Nov 18 2012 *)

Formula

G.f.: G(t,z) = [1+(1-t)(z+z^2+z^3)]/[1-(1+t)z-(1-t)(z^2+z^3+z^4)].

A144406 Rectangular array A read by upward antidiagonals: entry A(n,k) in row n and column k gives the number of compositions of k in which no part exceeds n, n>=1, k>=0.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 1, 2, 4, 5, 1, 1, 1, 2, 4, 7, 8, 1, 1, 1, 2, 4, 8, 13, 13, 1, 1, 1, 2, 4, 8, 15, 24, 21, 1, 1, 1, 2, 4, 8, 16, 29, 44, 34, 1, 1, 1, 2, 4, 8, 16, 31, 56, 81, 55, 1, 1, 1, 2, 4, 8, 16, 32, 61, 108, 149, 89, 1, 1, 1, 2, 4, 8, 16, 32, 63, 120, 208, 274, 144, 1
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Sep 29 2008

Keywords

Comments

Polynomial expansion as antidiagonal of p(x,n) = (x-1)/(x^n*(-x+(2*x-1)/x^n)). Based on the Pisot general polynomial type q(x,n) = x^n - (x^n-1)/(x-1) (the original name of the sequence).
Row sums are 1, 2, 3, 5, 8, 14, ... (A079500).
Conjecture: Since the array row sequences successively tend to A000079, the absolute values of nonzero differences between two successive row sequences tend to A045623 = {1,2,5,12,28,64,144,320,704,1536,...}, as k -> infinity. - L. Edson Jeffery, Dec 26 2013

Examples

			Array A begins:
  {1, 1, 1, 1, 1,  1,  1,  1,   1,   1,   1, ...}
  {1, 1, 2, 3, 5,  8, 13, 21,  34,  55,  89, ...}
  {1, 1, 2, 4, 7, 13, 24, 44,  81, 149, 274, ...}
  {1, 1, 2, 4, 8, 15, 29, 56, 108, 208, 401, ...}
  {1, 1, 2, 4, 8, 16, 31, 61, 120, 236, 464, ...}
  {1, 1, 2, 4, 8, 16, 32, 63, 125, 248, 492, ...}
  {1, 1, 2, 4, 8, 16, 32, 64, 127, 253, 504, ...}
  {1, 1, 2, 4, 8, 16, 32, 64, 128, 255, 509, ...}
  {1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 511, ...}
  ... - _L. Edson Jeffery_, Dec 26 2013
As a triangle:
  {1},
  {1, 1},
  {1, 1, 1},
  {1, 1, 2, 1},
  {1, 1, 2, 3, 1},
  {1, 1, 2, 4, 5, 1},
  {1, 1, 2, 4, 7, 8, 1},
  {1, 1, 2, 4, 8, 13, 13, 1},
  {1, 1, 2, 4, 8, 15, 24, 21, 1},
  {1, 1, 2, 4, 8, 16, 29, 44, 34, 1},
  {1, 1, 2, 4, 8, 16, 31, 56, 81, 55, 1},
  {1, 1, 2, 4, 8, 16, 32, 61, 108, 149, 89, 1},
  {1, 1, 2, 4, 8, 16, 32, 63, 120, 208, 274, 144, 1},
  {1, 1, 2, 4, 8, 16, 32, 64, 125, 236, 401, 504, 233, 1},
  {1, 1, 2, 4, 8, 16, 32, 64, 127, 248, 464, 773, 927, 377, 1}
		

Crossrefs

Same as A048887 but with a column of 1's added on the left (the number of compositions of 0 is defined to be equal to 1).
Array rows (with appropriate offsets) are A000012, A000045, A000073, A000078, A001591, A001592, etc.

Programs

  • Mathematica
    g[x_, n_] = x^(n) - (x^n - 1)/(x - 1);
    h[x_, n_] = FullSimplify[ExpandAll[x^(n)*g[1/x, n]]];
    f[t_, n_] := 1/h[t, n];
    a = Table[CoefficientList[Series[f[t, m], {t, 0, 30}], t], {m, 1, 31}];
    b = Table[Table[a[[n - m + 1]][[m]], {m, 1, n }], {n, 1, 15}];
    Flatten[b] (* Triangle version *)
    Grid[Table[CoefficientList[Series[(1 - x)/(1 - 2 x + x^(n + 1)), {x, 0, 10}], x], {n, 1, 10}]] (* Array version - L. Edson Jeffery, Jul 18 2014 *)

Formula

t(n,m) = antidiagonal_expansion of p(x,n) where p(x,n) = (x-1)/(x^n*(-x+(2*x-1)/x^n)).
G.f. for array A: (1-x)/(1 - 2*x + x^(n+1)), n>=1. - L. Edson Jeffery, Dec 26 2013

Extensions

Definition changed by L. Edson Jeffery, Jul 18 2014

A168088 a(n) = 2^tetranacci(n).

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 16, 256, 32768, 536870912, 72057594037927936, 324518553658426726783156020576256, 411376139330301510538742295639337626245683966408394965837152256
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A000078.
Subsequence of A000079.

Programs

  • Mathematica
    a={1,0,0,0};Flatten[Prepend[Table[s=Plus@@a;a=RotateLeft[a];z=a[[ -1]]=s;z=2^z,{n,12}],Table[0,{m,Length[a]-1}]]]
    2^LinearRecurrence[{1,1,1,1},{0,0,0,1},15] (* Harvey P. Dale, Dec 12 2017 *)

Formula

a(n) = 2^A000078(n).

Extensions

a(0)-a(2) and offset corrected by Charles R Greathouse IV, Jul 19 2012

A220493 Fibonacci 15-step numbers, a(n) = a(n-1) + a(n-2) + ... + a(n-15).

Original entry on oeis.org

1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32767, 65533, 131064, 262124, 524240, 1048464, 2096896, 4193728, 8387328, 16774400, 33548288, 67095552, 134189056, 268374016, 536739840, 1073463296, 2146893825, 4293722117, 8587313170
Offset: 1

Views

Author

Ruskin Harding, Feb 20 2013

Keywords

Comments

Also called Pentadecanacci numbers. In previous similar sequences, a(1), ..., a(n-1) have been set equal to zero and a(n)=1. For example, A168084 (Fibonacci 13-step numbers) has 12 0's as the first 12 terms and a(13)=1.

Crossrefs

Cf. A000045 (Fibonacci), A000073 (tribonacci), A000078 (tetranacci), A001591 (pentanacci).

Programs

  • Maple
    f:= gfun:-rectoproc({a(n) = add(a(n-i),i=1..15), seq(a(n)=0,n=-14..0),a(1)=1},a(n),remember):
    map(f, [$1..100]); # Robert Israel, Feb 19 2019
  • Mathematica
    FibonacciSequence[n_, kMax_] := Module[{a, s}, a = Join[{1}, Table[0, {n - 1}]]; lst = {}; Table[s = Plus @@ a; a = RotateLeft[a]; a[[n]] = s, {k, 1, kMax}]]; FibonacciSequence[15, 50] (* T. D. Noe, Feb 20 2013 *)

Formula

G.f.: x/(1-Sum_{k=1..15} x^k). - Robert Israel, Feb 19 2019

A227880 Primes in the union of all n-Fibonacci sequences.

Original entry on oeis.org

2, 3, 5, 7, 13, 29, 31, 61, 89, 127, 149, 233, 401, 509, 773, 1021, 1597, 4093, 8191, 16381, 28657, 31489, 128257, 131071, 514229, 524287, 1048573, 4194301, 5976577, 16777213, 433494437, 536870909, 2147483647, 2971215073, 4293722117, 5350220959, 13435170943
Offset: 1

Views

Author

Robert Price, Oct 25 2013

Keywords

Crossrefs

Programs

  • Mathematica
    plst = {};plimit=10^39; For[n = 2, n ≤ 1 + Log[2, plimit], n++,flst = {};For[i = 1, i < n, i++, AppendTo[flst, 0]];AppendTo[flst, 1];For[k = 2, k ≤ 1 + Log[GoldenRatio, plimit*Sqrt[5] + 0.5], k++,sum = 0;For[j = 0, j < n, j++, sum = sum + flst[[j + k - 1]]];AppendTo[flst, sum];If[sum ≤ plimit && PrimeQ[sum], AppendTo[plst, sum]]]];Union[plst]

Formula

Primes in A124168.

A299399 a(n) = a(n-1)*a(n-2)*a(n-3)*a(n-4); a(0..3) = (1, 1, 2, 3).

Original entry on oeis.org

1, 1, 2, 3, 6, 36, 1296, 839808, 235092492288, 9211413321697223245824, 2356948205087252000835395074931259831484416, 4286423488783965214900384842824017360544199884413056912194095171350270745233063936
Offset: 0

Views

Author

M. F. Hasler, Apr 22 2018

Keywords

Comments

A variant of A000336 which uses initial values (1,2,3,4).
A multiplicative variant of the tetranacci sequences A000078, A001631 and other variants.

Crossrefs

Cf. A000336 (variant starting 1,2,3,4).
Cf. A000301 (order 2 variant), A000308 (order 3 variant).
Subsequence of A003586 (3-smooth numbers).
Cf. A000078, A001631 (additive variants).

Programs

  • Mathematica
    nxt[{a_,b_,c_,d_}]:={b,c,d,a b c d}; NestList[nxt,{1,1,2,3},13][[All,1]] (* Harvey P. Dale, Jun 09 2022 *)
  • PARI
    A299399(n,a=[1,1,2,3,6])={for(n=5,n,a[n%#a+1]=a[(n-1)%#a+1]^2\a[n%#a+1]);a[n%#a+1]}

Formula

a(n) = a(n-1)^2 / a(n-5) for n > 4.
a(n) = 2^A001631(n)*3^A000078(n).

A302990 a(n) = index of first odd prime number in the (n-th)-order Fibonacci sequence Fn, or 0 if no such index exists.

Original entry on oeis.org

0, 0, 4, 6, 9, 10, 40, 14, 17, 19, 361, 23, 90, 26, 373, 47, 288, 34, 75, 38, 251, 43, 67, 47, 74, 310, 511, 151534, 57, 20608, 1146, 62, 197, 94246, 9974, 287, 271172, 758
Offset: 0

Views

Author

Jacques Tramu, Apr 17 2018

Keywords

Comments

Fn is defined by: Fn(0) = Fn(1) = ... = Fn(n-2) = 0, Fn(n-1) = 1, and Fn(k+1) = Fn(k) + Fn(k-1) + ... + Fn(k-n+1).
In general, Fn(k) is odd iff k == -1 or -2 (mod n+1), therefore a(n) = k*(n+1) - (1 or 2) for all n. Since Fn(n-1) = F(n) = 1, we must have a(n) >= 2n. Since Fn(k) = 2^(k-n) for n <= k < 2n, Fn(2n) = 2^n-1, so a(n) = 2n exactly for the Mersenne prime exponents A000043, while a(n) = 2n+1 when n is not in A000043 but n+1 is in A050414. - M. F. Hasler, Apr 18 2018
Further terms of the sequence: a(38) > 62000, a(39) > 72000, a(40) = 285, a(41) > 178000, a(42) = 558, a(44) = 19529, a(46) = 33369, a(47) = 239, a(48) = 6368, a(53) = 2860, a(54) = 2418, a(58) = 176, a(59) = 18418, a(60) = 1463, a(61) = 122, a(62) = 8755, a(63) = 5118, a(64) = 25089, a(65) = 988, a(66) = 333, a(67) = 406, a(70) = 1632, a(74) = 374, a(76) = 13704, a(77) = 4991, a(86) = 347, a(89) = 178, a(92) = 1114, a(93) = 187, a(98) = 395, a(100) > 80000; a(n) > 10^4 for all other n up to 100. - Jacques Tramu and M. F. Hasler, Apr 18 2018

Examples

			a(2) = 4 because F2 (Fibonacci) = 0, 1, 1, 2, 3, 5, 8, ... and F2(4) = 3 is prime.
a(3) = 6 because F3 (tribonacci) = 0, 0, 1, 1, 2, 4, 7, 13, ... and F3(6) = 7 is prime.
a(4) = 9 because F4 (tetranacci) = 0, 0, 0, 1, 1, 2, 4, 8, 15, 29, 56, ...  and F4(9) = 29 is prime.
From _M. F. Hasler_, Apr 18 2018: (Start)
We see that Fn(k) = 2^(k-n) for n <= k < 2n and thus Fn(2n) = 2^n-1, so a(n) = 2n exactly for the Mersenne prime exponents A000043.
a(n) = 2n + 1 when 2^(n+1) - 3 is prime (n+1 in A050414) but 2^n-1 is not, i.e., n = 4, 8, 9, 11, 21, 23, 28, 93, 115, 121, 149, 173, 212, 220, 232, 265, 335, 451, 544, 688, 693, 849, 1735, ...
For other primes we have: a(29) = 687*30 - 2, a(37) = 20*38 - 2, a(41) > 10^4, a(43) > 10^4, a(47) = 5*48 - 1, a(53) = 53*54 - 2, a(59) = 307*60 - 2, a(67) = 6*67 - 1. (End)
		

Crossrefs

Cf. A000045 (F2), A000073 (F3), A000078 (F4), A001591 (F5), A001592 (F6), A122189(F7), A079262 (F8), A104144 (F9), A122265 (F10).
(According to the definition, F0 = A000004 and F1 = A000012.)
Cf. A001605 (indices of prime numbers in F2).

Programs

  • PARI
    A302990(n,L=oo,a=vector(n+1,i,if(i1 && for(i=-2+2*n+=1,L, ispseudoprime(a[i%n+1]=2*a[(i-1)%n+1]-a[i%n+1]) && return(i))} \\ Testing primality only for i%n>n-3 is not faster, even for large n. - M. F. Hasler, Apr 17 2018; improved Apr 18 2018

Formula

a(n) == -1 or -2 (mod n+1). a(n) >= 2n, with equality iff n is in A000043. a(n) <= 2n+1 for n+1 in A050414. - M. F. Hasler, Apr 18 2018

Extensions

a(29) from Jacques Tramu, Apr 19 2018
a(33) from Daniel Suteu, Apr 20 2018
a(36) from Jacques Tramu, Apr 25 2018
Previous Showing 71-80 of 100 results. Next