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

A180483 Expansion of (3+3*x-25*x^2-3*x^3+2*x^4)/((1-x)*(1-10*x^2+x^4)).

Original entry on oeis.org

3, 6, 11, 38, 87, 354, 839, 3482, 8283, 34446, 81971, 340958, 811407, 3375114, 8032079, 33410162, 79509363, 330726486, 787061531, 3273854678, 7791105927, 32407820274, 77123997719, 320804348042, 763448871243, 3175635660126, 7557364714691, 31435552253198
Offset: 0

Views

Author

Paul Weisenhorn, Jan 20 2011

Keywords

Comments

Previous name was: Solutions a(n) to (a(n)-2)*(a(n)-3) = 6*b(n)*(b(n)-1).
The associated b(n) are in A181442.
Consider an urn with r red and b blue balls. Draw 4 balls without replacement. The probability of picking 4 red balls is r/(r+b) *(r-1)/(r+b-1) *(r-2)/(r+b-2) * (r-3)/(r+b-3). The probability of picking 2 red and 2 blue balls is binomial(2,2) * r*(r-1)*b*(b-1)/ ((r+b)*(r+b-1)..*(r+b-3)). For equal probability we need (r-2)*(r-3)=6*b*(b-1). The current sequence shows the r, the number of red balls which allow such scenario of equal probability.
The quadratic equation is diagonalized with a(n) = (A(n) + 5)/2 and b(n) = (B(n) + 1)/2, equivalent to the Pell equation A(n)^2 - 6*B(n)^2 = -5 with the 2 fundamental solutions (1; 1); (7; 3) and the solution (5; 2) for the unit form.

Examples

			For n=3: a(3) = 38; b(3) = 15; binomial(38,4) = 73815 and  binomial(38, 2)*binomial(15, 2) = 73815.
The 2-tuples begin (3, 1); (6, 2); (11, 4); (38, 15).
		

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (3+3*x-25*x^2-3*x^3+2*x^4)/((1-x)*(1-10*x^2+x^4)) )); // G. C. Greubel, Apr 28 2022
    
  • Maple
    n:=0: for s from 1 to 100 do r:=(sqrt(24*s^2-24*s+1)+5)/2: if (r=trunc(r)) then a(n):=r: b(n):=s: n:=n+1: end if: end do:
  • Mathematica
    LinearRecurrence[{1,10,-10,-1,1},{3,6,11,38,87},30] (* Harvey P. Dale, Apr 28 2018 *)
  • SageMath
    def b(n): return (1/2)*(1+(-1)^n)*chebyshev_U(n//2, 5)
    def A180483(n): return (1/2)*(5 +b(n) +7*b(n-1) +7*b(n-2) +b(n-3))
    [A180483(n) for n in (0..40)] # G. C. Greubel, Apr 28 2022

Formula

G.f.: ( 3+3*x-25*x^2-3*x^3+2*x^4 )/( (1-x)*(1-10*x^2+x^4) ). - R. J. Mathar, Feb 05 2011
Let r=sqrt(6), s=5+2*r, and t=5-2*r, then a(2*n) = (10+(1+r)*s^n+(1-r)*t^n)/4 and a(2*n+1) = (10+(7+3*r)*s^n+(7-3*r)*t^n)/4.
a(n) = 11*a(n-2) - 11*a(n-4) + a(n-6).
a(n) = +a(n-1) +10*a(n-2) -10*a(n-3) -a(n-4) +a(n-5). - R. J. Mathar, Feb 05 2011
a(n) = (1/2)*(5 +b(n) +7*b(n-1) +7*b(n-2) +b(n-3)), where b(n) = (1/2)*(1+(-1)^n)*ChebyshevU(n/2, 5). - G. C. Greubel, Apr 28 2022

Extensions

New name using the g.f. by R. J. Mathar from Joerg Arndt, Apr 27 2022

A118064 Decimal expansion of the sum of the reciprocals of the palindromic primes A002385 (Honaker's constant).

Original entry on oeis.org

1, 3, 2, 3, 9, 8, 2, 1, 4, 6, 8, 0, 6
Offset: 1

Views

Author

Martin Renner, May 11 2006

Keywords

Comments

From Robert G. Wilson v, Nov 01 2010: (Start)
n \ sum to 10^n
02 1.267099567099567099567099567099567099567099567099567099567099567099567
03 1.320723244590290964212793334437872849720871258315369002493912638038324
05 1.323748402250648554164425746280035962754669829327727800040192015109270
07 1.323964105671202458016249150576217276147952428601889817773483085610332
09 1.323980718065525060936354534562000413901564393192688451911141729415146
11 1.323982026479475203850120990923294207966175748395470136325039323549015
13 1.323982136437462724794656629740867909978221153827990721566573347887836
15 1.323982145891606234777299440047139038371441916546100653011463101470839
17 1.323982146724859090645464845257681674740147563533254654075059843860490
19 1.323982146799188851138232927173756400348958236915409881890097448921521
21 1.323982146805857558347279363344557427339916178257233985191868031567947 (End)

Examples

			1.323982146806...
		

Crossrefs

Programs

  • Mathematica
    (* first obtain nextPalindrome from A007632 *) s = 1/11; c = 1; pp = 1; Do[ While[pp < 10^n, If[PrimeQ@ pp, c++; s = N[s + 1/pp, 64]]; pp = NextPalindrome@ pp]; If[ OddQ@ n, pp = 10^(n + 1); Print[{s, n, c}]], {n, 17}] (* Robert G. Wilson v, May 31 2009 *)
    generate[n_] := Block[{id = IntegerDigits@n, insert = {{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}}}, FromDigits@ Join[id, #, Reverse@ id] & /@ insert]; sm = N[Plus @@ (1/{2, 3, 5, 7, 11}), 64]; k = 1; Do [While[k < 10^n, sm = N[sm + Plus @@ (1/Select[ generate@k, PrimeQ]), 128]; k++ ]; Print[{2 n + 1, sm}], {n, 9}] (* Robert G. Wilson v, Nov 01 2010 *)

Formula

Equals Sum_{p} 1/p, where p ranges over the palindromic primes.

Extensions

Corrected by Eric W. Weisstein, May 14 2006
More terms from Robert G. Wilson v, Nov 01 2010
Entry revised by N. J. A. Sloane, May 05 2013

A179934 Expansion of x*(4+5*x-13*x^2-x^3+x^4) / ( (1-x)*(1-10*x^2+x^4) ).

Original entry on oeis.org

4, 9, 36, 85, 352, 837, 3480, 8281, 34444, 81969, 340956, 811405, 3375112, 8032077, 33410160, 79509361, 330726484, 787061529, 3273854676, 7791105925, 32407820272, 77123997717, 320804348040, 763448871241, 3175635660124
Offset: 1

Views

Author

Paul Weisenhorn, Aug 02 2010

Keywords

Comments

Previous name was: a(n) red balls and b(n) blue balls in an urn; draw 2 balls without replacement; Probability(2 red balls) = 6*Probability(2 blue balls); b(n) = A181442(n).
The last digit has the period (4,9,6,5,2,7,0,1).

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 50); Coefficients(R!( x*(4+5*x-13*x^2-x^3+x^4)/((1-x)*(1-10*x^2+x^4)) )); // G. C. Greubel, Apr 27 2022
    
  • Maple
    r:= sqrt(6);
    for n from 0 to 20 do
        a(2*n+1):= round((2 +(7+3*r)*(5+2*r)^n)/4);
        a(2*n+2):= round((2 +(17+7*r)*(5+2*r)^n)/4);
    end do;
    seq(a(n), n = 1..40);
  • Mathematica
    LinearRecurrence[{1,10,-10,-1,1},{4,9,36,85,352},30] (* Harvey P. Dale, Dec 23 2012 *)
  • SageMath
    def b(n): return ((1+(-1)^n)/2)*chebyshev_U(n//2, 5)
    def A179934(n): return (b(n) +7*b(n-1) +7*b(n-2) +b(n-3) -2*bool(n==0) +1)/2
    [A179934(n) for n in (1..50)] # G. C. Greubel, Apr 27 2022

Formula

a(n) = (1 + sqrt(1 + 24*b(n)*(b(n) - 1)))/2 where b(n) = A181442(n); this is equivalent to the Pell equation A(n)^2 - 6*B(n)^2 = -5 with the two fundamental solutions (7;3) and (17;7) and the solution (5;2) for the unit form; a(n) = (A(n) + 1)/2; b(n) = (B(n) + 1)/2. [corrected by Jason Yuen, Feb 09 2025]
a(n+4) = 10*a(n+2) - a(n) - 4.
a(n+6) = 11*(a(n+4) - a(n+2)) + a(n).
a(2*n+1) = (2 + (7 + 3*r)*(5 + 2*r)^n + (7 - 3*r)*(5 - 2*r)^n)/4, r = sqrt(6).
a(2*n+2) = (2 + (17 + 7*r)*(5 + 2*r)^n + (17 - 7*r)*(5 - 2*r)^n)/4, r = sqrt(6).
From R. J. Mathar, Aug 03 2010: (Start)
a(n) = +a(n-1) +10*a(n-2) -10*a(n-3) -a(n-4) +a(n-5).
G.f.: x*(4+5*x-13*x^2-x^3+x^4) / ( (1-x)*(1-10*x^2+x^4) ). (End)
a(n) = (b(n) +7*b(n-1) +7*b(n-2) +b(n-3) -2*bool(n==0) +1)/2, where b(n) = ((1 + (-1)^n)/2)*ChebyshevU(n/2, 5). - G. C. Greubel, Apr 27 2022

Extensions

Edited by G. C. Greubel, Apr 27 2022
New name using g.f. by R. J. Mathar from Joerg Arndt, Apr 27 2022

A216073 The list of the a(n)-values in the common solutions to k+1=b^2 and 6*k+1=a^2.

Original entry on oeis.org

1, 7, 17, 71, 169, 703, 1673, 6959, 16561, 68887, 163937, 681911, 1622809, 6750223, 16064153, 66820319, 159018721, 661452967, 1574123057, 6547709351, 15582211849, 64815640543, 154247995433, 641608696079, 1526897742481, 6351271320247, 15114729429377, 62871104506391
Offset: 1

Views

Author

Paul Weisenhorn, Sep 01 2012

Keywords

Comments

The equations are equivalent to the Pell equation a^2 - 6*b^2 = -5 with the 2 fundamental solutions (1;1) and (7;3) and the solution (5;2) for the unit form.
The associated b(n) are in A080806.
A181442(n) = (A080806(n) + 1)/2.
A180483(n) = (a(n) + 5)/2.

Crossrefs

Programs

  • Maple
    a(1)=1: a(2)=7: a(3)=17: a(4)=71:
    for n from 5 to 20 do
      a(n)=10*a(n-2)-a(n-4):
      printf("%9d%20d\n",n,a(n)):
    end do:
  • Mathematica
    LinearRecurrence[{0,10,0,-1}, {1,7,17,71}, 50] (* G. C. Greubel, Feb 22 2017 *)
  • PARI
    a(n) = if(n<1, 0, if(n<5, [1,7,17, 71][n], 10*a(n-2)-a(n-4) ) );
    /* Joerg Arndt, Sep 03 2012 */
    
  • SageMath
    def b(n): return (1/2)*(1+(-1)^n)*chebyshev_U(n//2, 5)
    def A216073(n): return b(n) +7*b(n-1) +7*b(n-2) +b(n-3)
    [A216073(n) for n in (0..50)] # G. C. Greubel, Apr 28 2022

Formula

a(n) = 10*a(n-2) - a(n-4).
a(n) = a(n-1) + 10*a(n-2) - 10*a(n-3) - a(n-4) + a(n-5).
G.f.: x*(1+7*x+7*x^2+x^3)/(1-10*x^2+x^4).
a(2*n+1) = ((1+r)*(5+2*r)^n + (1-r)*(5-2*r)^n)/2 where r=sqrt(6) and 0<=n.
a(2*n+2) = ((7+3*r)*(5+2*r)^n + (7-3*r)*(5-2*r)^n)/2 where r=sqrt(6) and 0<=n.
a(n) = -((5-2*r)^(1/4)*((2*r+5)^((-1)^n/4+n/2)*(-1)^n - r*(2*r+5)^((-1)^n/4+n/2)) + (2*r+5)^(1/4)*((5-2*r)^((-1)^n/4+n/2)*(-1)^n + (5-2*r)^((-1)^n/4+n/2)*r))/(2*(5-2*r)^(1/4)*(2*r+5)^(1/4)) with r=sqrt(6) and 1<=n. - Alexander R. Povolotsky, Sep 01 2012
a(n) = b(n) +7*b(n-1) +7*b(n-2) +b(n-3), where b(n) = (1/2)*(1 +(-1)^n)* ChebyshevU(n/2, 5). - G. C. Greubel, Apr 28 2022
Showing 1-4 of 4 results.