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 10 results.

A111015 Primes in A002535.

Original entry on oeis.org

11, 31, 601, 10711, 45281, 3245551, 4057691201, 87818089575031, 813086055916584907683448771376472778745411281, 16071419731004292876206308878779566599797733387541964081866111137961, 2259503969983505641049567911781316556859822340375755577282633545849516496717511
Offset: 1

Views

Author

Cino Hilliard, Oct 02 2005

Keywords

Comments

Original name: Starting with the fraction 1/1, this sequence gives the prime numerators 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.
Conjecture: Starting with 1/1, there are infinitely many primes in the numerators of fractions built according to the rule: add top and bottom to get the new bottom, add top and 2k times bottom to get the new top, for k>=1.
a(12) has 5304 digits and is not included here. - Bill McEachen, Jan 22 2023
a(12) = A002535(8563) = 1.0733...*10^5303. - Amiram Eldar, Jun 30 2024

Examples

			The raw ratios begin 1/1, 11/2, 31/13, 161/44, 601/205, ... = A002535/A002534. Among the numerators, 11, 31, and 601 are primes and are the first three terms here.
		

References

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

Crossrefs

Programs

  • Mathematica
    Select[Numerator/@NestList[(10Denominator[#]+Numerator[#])/ (Denominator[#]+ Numerator[#])&,1/1,200],PrimeQ] (* Harvey P. Dale, Sep 15 2011 *)
    Select[LinearRecurrence[{2, 9}, {1, 1}, 150], PrimeQ] (* Amiram Eldar, Jun 30 2024 *)
  • PARI
    \\ k=mult,typ=1 num,2 denom. output prime num or denom
    primenum(n,k,typ) = {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+.)}
    primenum(100, 10, 1)
    
  • Python
    from sympy import isprime
    from itertools import islice
    from fractions import Fraction
    def agen(): # generator of terms
        f = Fraction(1, 1)
        while True:
            n, d = f.numerator + 10*f.denominator, f.numerator + f.denominator
            if isprime(n): yield n
            f = Fraction(n, d)
    print(list(islice(agen(), 11))) # Michael S. Branicky, Jan 23 2023

Formula

Given t(0)=1, b(0)=1 then for i = 1, 2, ..., t(i)/b(i) = (t(i-1) + 10*b(i-1)) /(t(i-1) + b(i-1)), and sequence consists of the t(i) that are prime.

Extensions

a(11) from Michel Marcus, Jan 23 2023
Name simplified by Sean A. Irvine, Feb 25 2023

A143970 Eigentriangle by rows, n terms of (10 * A002535) followed by A002535(n).

Original entry on oeis.org

1, 10, 1, 10, 10, 11, 10, 10, 110, 31, 10, 10, 110, 310, 161, 10, 10, 110, 310, 1610, 601, 10, 10, 110, 310, 1610, 6010, 2651, 10, 10, 110, 310, 1610, 6010, 26510, 10711
Offset: 0

Views

Author

Gary W. Adamson, Sep 06 2008

Keywords

Comments

A002535 = (1, 1, 11, 31, 161, 601,...) = right border. Row sums = (1, 11, 31, 161,...) = INVERT transform of (1, 10, 10, 10,...). Sum of n-th row terms = rightmost term of next row.

Examples

			First few rows of the triangle =
1;
10, 1;
10, 10, 11;
10, 10, 110, 31;
10, 10, 110, 310, 161;
10, 10, 110, 320, 1610, 601;
...
		

Crossrefs

Formula

Eigentriangle by rows, n terms of (10 * A002535) followed by A002535(n)

A098158 Triangle T(n,k) with diagonals T(n,n-k) = binomial(n, 2*k).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 0, 3, 1, 0, 0, 1, 6, 1, 0, 0, 0, 5, 10, 1, 0, 0, 0, 1, 15, 15, 1, 0, 0, 0, 0, 7, 35, 21, 1, 0, 0, 0, 0, 1, 28, 70, 28, 1, 0, 0, 0, 0, 0, 9, 84, 126, 36, 1, 0, 0, 0, 0, 0, 1, 45, 210, 210, 45, 1, 0, 0, 0, 0, 0, 0, 11, 165, 462, 330, 55, 1, 0, 0, 0, 0, 0, 0, 1, 66, 495, 924
Offset: 0

Views

Author

Paul Barry, Aug 29 2004

Keywords

Comments

Row sums are A011782. Inverse is A065547.
Triangle T(n,k), 0 <= k <= n, read by rows, given by [0, 1, -1, 0, 0, 0, 0, 0, ...] DELTA [1, 0, 1, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, Jul 29 2006
Sum of entries in column k is A001519(k+1) (the odd-indexed Fibonacci numbers). - Philippe Deléham, Dec 02 2008
Number of permutations of length n avoiding simultaneously the patterns 123 and 132 with k left-to-right minima. A left-to-right minimum in a permutation a(1)a(2)...a(n) is position i such that a(j) > a(i) for all j < i. - Tian Han, Nov 16 2023

Examples

			Rows begin
  1;
  0, 1;
  0, 1, 1;
  0, 0, 3, 1;
  0, 0, 1, 6, 1;
		

Crossrefs

Cf. A119900. - Philippe Deléham, Dec 02 2008

Programs

  • GAP
    Flat(List([0..12], n-> List([0..n], k-> Binomial(n, 2*(n-k)) ))); # G. C. Greubel, Aug 01 2019
  • Magma
    [Binomial(n, 2*(n-k)): k in [0..n], n in [0..12]]; // G. C. Greubel, Aug 01 2019
    
  • Mathematica
    Table[Binomial[n, 2*(n-k)], {n,0,12}, {k,0,n}]//Flatten (* Michael De Vlieger, Oct 12 2016 *)
  • PARI
    {T(n,k)=polcoeff(polcoeff((1-x*y)/((1-x*y)^2-x^2*y)+x*O(x^n), n, x) + y*O(y^k),k,y)} (Hanna)
    
  • PARI
    T(n,k) = binomial(n, 2*(n-k));
    for(n=0,12, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Aug 01 2019
    
  • Sage
    [[binomial(n, 2*(n-k)) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Aug 01 2019
    

Formula

T(n,k) = binomial(n,2*(n-k)).
From Tom Copeland, Oct 10 2016: (Start)
E.g.f.: exp(t*x) * cosh(t*sqrt(x)).
O.g.f.: (1/2) * ( 1 / (1 - (1 + sqrt(1/x))*x*t) + 1 / (1 - (1 - sqrt(1/x))*x*t) ).
Row polynomial: x^n * ((1 + sqrt(1/x))^n + (1 - sqrt(1/x))^n) / 2. (End)
Column k is generated by the polynomial Sum_{j=0..floor(k/2)} C(k, 2j) * x^(k-j). - Paul Barry, Jan 22 2005
G.f.: (1-x*y)/((1-x*y)^2 - x^2*y). - Paul D. Hanna, Feb 25 2005
Sum_{k=0..n} x^k*T(n,k)= A009116(n), A000007(n), A011782(n), A006012(n), A083881(n), A081335(n), A090139(n), A145301(n), A145302(n), A145303(n), A143079(n) for x = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 respectively. - Philippe Deléham, Dec 04 2006, Oct 15 2008, Oct 19 2008
T(n,k) = T(n-1,k-1) + Sum_{i=0..k-1} T(n-2-i,k-1-i); T(0,0)=1; T(n,k)=0 if n < 0 or k < 0 or n < k. E.g.: T(8,5) = T(7,4) + T(6,4) + T(5,3) + T(4,2) + T(3,1) + T(2,0) = 7+15+5+1+0+0 = 28. - Philippe Deléham, Dec 04 2006
Sum_{k=0..n} T(n,k)*x^(n-k) = A000012(n), A011782(n), A001333(n), A026150(n), A046717(n), A084057(n), A002533(n), A083098(n), A084058(n), A003665(n), A002535(n), A133294(n), A090042(n), A125816(n), A133343(n), A133345(n), A120612(n), A133356(n), A125818(n) for x = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 respectively. - Philippe Deléham, Dec 24 2007
Sum_{k=0..n} T(n,k)*(-x)^(n-k) = A000012(n), A146559(n), A087455(n), A138230(n), A006495(n), A138229(n) for x = 0,1,2,3,4,5 respectively. - Philippe Deléham, Nov 14 2008
T(n,k) = A085478(k,n-k). - Philippe Deléham, Dec 02 2008
T(n,k) = 2*T(n-1,k-1) + T(n-2,k-1) - T(n-2,k-2), T(0,0) = T(1,1) = 1, T(1,0) = 0 and T(n,k) = 0 if k < 0 or if k > n. - Philippe Deléham, Mar 15 2012

A124182 A skewed version of triangular array A081277.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 0, 3, 4, 0, 0, 1, 8, 8, 0, 0, 0, 5, 20, 16, 0, 0, 0, 1, 18, 48, 32, 0, 0, 0, 0, 7, 56, 112, 64, 0, 0, 0, 0, 1, 32, 160, 256, 128, 0, 0, 0, 0, 0, 9, 120, 432, 576, 256, 0, 0, 0, 0, 0, 1, 50, 400, 1120, 1280, 512
Offset: 0

Views

Author

Philippe Deléham, Dec 05 2006

Keywords

Comments

Triangle T(n,k), 0 <= k <= n, read by rows given by [0, 1, -1, 0, 0, 0, 0, 0, 0, ...] DELTA [1, 1, 0, 0, 0, 0, 0, 0, 0,...] where DELTA is the operator defined in A084938. Falling diagonal sums in A052980.

Examples

			Triangle begins:
  1;
  0, 1;
  0, 1, 2;
  0, 0, 3, 4;
  0, 0, 1, 8,  8;
  0, 0, 0, 5, 20, 16;
  0, 0, 0, 1, 18, 48,  32;
  0, 0, 0, 0,  7, 56, 112,  64;
  0, 0, 0, 0,  1, 32, 160, 256,  128;
  0, 0, 0, 0,  0,  9, 120, 432,  576,  256;
  0, 0, 0, 0,  0,  1,  50, 400, 1120, 1280, 512;
		

Crossrefs

Cf. A025192 (column sums). Diagonals include A011782, A001792, A001793, A001794, A006974, A006975, A006976.

Formula

T(0,0)=T(1,1)=1, T(n,k)=0 if n < k or if k < 0, T(n,k) = T(n-2,k-1) + 2*T(n-1,k-1).
Sum_{k=0..n} x^k*T(n,k) = (-1)^n*A090965(n), (-1)^n*A084120(n), (-1)^n*A006012(n), A033999(n), A000007(n), A001333(n), A084059(n) for x = -4, -3, -2, -1, 0, 1, 2 respectively.
Sum_{k=0..floor(n/2)} T(n-k,k) = Fibonacci(n-1) = A000045(n-1).
Sum_{k=0..n} T(n,k)*x^(n-k) = A000012(n), A011782(n), A001333(n), A026150(n), A046717(n), A084057(n), A002533(n), A083098(n), A084058(n), A003665(n), A002535(n), A133294(n), A090042(n), A125816(n), A133343(n), A133345(n), A120612(n), A133356(n), A125818(n) for x = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 respectively. - Philippe Deléham, Dec 26 2007
Sum_{k=0..n} T(n,k)*(-x)^(n-k) = A011782(n), A000012(n), A146559(n), A087455(n), A138230(n), A006495(n), A138229(n) for x= 0,1,2,3,4,5,6 respectively. - Philippe Deléham, Nov 14 2008
G.f.: (1-y*x)/(1-2y*x-y*x^2). - Philippe Deléham, Dec 04 2011
Sum_{k=0..n} T(n,k)^2 = A002002(n) for n > 0. - Philippe Deléham, Dec 04 2011

A201701 Riordan triangle ((1-x)/(1-2*x), x^2/(1-2*x)).

Original entry on oeis.org

1, 1, 0, 2, 1, 0, 4, 3, 0, 0, 8, 8, 1, 0, 0, 16, 20, 5, 0, 0, 0, 32, 48, 18, 1, 0, 0, 0, 64, 112, 56, 7, 0, 0, 0, 0, 128, 256, 160, 32, 1, 0, 0, 0, 0, 256, 576, 432, 120, 9, 0, 0, 0, 0, 0, 512, 1280, 1120, 400, 50, 1, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Philippe Deléham, Dec 03 2011

Keywords

Comments

Triangle T(n,k), read by rows, given by (1,1,0,0,0,0,0,0,0,...) DELTA (0,1,-1,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938.
Skewed version of triangle in A200139.
Triangle without zeros: A207537.
For the version with negative odd numbered columns, which is Riordan ((1-x)/(1-2*x), -x^2/(1-2*x)) see comments on A028297 and A039991. - Wolfdieter Lang, Aug 06 2014
This is an example of a stretched Riordan array in the terminology of Section 2 of Corsani et al. - Peter Bala, Jul 14 2015

Examples

			The triangle T(n,k) begins:
  n\k      0     1     2     3     4    5   6  7 8 9 10 11 ...
  0:       1
  1:       1     0
  2:       2     1     0
  3:       4     3     0     0
  4:       8     8     1     0     0
  5:      16    20     5     0     0    0
  6:      32    48    18     1     0    0   0
  7:      64   112    56     7     0    0   0  0
  8:     128   256   160    32     1    0   0  0 0
  9:     256   576   432   120     9    0   0  0 0 0
  10:    512  1280  1120   400    50    1   0  0 0 0  0
  11:   1024  2816  2816  1232   220   11   0  0 0 0  0  0
  ...  reformatted and extended. - _Wolfdieter Lang_, Aug 06 2014
		

Crossrefs

Diagonals sums are in A052980.
Cf. A028297, A081265, A124182, A131577, A039991 (zero-columns deleted, unsigned and zeros appended).
Cf. A028297 (signed version, zeros deleted). Cf. A034839.

Programs

  • Mathematica
    (* The function RiordanArray is defined in A256893. *)
    RiordanArray[(1 - #)/(1 - 2 #)&, #^2/(1 - 2 #)&, 11] // Flatten (* Jean-François Alcover, Jul 16 2019 *)

Formula

T(n,k) = 2*T(n-1,k) + T(n-2,k-1) with T(0,0) = T(1,0) = 1, T(1,1) = 0 and T(n,k) = 0 for k<0 or for n
Sum_{k=0..n} T(n,k)^2 = A002002(n) for n>0.
Sum_{k=0..n} T(n,k)*x^k = A138229(n), A006495(n), A138230(n), A087455(n), A146559(n), A000012(n), A011782(n), A001333(n), A026150(n), A046717(n), A084057(n), A002533(n), A083098(n), A084058(n), A003665(n), A002535(n), A133294(n), A090042(n), A125816(n), A133343(n), A133345(n), A120612(n), A133356(n), A125818(n) for x = -6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17 respectively.
G.f.: (1-x)/(1-2*x-y*x^2). - Philippe Deléham, Mar 03 2012
From Peter Bala, Jul 14 2015: (Start)
Factorizes as A034839 * A007318 = (1/(1 - x), x^2/(1 - x)^2) * (1/(1 - x), x/(1 - x)) as a product of Riordan arrays.
T(n,k) = Sum_{i = k..floor(n/2)} binomial(n,2*i) *binomial(i,k). (End)

Extensions

Name changed, keyword:easy added, crossrefs A028297 and A039991 added, and g.f. corrected by Wolfdieter Lang, Aug 06 2014

A202023 Triangle T(n,k), read by rows, given by (1, 0, 1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 1, -1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 3, 0, 0, 1, 6, 1, 0, 0, 1, 10, 5, 0, 0, 0, 1, 15, 15, 1, 0, 0, 0, 1, 21, 35, 7, 0, 0, 0, 0, 1, 28, 70, 28, 1, 0, 0, 0, 0, 1, 36, 126, 84, 9, 0, 0, 0, 0, 0, 1, 45, 210, 210, 45, 1, 0, 0, 0, 0, 0
Offset: 0

Author

Philippe Deléham, Dec 10 2011

Keywords

Comments

Riordan array (1/(1-x), x^2/(1-x)^2).
A skewed version of triangular array A085478.
Mirror image of triangle in A098158.
Sum_{k, 0<=k<=n} T(n,k)*x^k = A138229(n), A006495(n), A138230(n),A087455(n), A146559(n), A000012(n), A011782(n), A001333(n),A026150(n), A046717(n), A084057(n), A002533(n), A083098(n),A084058(n), A003665(n), A002535(n), A133294(n), A090042(n),A125816(n), A133343(n), A133345(n), A120612(n), A133356(n), A125818(n) for x = -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 respectively.
Sum_{k, 0<=k<=n} T(n,k)*x^(n-k) = A009116(n), A000007(n), A011782(n), A006012(n), A083881(n), A081335(n), A090139(n), A145301(n), A145302(n), A145303(n), A143079(n) for x = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 respectively.
From Gus Wiseman, Jul 08 2025: (Start)
After the first row this is also the number of subsets of {1..n-1} with k maximal runs (sequences of consecutive elements increasing by 1) for k = 0..n. For example, row n = 5 counts the following subsets:
{} {1} {1,3} . . .
{2} {1,4}
{3} {2,4}
{4} {1,2,4}
{1,2} {1,3,4}
{2,3}
{3,4}
{1,2,3}
{2,3,4}
{1,2,3,4}
Requiring n-1 gives A202064.
For anti-runs instead of runs we have A384893.
(End)

Examples

			Triangle begins :
1
1, 0
1, 1, 0
1, 3, 0, 0
1, 6, 1, 0, 0
1, 10, 5, 0, 0, 0
1, 15, 15, 1, 0, 0, 0
1, 21, 35, 7, 0, 0, 0, 0
1, 28, 70, 28, 1, 0, 0, 0, 0
		

Crossrefs

Column k = 1 is A000217.
Column k = 2 is A000332.
Row sums are A011782 (or A000079 shifted right).
Removing all zeros gives A034839 (requiring n-1 A034867).
Last nonzero term in each row appears to be A093178, requiring n-1 A124625.
Reversing rows gives A098158, without zeros A109446.
Without the k = 0 column we get A210039.
Row maxima appear to be A214282.
A116674 counts strict partitions by number of maximal runs, for anti-runs A384905.
A268193 counts integer partitions by number of maximal runs, for anti-runs A384881.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n-1]],Length[Split[#,#2==#1+1&]]==k&]],{n,0,10},{k,0,n}] (* Gus Wiseman, Jul 08 2025 *)

Formula

T(n,k) = binomial(n,2k).
G.f.: (1-x)/((1-x)^2-y*x^2).
T(n,k)= Sum_{j, j>=0} T(n-1-j,k-1)*j with T(n,0)=1 and T(n,k)= 0 if k<0 or if n
T(n,k) = 2*T(n-1,k) + T(n-2,k-1) - T(n-2,k) for n>1, T(0,0) = T(1,0) = 1, T(1,1) = 0, T(n,k) = 0 if k>n or if k<0. - Philippe Deléham, Nov 10 2013

A084132 a(n) = 4*a(n-1) + 6*a(n-2), a(0)=1, a(1)=2.

Original entry on oeis.org

1, 2, 14, 68, 356, 1832, 9464, 48848, 252176, 1301792, 6720224, 34691648, 179087936, 924501632, 4772534144, 24637146368, 127183790336, 656558039552, 3389334900224, 17496687838208, 90322760754176, 466271170045952
Offset: 0

Author

Paul Barry, May 16 2003

Keywords

Comments

Binomial transform of A002535.

Crossrefs

Programs

  • Magma
    [n le 2 select 2^(n-1) else 4*Self(n-1) +6*Self(n-2): n in [1..40]]; // G. C. Greubel, Oct 13 2022
  • Mathematica
    LinearRecurrence[{4,6}, {1,2}, 40] (* G. C. Greubel, Oct 13 2022 *)
  • SageMath
    [lucas_number2(n,4,-6)/2 for n in range(0, 22)] # Zerinvary Lajos, May 14 2009
    
  • SageMath
    A084132=BinaryRecurrenceSequence(4,6,1,2)
    [A084132(n) for n in range(41)] # G. C. Greubel, Oct 13 2022
    

Formula

a(n) = (2+sqrt(10))^n/2 + (2-sqrt(10))^n/2.
G.f.: (1-2*x)/(1-4*x-6*x^2).
E.g.f.: exp(2*x)*cosh(sqrt(10)*x).
a(n) = Sum_{k=0..n} A201730(n,k)*9^k. - Philippe Deléham, Dec 06 2011
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - x*(5*k-2)/(x*(5*k+3) - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 03 2013
a(n) = 2*i^n*6^((n-2)/2)*( 3*ChebyshevU(n, 2/(i*sqrt(6))) + i*sqrt(6)*ChebyshevU(n -1, 2/(i*sqrt(6))) ). - G. C. Greubel, Oct 13 2022

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

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;
		

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

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

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.

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

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

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.
		

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}]
Showing 1-10 of 10 results.