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

A072265 Variant of Lucas numbers: a(n) = a(n-1) + 4*a(n-2) starting with a(0)=2 and a(1)=1.

Original entry on oeis.org

2, 1, 9, 13, 49, 101, 297, 701, 1889, 4693, 12249, 31021, 80017, 204101, 524169, 1340573, 3437249, 8799541, 22548537, 57746701, 147940849, 378927653, 970691049, 2486401661, 6369165857, 16314772501, 41791435929, 107050525933, 274216269649, 702418373381
Offset: 0

Views

Author

Miklos Kristof, Jul 08 2002

Keywords

Comments

Pisano period lengths: 1, 1, 8, 1, 6, 8, 48, 2, 24, 6,120, 8, 12, 48, 24, 4, 8, 24, 18, 6, ... . - R. J. Mathar, Aug 10 2012
The Lucas sequence V(1,-4). - Peter Bala, Jun 23 2015

References

  • Thomas Koshy, "Fibonacci and Lucas Numbers with Applications", Wiley, 2001, p. 471.

Crossrefs

Cf. A006131.

Programs

  • GAP
    a:=[2,1];; for n in [3..30] do a[n]:=a[n-1]+4*a[n-2]; od; a; # G. C. Greubel, Jan 15 2020
  • Magma
    I:=[2,1]; [n le 2 select I[n] else Self(n-1) + 4*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 15 2020
    
  • Maple
    a:= n-> (Matrix([[1,2]]). Matrix([[1,1], [4,0]])^n)[1,2]:
    seq(a(n), n=0..32);  # Alois P. Heinz, Aug 15 2008
    a := n -> 2*(2*I)^n*ChebyshevT(n, -I/4):
    seq(simplify(a(n)), n = 0..29);  # Peter Luschny, Dec 03 2023
  • Mathematica
    CoefficientList[Series[(2-x)/(1-x-4*x^2), {x,0,30}], z] (* Vladimir Joseph Stephan Orlovsky, Jun 11 2011 *)
    Table[2^n*LucasL[n, 1/2], {n,0,30}] (* G. C. Greubel, Jan 15 2020 *)
  • PARI
    polsym(x^2-x-4, 44)
    
  • Sage
    [lucas_number2(n,1,-4) for n in range(0, 27)] # Zerinvary Lajos, Apr 30 2009
    

Formula

G.f.: (2-x)/(1-x-4*x^2). - Gary W. Adamson, Jul 02 2003
a(n) = ((1+sqrt(17))/2)^n + ((1-sqrt(17))/2)^n = 4*A006131(n-1) + A006131(n+1) = A075117(4, n).
a(n) = [x^n] ( (1 + x + sqrt(1 + 2*x + 17*x^2))/2 )^n for n >= 1. - Peter Bala, Jun 23 2015
a(n) = 2^n * Lucas(n, 1/2). - G. C. Greubel, Jan 15 2020

Extensions

Edited and extended by Henry Bottomley, Sep 03 2002

A075118 Variant on Lucas numbers: a(n) = a(n-1) + 3*a(n-2) with a(0)=2 and a(1)=1.

Original entry on oeis.org

2, 1, 7, 10, 31, 61, 154, 337, 799, 1810, 4207, 9637, 22258, 51169, 117943, 271450, 625279, 1439629, 3315466, 7634353, 17580751, 40483810, 93226063, 214677493, 494355682, 1138388161, 2621455207, 6036619690, 13900985311, 32010844381, 73713800314, 169746333457
Offset: 0

Views

Author

Henry Bottomley, Sep 02 2002

Keywords

Comments

The sequence 4,1,7,.. = 2*0^n+A075118(n) is given by trace(A^n) where A=[1,1,1,1;1,0,0,0;1,0,0,0;1,0,0,0]. - Paul Barry, Oct 01 2004
For n>2, a(n) is the numerator of the value of the continued fraction 1+3/(1+3/(1+...+3/7)) where there are n-2 1's. - Alexander Mark, Aug 16 2020

Examples

			a(4) = a(3)+3*a(2) = 10+3*7 = 31.
		

References

  • Thomas Koshy, "Fibonacci and Lucas Numbers with Applications", Wiley, 2001, p. 471.

Crossrefs

Programs

  • GAP
    a:=[2,1];; for n in [3..40] do a[n]:=a[n-1]+3*a[n-2]; od; a; # G. C. Greubel, Jan 15 2020
  • Magma
    I:=[2,1]; [n le 2 select I[n] else Self(n-1)+3*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Jul 20 2013
    
  • Magma
    R:=PowerSeriesRing(Integers(), 33); Coefficients(R!((2-x)/(1-x-3*x^2))); // Marius A. Burtea, Jan 15 2020
    
  • Maple
    a:= n-> (Matrix([[1,2]]). Matrix([[1,1], [3,0]])^n)[1,2]:
    seq(a(n), n=0..35);  # Alois P. Heinz, Aug 15 2008
  • Mathematica
    a[0]=2; a[1]=1; a[n_]:= a[n]= a[n-1] +3a[n-2]; Table[a[n], {n, 0, 30}]
    CoefficientList[Series[(2-x)/(1-x-3x^2), {x,0,40}], x] (* Vincenzo Librandi, Jul 20 2013 *)
    LinearRecurrence[{1,3},{2,1},40] (* Harvey P. Dale, Jun 18 2017 *)
    Table[Round[Sqrt[3]^n*LucasL[n, 1/Sqrt[3]]], {n,0,40}] (* G. C. Greubel, Jan 15 2020 *)
  • PARI
    my(x='x+O('x^30)); Vec((2-x)/(1-x-3*x^2)) \\ G. C. Greubel, Dec 21 2017
    
  • PARI
    polsym(x^2-x-3, 44) \\ Joerg Arndt, Jan 22 2023
    
  • Sage
    [lucas_number2(n,1,-3) for n in range(0, 30)] # Zerinvary Lajos, Apr 30 2009
    

Formula

a(n) = ((1+sqrt(13))/2)^n + ((1-sqrt(13))/2)^n.
a(n) = 2*A006130(n) - A006130(n-1) = A075117(3, n).
G.f.: (2-x)/(1-x-3*x^2). - Philippe Deléham, Nov 15 2008
a(n) = [x^n] ( (1 + x + sqrt(1 + 2*x + 13*x^2))/2 )^n for n >= 1. - Peter Bala, Jun 23 2015
a(n) = 3^(n/2) * Lucas(n, 1/sqrt(3)). - G. C. Greubel, Jan 15 2020

A075014 Smallest k such that the concatenation k, k-1 is divisible by n; or 0 if no such number exists.

Original entry on oeis.org

1, 1, 2, 3, 1, 5, 2, 3, 5, 1, 17, 17, 6, 9, 11, 3, 16, 5, 7, 21, 2, 17, 18, 29, 26, 17, 5, 33, 8, 11, 35, 3, 17, 33, 26, 41, 11, 7, 17, 21, 13, 47, 4, 17, 41, 41, 27, 29, 9, 51, 50, 17, 21, 5, 61, 61, 35, 27, 52, 41, 29, 35, 68, 45, 6
Offset: 1

Views

Author

Amarnath Murthy, Sep 01 2002

Keywords

Examples

			a(14) = 9 as 14 divides 98.
		

Crossrefs

Programs

  • Mathematica
    skc[n_]:=Module[{k=1},While[Mod[FromDigits[Flatten[IntegerDigits/@{k,k-1}]],n] != 0,k++];k]; Array[skc,70] (* Harvey P. Dale, Mar 04 2023 *)

Extensions

Corrected and extended by Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 19 2003

A075015 Smallest k such that the concatenation k, k+1, k+2 is divisible by n; or 0 if no such number exists.

Original entry on oeis.org

1, 2, 1, 4, 3, 2, 5, 4, 2, 8, 8, 4, 2, 104, 3, 18, 17, 2, 4, 18, 5, 8, 3, 4, 23, 2, 5, 118, 37, 8, 39, 18, 8, 34, 118, 14, 110, 4, 2, 18, 1, 104, 47, 10, 8, 32, 49, 18, 104, 48, 17, 142, 48, 8, 8, 118, 4, 66, 21, 18, 48, 70, 5, 50
Offset: 1

Views

Author

Amarnath Murthy, Sep 01 2002

Keywords

Examples

			a(13) = 2 as 13 divides 234.
		

Crossrefs

Programs

  • Mathematica
    Table[Module[{k=1},While[!Divisible[FromDigits[Flatten[ IntegerDigits/@ Range[k,k+2]]],n],k++];k],{n,70}] (* Harvey P. Dale, May 10 2012 *)

Extensions

Corrected and extended by Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 19 2003

A075016 Smallest k such that the concatenation k, k-1,k-2 is divisible by n; or 0 if no such number exists.

Original entry on oeis.org

2, 2, 2, 4, 2, 2, 2, 4, 4, 2, 12, 4, 105, 2, 2, 4, 7, 4, 18, 22, 2, 12, 11, 4, 27, 118, 4, 106, 21, 2, 23, 14, 12, 34, 2, 4, 112, 18, 105, 22, 15, 2, 39, 34, 7, 14, 9, 4, 141, 52, 7, 118, 58, 4, 12, 106, 18, 50, 38, 22, 10, 54, 106, 14, 157
Offset: 1

Views

Author

Amarnath Murthy, Sep 01 2002

Keywords

Examples

			a(11) = 12 as 11 divides 121110.
		

Crossrefs

Programs

  • Mathematica
    skc[n_]:=Module[{k=2},While[Mod[FromDigits[Flatten[IntegerDigits/@ Range[ k,k-2,-1]]],n]!=0,k++];k]; Array[skc,70] (* Harvey P. Dale, Nov 01 2019 *)

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 19 2003

A075013 Smallest k such that the decimal concatenation of k and k+1 is divisible by n.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 5, 5, 4, 9, 16, 1, 7, 5, 4, 19, 3, 13, 22, 19, 16, 27, 2, 19, 24, 7, 31, 5, 31, 19, 27, 19, 16, 3, 9, 31, 26, 41, 7, 19, 28, 37, 20, 27, 4, 51, 20, 19, 16, 49, 52, 35, 32, 31, 49, 5, 22, 31, 66, 19, 32, 27, 58, 19, 9, 49, 6, 35, 28, 9, 26, 67, 13, 63, 49, 79, 16
Offset: 1

Views

Author

Amarnath Murthy, Sep 01 2002

Keywords

Examples

			a(16) = 19 as 16 divides 1920.
		

Crossrefs

Programs

Extensions

Corrected and extended by Ralf Stephan, Mar 23 2003

A075018 Smallest k such that the concatenation k, k-1,k-2,k-3 is divisible by n; or 0 if no such number exists.

Original entry on oeis.org

3, 3, 3, 5, 3, 3, 5, 5, 6, 3, 18, 9, 11, 5, 3, 15, 13, 15, 19, 23, 18, 29, 29, 15, 28, 11, 33, 5, 4, 3, 40, 15, 18, 13, 18, 15, 28, 19, 24, 23, 26, 39, 7, 51, 33, 29, 55, 15, 53, 53, 30, 63, 54, 33, 18, 5, 57, 41, 56, 63, 69, 71, 60, 15, 63
Offset: 1

Views

Author

Amarnath Murthy, Sep 01 2002

Keywords

Examples

			a(7) = 5 as 7 divides 5432.
		

Crossrefs

Programs

  • Mathematica
    Transpose[Flatten[Table[Select[Reverse[Partition[Range[100,0,-1], 4,1]], Divisible[FromDigits[ Flatten[IntegerDigits/@#]],n]&,1],{n,70}],1]] [[1]] (* Harvey P. Dale, Nov 22 2011 *)

Extensions

Corrected and extended by Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 19 2003
Showing 1-7 of 7 results.