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 11-20 of 25 results. Next

A175182 Pisano period of the 3-Fibonacci numbers A006190.

Original entry on oeis.org

1, 3, 2, 6, 12, 6, 16, 12, 6, 12, 8, 6, 52, 48, 12, 24, 16, 6, 40, 12, 16, 24, 22, 12, 60, 156, 18, 48, 28, 12, 64, 48, 8, 48, 48, 6, 76, 120, 52, 12, 28, 48, 42, 24, 12, 66, 96, 24, 112, 60, 16, 156, 26, 18, 24, 48, 40, 84, 24, 12, 30, 192, 48, 96, 156, 24, 136, 48, 22, 48, 144
Offset: 1

Views

Author

R. J. Mathar, Mar 01 2010

Keywords

Comments

Period of the sequence defined by reading A006190 modulo n.

Crossrefs

Programs

  • Maple
    F := proc(k,n) option remember; if n <= 1 then n; else k*procname(k,n-1)+procname(k,n-2) ; end if; end proc:
    Pper := proc(k,m) local cha, zer,n,fmodm ; cha := [] ; zer := [] ; for n from 0 do fmodm := F(k,n) mod m ; cha := [op(cha),fmodm] ; if fmodm = 0 then zer := [op(zer),n] ; end if; if nops(zer) = 5 then break; end if; end do ; if [op(1..zer[2],cha) ] = [ op(zer[2]+1..zer[3],cha) ] and [op(1..zer[2],cha)] = [ op(zer[3]+1..zer[4],cha) ] and [op(1..zer[2],cha)] = [ op(zer[4]+1..zer[5],cha) ] then return zer[2] ; elif [op(1..zer[3],cha) ] = [ op(zer[3]+1..zer[5],cha) ] then return zer[3] ; else return zer[5] ; end if; end proc:
    k := 3 ; seq( Pper(k,m),m=1..80) ;
  • Mathematica
    Table[s = t = Mod[{0, 1}, n]; cnt = 1; While[tmp = Mod[3*t[[2]] + t[[1]], n]; t[[1]] = t[[2]]; t[[2]] = tmp; s!= t, cnt++]; cnt, {n, 100}] (* Vincenzo Librandi, Dec 20 2012, T. D. Noe *)

A077985 Expansion of 1/(1 + 2*x - x^2).

Original entry on oeis.org

1, -2, 5, -12, 29, -70, 169, -408, 985, -2378, 5741, -13860, 33461, -80782, 195025, -470832, 1136689, -2744210, 6625109, -15994428, 38613965, -93222358, 225058681, -543339720, 1311738121, -3166815962, 7645370045, -18457556052, 44560482149, -107578520350, 259717522849
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

Pisano period lengths: 1, 2, 8, 4, 12, 8, 6, 8, 24, 12, 24, 8, 28, 6, 24, 16, 16, 24, 40, 12, ... (is this A175181?) - R. J. Mathar, Aug 10 2012
The sequence 0, 1, -2, 5, -12, 29, -70, 169, -408, 985, ... with a leading 0 is the Lucas U(-2,-1)-sequence. - R. J. Mathar, Jan 08 2013
From Wolfdieter Lang, Dec 07 2014: (Start)
a(n) is the irrational part of the Q(sqrt(2)) integer (sqrt(2) - 1)^n = A123335(n) + a(n-1)*sqrt(2), with a(-1) = 0.
3^n*a(n-1) = A251733(n), with a(-1) = 0, is the irrational part of the Q(sqrt(2)) integer giving the length of a variant of Lévy's C-curve at iteration step n. (End)

Examples

			G.f. = 1 - 2*x + 5*x^2 - 12*x^3 + 29*x^4 - 70*x^5 + 169*x^6 - 408*x^7 + ...
		

Crossrefs

Essentially the same as A000129, which is the main entry for these numbers.

Programs

  • Magma
    I:=[1,-2]; [n le 2 select I[n] else -2*Self(n-1)+Self(n-2): n in [1..35]]; // Vincenzo Librandi, Jan 21 2017
  • Mathematica
    PSE[a_,b_,n_]:=Join[{1,x=a,y=b},Table[z=Floor[y^2/x+1/2];x=y;y=z,{n}]];A077985=PSE[-2,5,50] (* Vladimir Joseph Stephan Orlovsky, Mar 26 2011 *)
    LinearRecurrence[{-2,1},{1,-2},40] (* Harvey P. Dale, Jun 04 2012 *)
    CoefficientList[Series[1/(1 + 2 x/(1 + x/(2 - x))), {x, 0, 30}], x] (* Vincenzo Librandi, Jan 21 2017 *)
  • PARI
    Vec(1/(1+2*x-x^2)+O(x^99)) \\ Charles R Greathouse IV, Sep 23 2012
    
  • PARI
    {a(n) = if( n<-1, (-1)^n*a(-2-n), polcoeff( 1 / (1 + 2*x - x^2) + x * O(x^n), n))}; /* Michael Somos, Jan 20 2017 */
    
  • PARI
    {a(n) = - imag((-1 - quadgen(8))^(n+1))}; /* Michael Somos, Jan 20 2017 */
    
  • Sage
    taylor( x/(1 + 2*x - x^2) ,x,0,31) # Zerinvary Lajos, May 29 2009
    

Formula

a(n) = (-1)^n * A000129(n+1). - M. F. Hasler, Oct 05 2008
a(0)=1, a(1)=-2, a(n) = -2*a(n-1) + a(n-2) for n>1. - Philippe Deléham, Sep 19 2009
G.f.: 1/(2+Q(0)), where Q(k)= 3*x - 1 + x*k + x*(1-x)*(k+1)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 05 2013
G.f.: Q(0)/(2+2*x), where Q(k)= 1 + 1/(1 - x*(2*k-1)/( x*(2*k+1) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 10 2013
G.f.: Q(0)/2, where Q(k) = 1 + 1/(1 - x*(4*k+2 - x )/( x*(4*k+4 - x) - 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 09 2013
G.f.: 1 / (1 + 2*x / (1 + x / (2 - x))). - Michael Somos, Jan 20 2017
a(n) = (-1)^n * a(-2-n) for all n in Z. - Michael Somos, Jan 20 2017
a(n) = (-(-1-sqrt(2))^(1+n) + (-1+sqrt(2))^(1+n)) / (2*sqrt(2)). - Colin Barker, Jan 21 2017
E.g.f.: exp(-x)*(2*cosh(sqrt(2)*x) - sqrt(2)*sinh(sqrt(2)*x))/2. - Stefano Spezia, Feb 01 2023

A175185 Pisano period of the 6-Fibonacci numbers A005668.

Original entry on oeis.org

1, 2, 2, 4, 20, 2, 16, 8, 6, 20, 24, 4, 6, 16, 20, 16, 36, 6, 8, 20, 16, 24, 48, 8, 100, 6, 18, 16, 60, 20, 30, 32, 24, 36, 80, 12, 12, 8, 6, 40, 40, 16, 42, 24, 60, 48, 96, 16, 112, 100, 36, 12, 26, 18, 120, 16, 8, 60, 40, 20, 124, 30, 48, 64, 60, 24, 22, 36, 48, 80, 70, 24, 148
Offset: 1

Views

Author

R. J. Mathar, Mar 01 2010

Keywords

Comments

Period of the sequence defined by reading A005668 modulo n.

Crossrefs

Programs

  • Maple
    F := proc(k,n) option remember; if n <= 1 then n; else k*procname(k,n-1)+procname(k,n-2) ; end if; end proc:
    Pper := proc(k,m) local cha, zer,n,fmodm ; cha := [] ; zer := [] ; for n from 0 do fmodm := F(k,n) mod m ; cha := [op(cha),fmodm] ; if fmodm = 0 then zer := [op(zer),n] ; end if; if nops(zer) = 5 then break; end if; end do ; if [op(1..zer[2],cha) ] = [ op(zer[2]+1..zer[3],cha) ] and [op(1..zer[2],cha)] = [ op(zer[3]+1..zer[4],cha) ] and [op(1..zer[2],cha)] = [ op(zer[4]+1..zer[5],cha) ] then return zer[2] ; elif [op(1..zer[3],cha) ] = [ op(zer[3]+1..zer[5],cha) ] then return zer[3] ; else return zer[5] ; end if; end proc:
    k := 6 ; seq( Pper(k,m),m=1..80) ;
  • Mathematica
    Table[s = t = Mod[{0, 1}, n]; cnt = 1; While[tmp = Mod[6*t[[2]] + t[[1]], n]; t[[1]] = t[[2]]; t[[2]] = tmp; s!= t, cnt++]; cnt, {n, 100}] (* Vincenzo Librandi, Dec 20 2012, after T. D. Noe *)

A322907 Entry points for the 3-Fibonacci numbers A006190.

Original entry on oeis.org

1, 3, 2, 6, 3, 6, 8, 6, 6, 3, 4, 6, 13, 24, 6, 12, 8, 6, 20, 6, 8, 12, 22, 6, 15, 39, 18, 24, 7, 6, 32, 24, 4, 24, 24, 6, 19, 60, 26, 6, 7, 24, 42, 12, 6, 66, 48, 12, 56, 15, 8, 78, 26, 18, 12, 24, 20, 21, 12, 6, 30, 96, 24, 48, 39, 12, 68, 24, 22, 24, 72, 6
Offset: 1

Views

Author

Jianing Song, Jan 05 2019

Keywords

Comments

a(n) is the smallest k > 0 such that n divides A006190(k).
a(n) is also called the rank of A006190(n) modulo n.
For primes p == 1, 9, 17, 25, 29, 49 (mod 52), a(p) divides (p - 1)/2.
For primes p == 3, 23, 27, 35, 43, 51 (mod 52), a(p) divides p - 1, but a(p) does not divide (p - 1)/2.
For primes p == 5, 21, 33, 37, 41, 45 (mod 52), a(p) divides (p + 1)/2.
For primes p == 7, 11, 15, 19, 31, 47 (mod 52), a(p) divides p + 1, but a(p) does not divide (p + 1)/2.
a(n) <= (12/7)*n for all n, where the equality holds if and only if n = 2*7^e, e >= 1.

Crossrefs

Let {x(n)} be a sequence defined by x(0) = 0, x(1) = 1, x(n+2) = k*x(n+1) + x(n). Then the periods, ranks and the ratios of the periods to the ranks modulo a given integer n are given by:
k = 1: A001175 (periods), A001177 (ranks), A001176 (ratios).
k = 2: A175181 (periods), A214028 (ranks), A214027 (ratios).
k = 3: A175182 (periods), this sequence (ranks), A322906 (ratios).
Cf. A006190.

Programs

  • PARI
    A006190(m) = ([3, 1; 1, 0]^m)[2, 1]
    a(n) = my(i=1); while(A006190(i)%n!=0, i++); i

Formula

a(m*n) = a(m)*a(n) if gcd(m, n) = 1.
For odd primes p, a(p^e) = p^(e-1)*a(p) if p^2 does not divide a(p). Any counterexample would be a 3-Wall-Sun-Sun prime.
a(2^e) = 3 if e = 1, 6 if e = 2 and 3*2^(e-2) if e >= 3. a(13^e) = 13^e, e >= 1.

A175183 Pisano period of the 4-Fibonacci numbers A001076.

Original entry on oeis.org

1, 2, 8, 2, 20, 8, 16, 4, 8, 20, 10, 8, 28, 16, 40, 8, 12, 8, 6, 20, 16, 10, 16, 8, 100, 28, 24, 16, 14, 40, 10, 16, 40, 12, 80, 8, 76, 6, 56, 20, 40, 16, 88, 10, 40, 16, 32, 8, 112, 100, 24, 28, 36, 24, 20, 16, 24, 14, 58, 40, 20, 10, 16, 32, 140, 40, 136, 12, 16, 80, 70, 8, 148, 76
Offset: 1

Views

Author

R. J. Mathar, Mar 01 2010

Keywords

Comments

Period of the sequence defined by reading A001076 modulo n.

Crossrefs

Programs

  • Maple
    F := proc(k,n) option remember; if n <= 1 then n; else k*procname(k,n-1)+procname(k,n-2) ; end if; end proc:
    Pper := proc(k,m) local cha, zer,n,fmodm ; cha := [] ; zer := [] ; for n from 0 do fmodm := F(k,n) mod m ; cha := [op(cha),fmodm] ; if fmodm = 0 then zer := [op(zer),n] ; end if; if nops(zer) = 5 then break; end if; end do ; if [op(1..zer[2],cha) ] = [ op(zer[2]+1..zer[3],cha) ] and [op(1..zer[2],cha)] = [ op(zer[3]+1..zer[4],cha) ] and [op(1..zer[2],cha)] = [ op(zer[4]+1..zer[5],cha) ] then return zer[2] ; elif [op(1..zer[3],cha) ] = [ op(zer[3]+1..zer[5],cha) ] then return zer[3] ; else return zer[5] ; end if; end proc:
    k := 4 ; seq( Pper(k,m),m=1..80) ;
  • Mathematica
    Table[s = t = Mod[{0, 1}, n]; cnt=1; While[tmp = Mod[4*t[[2]] + t[[1]], n]; t[[1]] = t[[2]]; t[[2]] = tmp; s!= t, cnt++]; cnt, {n, 100}] (* Vincenzo Librandi, Dec 20 2012, after T. D. Noe *)

A175184 Pisano period of the 5-Fibonacci numbers, A052918 preceded by 0.

Original entry on oeis.org

1, 3, 8, 6, 2, 24, 6, 12, 8, 6, 24, 24, 12, 6, 8, 24, 36, 24, 40, 6, 24, 24, 22, 24, 10, 12, 8, 6, 116, 24, 64, 48, 24, 36, 6, 24, 76, 120, 24, 12, 28, 24, 88, 24, 8, 66, 96, 24, 42, 30, 72, 12, 52, 24, 24, 12, 40, 348, 58, 24, 124, 192, 24, 96, 12, 24, 66, 36, 88, 6, 70, 24, 148
Offset: 1

Views

Author

R. J. Mathar, Mar 01 2010

Keywords

Comments

Period of the sequence defined by reading A052918 modulo n.

Crossrefs

Programs

  • Maple
    F := proc(k,n) option remember; if n <= 1 then n; else k*procname(k,n-1)+procname(k,n-2) ; end if; end proc:
    Pper := proc(k,m) local cha, zer,n,fmodm ; cha := [] ; zer := [] ; for n from 0 do fmodm := F(k,n) mod m ; cha := [op(cha),fmodm] ; if fmodm = 0 then zer := [op(zer),n] ; end if; if nops(zer) = 5 then break; end if; end do ; if [op(1..zer[2],cha) ] = [ op(zer[2]+1..zer[3],cha) ] and [op(1..zer[2],cha)] = [ op(zer[3]+1..zer[4],cha) ] and [op(1..zer[2],cha)] = [ op(zer[4]+1..zer[5],cha) ] then return zer[2] ; elif [op(1..zer[3],cha) ] = [ op(zer[3]+1..zer[5],cha) ] then return zer[3] ; else return zer[5] ; end if; end proc:
    k := 5 ; seq( Pper(k,m),m=1..80) ;
  • Mathematica
    Table[s = t = Mod[{0, 1}, n]; cnt = 1; While[tmp = Mod[5*t[[2]] + t[[1]], n]; t[[1]] = t[[2]]; t[[2]] = tmp; s!= t, cnt++]; cnt, {n, 100}] (* Vincenzo Librandi, Dec 20 2012, after T. D. Noe *)

A175286 Pisano period of the Jacobsthal sequence A001045 modulo n.

Original entry on oeis.org

1, 1, 6, 2, 4, 6, 6, 2, 18, 4, 10, 6, 12, 6, 12, 2, 8, 18, 18, 4, 6, 10, 22, 6, 20, 12, 54, 6, 28, 12, 10, 2, 30, 8, 12, 18, 36, 18, 12, 4, 20, 6, 14, 10, 36, 22, 46, 6, 42, 20, 24, 12, 52, 54, 20, 6, 18, 28, 58, 12, 60, 10, 18, 2, 12, 30, 66, 8, 66, 12, 70, 18, 18, 36, 60, 18, 30, 12, 78, 4
Offset: 1

Views

Author

R. J. Mathar, Mar 21 2010

Keywords

Examples

			Reading the sequence 0, 1, 1, 3, 5, 11, 21, ... modulo n=3, we get 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1, ... = A088689, which has a period (1, 1, 0, 2, 2, 0) of length a(n=3) = 6.
		

Crossrefs

A246556 a(n) = smallest prime which divides Pell(n) = A000129(n) but does not divide any Pell(k) for k

Original entry on oeis.org

2, 5, 3, 29, 7, 13, 17, 197, 41, 5741, 11, 33461, 239, 269, 577, 137, 199, 37, 19, 45697, 23, 229, 1153, 1549, 79, 53, 113, 44560482149, 31, 61, 665857, 52734529, 103, 1800193921, 73, 593, 9369319, 389, 241, 1746860020068409, 4663, 11437, 43, 6481, 47, 3761, 97, 293, 45245801, 101, 22307, 68480406462161287469, 7761799, 109, 1535466241
Offset: 2

Views

Author

Eric Chen, Nov 15 2014

Keywords

Comments

First differs from A264137 (Largest prime factor of the n-th Pell number) at n=17; see Example section. - Jon E. Schoenfield, Dec 10 2016

Examples

			a(2) = 2 because Pell(2) = 2 and Pell(k) < 2 for k < 2.
a(4) = 3 because Pell(4) = 12 = 2^2 * 3, but 2 is not a primitive prime factor since Pell(2) = 2, so therefore 3 is the primitive prime factor.
a(5) = 29 because Pell(5) = 29, which is prime.
a(6) = 7 because Pell(6) = 70 = 2 * 5 * 7, but neither 2 nor 5 is a primitive prime factor, so therefore 7 is the primitive prime factor.
a(17) = 137 because Pell(17) = 1136689 = 137 * 8297, and both of them are primitive factors, we choose the smallest. (Pell(17) is the smallest Pell number with more than one primitive prime factor.)
		

Crossrefs

Cf. A001578 (for Fibonacci(n)), A000129 (Pell numbers), A008555, A086383, A096650, A120947, A175181, A214028, A264137.

Programs

  • Mathematica
    prms={}; Table[f=First/@FactorInteger[Pell[n]]; p=Complement[f, prms]; prms=Join[prms, p]; If[p=={}, 1, First[p]], {n, 36}]

Formula

a(n) >= 2 for all n >= 2, by Carmichael's theorem. - Jonathan Sondow, Dec 08 2017

Extensions

Edited by N. J. A. Sloane, Nov 29 2014
Terms up to a(612) in b-file added by Sean A. Irvine, Sep 23 2019
Terms a(613)-a(630) in b-file added by Max Alekseyev, Aug 26 2021

A048693 Generalized Pellian with 2nd term equal to 6.

Original entry on oeis.org

1, 6, 13, 32, 77, 186, 449, 1084, 2617, 6318, 15253, 36824, 88901, 214626, 518153, 1250932, 3020017, 7290966, 17601949, 42494864, 102591677, 247678218, 597948113, 1443574444, 3485097001, 8413768446
Offset: 0

Views

Author

Keywords

Comments

Pisano period lengths: 1, 2, 8, 4, 12, 8, 6, 8, 24, 12, 24, 8, 28, 6, 24, 16, 16, 24, 40, 12, ... (is this A175181?). - R. J. Mathar, Aug 10 2012

Examples

			a(n)=[ (5+sqrt(2))(1+sqrt(2))^n-(5-sqrt(2))(1-sqrt(2))^n ]/2*sqrt(2)
		

Crossrefs

Programs

  • Maple
    with(combinat): a:=n->4*fibonacci(n-1,2)+fibonacci(n,2): seq(a(n), n=1..26); # Zerinvary Lajos, Apr 04 2008
  • Mathematica
    a[n_]:=(MatrixPower[{{1,2},{1,1}},n].{{5},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *)
    LinearRecurrence[{2,1},{1,6},30] (* Harvey P. Dale, Mar 29 2013 *)
  • Maxima
    a[0]:1$
    a[1]:6$
    a[n]:=2*a[n-1]+a[n-2]$
    A048693(n):=a[n]$
    makelist(A048693(n),n,0,30); /* Martin Ettl, Nov 03 2012 */

Formula

a(n) = 2*a(n-1) + a(n-2); a(0)=1, a(1)=6.
G.f.: (1+4*x)/(1 - 2*x - x^2). - Philippe Deléham, Nov 03 2008
a(n) = 4*A000129(n) + A000129(n+1). - R. J. Mathar, Aug 10 2012

A271782 Smallest n-Wall-Sun-Sun prime.

Original entry on oeis.org

13, 241, 2, 3, 191, 5, 2, 3, 2683
Offset: 2

Views

Author

Felix Fröhlich, Apr 18 2016

Keywords

Comments

A prime p is a k-Wall-Sun-Sun prime iff p^2 divides F_k(pi_k(p)), where F_k(n) is the k-Fibonacci numbers, i.e., a Lucas sequence of first kind with (P,Q) = (k,-1), and pi_k(p) is the Pisano period of k-Fibonacci numbers modulo p (cf. A001175, A175181-A175185).
For prime p > 2 not dividing k^2 + 4, it is a k-Wall-Sun-Sun prime iff p^2 | F_k(p-((k^2+4)/p)), where ((k^2+4)/p) is the Kronecker symbol.
a(1) would be the smallest Wall-Sun-Sun prime whose existence is an open question.
a(12)..a(16) = 2, 3, 3, 29, 2. a(18)..a(33) = 3, 11, 2, 23, 3, 3, 2, 5, 79, 3, 2, 7, 23, 3, 2, 239. a(36)..a(38) = 2, 7, 17. a(40), a(41) = 2, 3. a(43)..a(46) = 5, 2, 3, 41. - R. J. Mathar, Apr 22 2016
a(17) = 1192625911, a(35) = 153794959, a(39) = 30132289567, a(47)..a(50) = 139703, 2, 3, 3. If they exist, a(11), a(34), a(42) are greater than 10^12. - Max Alekseyev, Apr 26 2016
Column k = 1 of table T(n, k) of k-th n-Wall-Sun-Sun prime (that table is not yet in the OEIS as a sequence). - Felix Fröhlich, Apr 25 2016
From Richard N. Smith, Jul 16 2019: (Start)
a(n) = 2 if and only if n is divisible by 4.
a(n) = 3 if and only if n == 5, 9, 13, 14, 18, 22, 23, 27, 31 (mod 36). (End)

Crossrefs

Programs

  • PARI
    A271782(k) = forprime(p=2,10^8, if( (([0,1;1,k]*Mod(1,p^2))^(p-kronecker(k^2+4,p)))[1,2]==0, return(p);); ); \\ Max Alekseyev, Apr 22 2016, corrected by Richard N. Smith, Jul 16 2019 to include p=2 and p divides k^2+4

Formula

a(4n) = 2.

Extensions

Edited by Max Alekseyev, Apr 25 2016
Previous Showing 11-20 of 25 results. Next