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-29 of 29 results.

A083694 a(n) = 2*A002532(n).

Original entry on oeis.org

0, 2, 4, 18, 56, 202, 684, 2378, 8176, 28242, 97364, 335938, 1158696, 3997082, 13787644, 47560698, 164059616, 565922722, 1952143524, 6733900658, 23228518936, 80126541162, 276395677004, 953424059818, 3288826504656
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), May 03 2003

Keywords

Programs

  • Mathematica
    CoefficientList[Series[2x/(1-2x-5x^2), {x, 0, 25}], x]
    LinearRecurrence[{2,5},{0,2},40]  (* Harvey P. Dale, Nov 03 2011 *)
    With[{c=Sqrt[6]}, Simplify/@ Table[((1-c)^n+c (1-c)^n-(1+c)^n+c (1+c)^n)/(5c),{n,30}]] (* Harvey P. Dale, Nov 03 2011 *)

Formula

G.f.: 2*x / (1 - 2*x - 5*x^2).
a(n) = 2*a(n-1) + 5*a(n-2), a(0)=0, a(1)=2.
a(n) = 1 / sqrt(6) * ( (1+sqrt(6))^n - (1-sqrt(6))^n ).
a(n) = 2 * A002533(n-1) + a(n-1).

A084097 Square array whose rows have e.g.f. exp(x)*cosh(sqrt(k)*x), k>=0, read by ascending antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 4, 1, 1, 1, 4, 7, 8, 1, 1, 1, 5, 10, 17, 16, 1, 1, 1, 6, 13, 28, 41, 32, 1, 1, 1, 7, 16, 41, 76, 99, 64, 1, 1, 1, 8, 19, 56, 121, 208, 239, 128, 1, 1, 1, 9, 22, 73, 176, 365, 568, 577, 256, 1, 1, 1, 10, 25, 92, 241, 576, 1093, 1552, 1393, 512, 1
Offset: 0

Views

Author

Paul Barry, May 11 2003

Keywords

Comments

Rows are the binomial transforms of expansions of cosh(sqrt(k)*x), k >= 0.

Examples

			Array, A(n,k), begins:
.n\k.........0..1...2...3....4.....5......6......7.......8........9.......10
.0: A000012..1..1...1...1....1.....1......1......1.......1........1........1
.1: A000079..1..1...2...4....8....16.....32.....64.....128......256......512
.2: A001333..1..1...3...7...17....41.....99....239.....577.....1393.....3363
.3: A026150..1..1...4..10...28....76....208....568....1552.....4240....11584
.4: A046717..1..1...5..13...41...121....365...1093....3281.....9841....29525
.5: A084057..1..1...6..16...56...176....576...1856....6016....19456....62976
.6: A002533..1..1...7..19...73...241....847...2899...10033....34561...119287
.7: A083098..1..1...8..22...92...316...1184...4264...15632....56848...207488
.8: A084058..1..1...9..25..113...401...1593...5993...23137....88225...338409
.9: A003665..1..1..10..28..136...496...2080...8128...32896...130816...524800
10: A002535..1..1..11..31..161...601...2651..10711...45281...186961...781451
11: A133294..1..1..12..34..188...716...3312..13784...60688...259216..1125312
12: A090042..1..1..13..37..217...841...4069..17389...79537...350353..1575613
13: A125816..1..1..14..40..248...976...4928..21568..102272...463360..2153984
14: A133343..1..1..15..43..281..1121...5895..26363..129361...601441..2884575
15: A133345..1..1..16..46..316..1276...6976..31816..161296...768016..3794176
16: A120612..1..1..17..49..353..1441...8177..37969..198593...966721..4912337
17: A133356..1..1..18..52..392..1616...9504..44864..241792..1201408..6271488
18: A125818..1..1..19..55..433..1801..10963..52543..291457..1476145..7907059
25: A083578
- _Robert G. Wilson v_, Jan 02 2013
Antidiagonal triangle, T(n,k), begins:
  1;
  1,  1;
  1,  1,  1;
  1,  1,  2,  1;
  1,  1,  3,  4,  1;
  1,  1,  4,  7,  8,   1;
  1,  1,  5, 10, 17,  16,   1;
  1,  1,  6, 13, 28,  41,  32,    1;
  1,  1,  7, 16, 41,  76,  99,   64,    1;
  1,  1,  8, 19, 56, 121, 208,  239,  128,    1;
  1,  1,  9, 22, 73, 176, 365,  568,  577,  256,   1;
  1,  1, 10, 25, 92, 241, 576, 1093, 1552, 1393, 512,  1;
		

Crossrefs

Programs

  • Magma
    function A084097(n,k)
      if k eq 0 then return 1;
      else return k*2^(k-1)*(&+[ Binomial(k-j,j)*((n-k-1)/4)^j/(k-j): j in [0..Floor(k/2)]]);
      end if; return A084097; end function;
    [A084097(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 15 2022
    
  • Mathematica
    T[j_, k_] := Expand[((1 + Sqrt[j])^k + (1 - Sqrt[j])^k)/2]; T[1, 0] = 1; Table[ T[j - k, k], {j, 0, 11}, {k, 0, j}] // Flatten (* Robert G. Wilson v, Jan 02 2013 *)
  • SageMath
    def A084097(n,k):
        if (k==0): return 1
        else: return k*2^(k-1)*sum( binomial(k-j,j)*((n-k-1)/4)^j/(k-j) for j in range( (k+2)//2 ) )
    flatten([[A084097(n,k) for k in range(n+1)] for n in range(15)]) # G. C. Greubel, Oct 15 2022

Formula

From Robert G. Wilson v, Jan 02 2013: (Start)
A(n, k) = (1/2)*( (1 + sqrt(n))^k + (1 - sqrt(n))^k ) (array).
T(n, k) = A(n-k, k). (End)
T(n, k) = Sum_{j=0..floor(k/2)} binomial(k-j, j)*((n-k-1)/4)^j/(k-j), with T(n, 0) = 1 (antidiagonal triangle T(n,k)). - G. C. Greubel, Oct 15 2022

Extensions

Edited by N. J. A. Sloane, Jul 14 2010

A154237 a(n) = ( (6 + sqrt(6))^n - (6 - sqrt(6))^n )/(2*sqrt(6)).

Original entry on oeis.org

1, 12, 114, 1008, 8676, 73872, 626184, 5298048, 44791056, 378551232, 3198883104, 27030060288, 228394230336, 1929828955392, 16306120554624, 137778577993728, 1164159319286016, 9836554491620352, 83113874320863744, 702269857101754368
Offset: 1

Views

Author

Al Hakanson (hawkuu(AT)gmail.com), Jan 05 2009

Keywords

Comments

Fifth binomial transform of A002533 without initial term 1. Sixth binomial transform of 1 followed by A056452.
Lim_{n -> infinity} a(n)/a(n-1) = 6 + sqrt(6) = 8.4494897427....

Crossrefs

Cf. A010464 (decimal expansion of square root of 6), A002533, A056452.

Programs

  • Magma
    Z:=PolynomialRing(Integers()); N:=NumberField(x^2-6); S:=[ ((6+r)^n-(6-r)^n)/(2*r): n in [1..20] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Jan 07 2009
    
  • Magma
    I:=[1,12]; [n le 2 select I[n] else 12*Self(n-1)-30*Self(n-2): n in [1..20]]; // Vincenzo Librandi, Sep 07 2016
  • Mathematica
    Join[{a=1,b=12},Table[c=12*b-30*a;a=b;b=c,{n,60}]] (* Vladimir Joseph Stephan Orlovsky, Jan 31 2011*)
    LinearRecurrence[{12, -30}, {1, 12}, 25] (* or *) Table[( (6 + sqrt(6))^n - (6 - sqrt(6))^n )/(2*sqrt(6)), {n,1,25}] (* G. C. Greubel, Sep 07 2016 *)
  • Sage
    [lucas_number1(n,12,30) for n in range(1, 21)] # Zerinvary Lajos, Apr 27 2009
    

Formula

From Philippe Deléham, Jan 06 2009: (Start)
a(n) = 12*a(n-1) - 30*a(n-2) for n > 1, with a(0)=0, a(1)=1.
G.f.: x/(1 - 12*x + 30*x^2). (End)

Extensions

Extended beyond a(7) by Klaus Brockhaus, Jan 07 2009
Edited by Klaus Brockhaus, Oct 06 2009

A083695 a(n) = 2*a(n-1) + 5*a(n-2), with a(0) = 0, a(1) = 3.

Original entry on oeis.org

0, 3, 6, 27, 84, 303, 1026, 3567, 12264, 42363, 146046, 503907, 1738044, 5995623, 20681466, 71341047, 246089424, 848884083, 2928215286, 10100850987, 34842778404, 120189811743, 414593515506, 1430136089727, 4933239756984, 17017159962603, 58700518710126
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), May 03 2003

Keywords

Comments

A002533(n)/a(n) converges to sqrt(2/3).

Programs

  • Magma
    I:=[0,3]; [n le 2 select I[n] else 2*Self(n-1)+5*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Oct 07 2013
  • Mathematica
    CoefficientList[Series[3x/(1-2x-5x^2), {x, 0, 25}], x]
    LinearRecurrence[{2, 5}, {0, 3}, 27] (* Arkadiusz Wesolowski, May 21 2013 *)

Formula

G.f.: 3x/(1-2x-5x^2).
a(n) = 3[(1+sqrt(6))^n-(1-sqrt(6))^n]/(2*sqrt(6)).
a(n) = 3*A002533(n-1) + a(n-1).
G.f.: 1/Q(0) -1, where Q(k) = 1 + 5*x^2 - (3*k+4)*x + x*(3*k+1 - 5*x)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 07 2013

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

A111012 Primes in A002532.

Original entry on oeis.org

2, 101, 1998541, 3366950329, 803128907400221, 16099934940822131461, 2279520764596558292681, 6469963748546758449049574741, 10900112859698650263468714158129, 707398563162966192697450635044051857198371361627935450689
Offset: 1

Views

Author

Cino Hilliard, Oct 02 2005

Keywords

Comments

Starting with the fraction 1/1, generate the sequence of fractions A002533(i)/A002532(i) according to the rule: "add top and bottom to get the new bottom, add top and 6 times bottom to get the new top."
The prime denominators of these fractions are listed here, at locations i= 2, 5, 13, 19, 29, 37,.. 41, 53, 59, .... equalling prime(1), prime(26), prime(148838), ..
Is there an infinity of primes in this sequence?

References

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

Crossrefs

Programs

  • Mathematica
    Select[LinearRecurrence[{2, 5}, {0, 1}, 150], PrimeQ] (* Amiram Eldar, Jun 30 2024 *)
  • 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

A002532 INTERSECT A000040.

Extensions

Simplified the definition, listed some A002532 indices - R. J. Mathar, Sep 16 2009

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

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

Original entry on oeis.org

3, 5, 7, 113, 11, 13, 43, 17, 19, 61, 23, 73, 79, 29, 31, 97, 103, 37, 1241463763, 41, 43, 664973, 47, 2593, 151, 53, 163, 14972833, 59, 61, 4217, 193, 67, 23801, 71, 73, 223, 229, 79, 241, 83, 7561, 61068909859, 89, 271, 277, 283, 97, 10193, 101, 103, 313
Offset: 1

Views

Author

XU Pingya, Sep 24 2017

Keywords

Comments

When 2n + 1 = p is prime, a(n) = p.
From Robert Israel, Sep 26 2017: (Start)
a(n) is also the first prime in the sequence defined by the recursion x(k+2)=2*x(k+1)+(2*n-1)*x(k) with x(0)=x(1)=1.
a(307), if it exists, has more than 10000 digits.
It appears that x(n*k) is divisible by x(k) if n is odd. Thus a(n) (if it exists) must be x(k) where k is either a power of 2 or a prime. (End)

Examples

			For k = {1, 2, 3, 4}, (1/2)((1 + sqrt(8))^k + (1 - sqrt(8))^k) = {1, 9, 25, 113}. 113 is prime, so a(4) = 113.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local a,b,t;
      a:= 1; b:= 1;
      do
        t:= a; a:= 2*a + (2*n-1)*b;
        if isprime(a) then return a fi;
        b:= t;
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Sep 26 2017
  • Mathematica
    f[n_, k_] := ((1 + Sqrt[n])^k + (1 - Sqrt[n])^k)/2;
    Table[k = 1; While[! PrimeQ[Expand@f[2n, k]], k++]; Expand@f[2n, k], {n, 52}]

A110908 Start with the fraction 1/1, list n when the numerator and denominator are both prime for fractions built according to the rule: Add old top and old bottom to get the new bottom, add old top and 6 times the old bottom to get the new top.

Original entry on oeis.org

1, 4, 52, 106
Offset: 1

Views

Author

Cino Hilliard, Oct 02 2005, Jul 05 2007

Keywords

Comments

k is the multiple 6 in the PARI code. The sequence of fractions found with the property that both numerator and denominator are prime is as follows.
n, num/denom
1, 7/2
4, 241/101
52, 15848109838244286131940714481/6469963748546758449049574741
106, 1732765524527243824670663837908764472971413888795440694899 / 7073985631629662697450635044051857198371361627935450689
From Robert Israel, Aug 12 2016: (Start)
n such that A002532(n+1) and A002533(n+1) are both prime.
Note that A002532(n+1) and A002533(n+1) are always coprime, so the fractions are in lowest terms.
No other terms <= 12000.
Heuristically we would expect A002532(n+1) to be prime with probability ~ constant/n and A002533(n+1) to be prime with probability ~ constant/n, so both prime with probability ~ constant/n^2.
Since Sum_n 1/n^2 converges, we should expect this sequence to be finite.
Since A002532(n+1) is divisible by 2 if n is odd and by 3 if n == 2 (mod 3), all terms after the first == 0 or 4 (mod 6). (End)

Examples

			The first four fractions according to the rule are
n,
1,7/2
2,19/9
3,73/28
4,241/101
n=2,3 did not make the list because 9 and 28 are not prime.
		

References

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

Crossrefs

Programs

  • Maple
    A:= gfun:-rectoproc({a(n+2)-2*a(n+1)-5*a(n), a(0)=1, a(1)=7},a(n), remember):
    B:= gfun:-rectoproc({a(n+2)-2*a(n+1)-5*a(n), a(0)=1, a(1)=2},a(n),remember):
    select(n -> isprime(A(n)) and isprime(B(n)), [1,seq(seq(6*k+j,j=[0,4]),k=0..1000)]); # Robert Israel, Aug 12 2016
  • Mathematica
    Position[Rest@ NestList[{Numerator@ #, Denominator@ #} &[(#1 + 6 #2)/(#1 + #2)] & @@ # &, {1, 1}, 2000], k_ /; Times @@ Boole@ Map[PrimeQ, k] == 1] // Flatten (* Michael De Vlieger, May 13 2017 *)
  • PARI
    primenumdenom(n,k) = { local(a,b,x,tmp,v); a=1;b=1; for(x=1,n, tmp=b; b=a+b; a=k*tmp+a; if(tmp=1,v=a,v=b); if(ispseudoprime(a)&ispseudoprime(b),print1(x","); ) ); print(); print(a/b+.) }

Formula

Given A(0)=1,B(0)=1 then for i=1,2,.. A(i)/B(i) = (A(i-1)+6*B(i-1))/(A(i-1)+B(i-1)).
A(n) = A002532(n+1). B(n) = A002533(n+1). - Robert Israel, Aug 12 2016
Previous Showing 21-29 of 29 results.