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.

A015521 a(n) = 3*a(n-1) + 4*a(n-2), a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 3, 13, 51, 205, 819, 3277, 13107, 52429, 209715, 838861, 3355443, 13421773, 53687091, 214748365, 858993459, 3435973837, 13743895347, 54975581389, 219902325555, 879609302221, 3518437208883, 14073748835533
Offset: 0

Views

Author

Keywords

Comments

Inverse binomial transform of powers of 5 (A000351) preceded by 0. - Paul Barry, Apr 02 2003
Number of walks of length n between any two distinct vertices of the complete graph K_5. Example: a(2)=3 because the walks of length 2 between the vertices A and B of the complete graph ABCDE are: ACB, ADB, AEB. - Emeric Deutsch, Apr 01 2004
The terms of the sequence are the number of segments (sides) per iteration of the space-filling Peano-Hilbert curve. - Giorgio Balzarotti, Mar 16 2006
General form: k=4^n-k. Also: A001045, A078008, A097073, A115341, A015518, A054878. - Vladimir Joseph Stephan Orlovsky, Dec 11 2008
A further inverse binomial transform generates A015441. - Paul Curtz, Nov 01 2009
For n >= 2, a(n) equals the permanent of the (n-1) X (n-1) tridiagonal matrix with 3's along the central diagonal, and 2's along the subdiagonal and the superdiagonal. - John M. Campbell, Jul 19 2011
Pisano period lengths: 1, 1, 2, 2, 10, 2, 6, 2, 6, 10, 10, 2, 6, 6, 10, 2, 4, 6, 18, 10, ... - R. J. Mathar, Aug 10 2012
Sum_{i=0..m} (-1)^(m+i)*4^i, for m >= 0, gives the terms after 0. - Bruno Berselli, Aug 28 2013
The ratio a(n+1)/a(n) converges to 4 as n approaches infinity. - Felix P. Muga II, Mar 09 2014
This is the Lucas sequence U(P=3,Q=-4), and hence for n>=0, a(n+2)/a(n+1) equals the continued fraction 3 + 4/(3 + 4/(3 + 4/(3 + ... + 4/3))) with n 4's. - Greg Dresden, Oct 07 2019
For n > 0, gcd(a(n), a(n+1)) = 1. - Kengbo Lu, Jul 27 2020

Examples

			G.f. = x + 3*x^2 + 13*x^3 + 51*x^4 + 205*x^5 + 819*x^6 + 3277*x^7 + 13107*x^8 + ...
		

Crossrefs

Programs

  • Magma
    [Floor(4^n/5-(-1)^n/5): n in [0..30]]; // Vincenzo Librandi, Jun 24 2011
    
  • Maple
    seq(round(4^n/5),n=0..25) # Mircea Merca, Dec 28 2010
  • Mathematica
    k=0;lst={k};Do[k=4^n-k;AppendTo[lst, k], {n, 0, 5!}];lst (* Vladimir Joseph Stephan Orlovsky, Dec 11 2008 *)
    LinearRecurrence[{3,4}, {0,1}, 30] (* Harvey P. Dale, Jun 26 2012 *)
    CoefficientList[Series[x/((1 - 4 x) (1 + x)), {x, 0, 50}], x] (* Vincenzo Librandi, Mar 26 2014 *)
  • PARI
    a(n) = 4^n/5-(-1)^n/5; \\ Altug Alkan, Jan 08 2016
    
  • PARI
    first(n) = Vec(x/(1 - 3*x - 4*x^2) + O(x^n), -n) \\ Iain Fox, Dec 30 2017
    
  • Python
    def A015521(n): return ((1<<(n<<1))|1)//5 # Chai Wah Wu, Jun 28 2023
  • Sage
    [lucas_number1(n,3,-4) for n in range(0, 24)] # Zerinvary Lajos, Apr 22 2009
    

Formula

From Paul Barry, Apr 02 2003: (Start)
a(n) = (4^n - (-1)^n)/5.
E.g.f.: (exp(4*x) - exp(-x))/5. (End)
a(n) = Sum_{k=1..n} binomial(n, k)*(-1)^(n+k)*5^(k-1). - Paul Barry, May 13 2003
a(2*n) = 4*a(2*n-1) - 1, a(2*n+1) = 4*a(2*n) + 1. In general this is true for all sequences of the type a(n) + a(n+1) = q^(n): i.e., a(2*n) = q*a(2n-1) - 1 and a(2*n+1) = q*a(2*n) + 1. - Amarnath Murthy, Jul 15 2003
From Emeric Deutsch, Apr 01 2004: (Start)
a(n) = 4^(n-1) - a(n-1).
G.f.: x/(1-3*x - 4*x^2). (End)
a(n+1) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*3^(n-2k)*4^k. - Paul Barry, Jul 29 2004
a(n) = 4*a(n-1) - (-1)^n, n > 0, a(0)=0. - Paul Barry, Aug 25 2004
a(n) = Sum_{k=0..n} A155161(n,k)*2^(n-k), n >= 1. - Philippe Deléham, Jan 27 2009
a(n) = round(4^n/5). - Mircea Merca, Dec 28 2010
The logarithmic generating function 1/5*log((1+x)/(1-4*x)) = x + 3*x^2/2 + 13*x^3/3 + 51*x^4/4 + ... has compositional inverse 5/(4+exp(-5*x)) - 1, the e.g.f. for a signed version of A213127. - Peter Bala, Jun 24 2012
a(n) = (-1)^(n-1)*Sum_{k=0..n-1} A135278(n-1,k)*(-5)^k = (4^n - (-1)^n)/5 = (-1)^(n-1)*Sum_{k=0..n-1} (-4)^k. Equals (-1)^(n-1)*Phi(n,-4), where Phi is the cyclotomic polynomial when n is an odd prime. (For n > 0.) - Tom Copeland, Apr 14 2014
a(n+1) = 2^(2*n) - a(n), a(0) = 0. - Ben Paul Thurston, Dec 25 2015
a(n) = A247281(n)/5. - Altug Alkan, Jan 08 2016
From Kengbo Lu, Jul 27 2020: (Start)
a(n) = 3*Sum_{k=0..n-1} a(k) + 1 if n odd; a(n) = 3*Sum_{k=0..n-1} a(k) if n even.
a(n) = A030195(n) + Sum_{k=0..n-2} a(k)*A030195(n-k-1).
a(n) = A085449(n) + Sum_{k=0..n-1} a(k)*A085449(n-k).
a(n) = F(n) + 2*Sum_{k=0..n-1} a(k)*F(n-k) + 3*Sum_{k=0..n-2} a(k)*F(n-k-1), where F(n) denotes the Fibonacci numbers.
a(n) = F(n) + Sum_{k=0..n-1} a(k)*(L(n-k) + F(n-k+1)), where F(n) denotes the Fibonacci numbers and L(n) denotes the Lucas numbers.
a(n) = 3^(n-1) + 4*Sum_{k=0..n-2} 3^(n-k-2)*a(k).
a(m+n) = a(m)*a(n+1) + 4*a(m-1)*a(n).
a(2*n) = Sum_{i>=0, j>=0} binomial(n-j-1,i)*binomial(n-i-1,j)*3^(2n-2i-2j-1)*4^(i+j). (End)

A109201 Minimal value of k>0 such that n^6 + k^2 is a semiprime.

Original entry on oeis.org

2, 3, 1, 4, 1, 3, 7, 2, 5, 10, 1, 2, 5, 6, 5, 2, 7, 6, 11, 6, 3, 5, 3, 7, 11, 2, 3, 2, 9, 10, 7, 5, 5, 5, 5, 2, 1, 2, 5, 2, 3, 2, 5, 4, 9, 4, 3, 2, 5, 11, 3, 11, 3, 3, 5, 7, 1, 4, 3, 4, 11, 4, 5, 16, 7, 2, 7, 2, 3, 25, 9, 6, 5, 2, 5, 2, 5, 2, 5, 4, 17, 20, 7, 4, 5, 4, 15, 2, 5, 6, 7, 6, 3, 5, 1, 2, 5, 8, 3
Offset: 0

Views

Author

Jonathan Vos Post, Jun 29 2005

Keywords

Comments

It seems that one or more primes nearly always occur before finding the first such semiprime for a given n. There seems to be a high correlation with the n^5 + k^2 sequence (A109200) [such as n=63] and it with the n^2 + k^2 sequence (A109197).

Examples

			a(0) = 2 because 0^6 + 1^2 = 1 is not semiprime, but 0^6 + 2^2 = 4 = 2^2 is.
a(1) = 3 because 1^6 + 1^2 and 1^6 + 2^2 are not semiprime, but 1^6 + 3^2 = 10 = 2 * 5 is semiprime.
a(2) = 1 because 2^6 + 1^2 = 65 = 5 * 13 is semiprime.
a(69) = 25 because 69^6 + 25^2 = 107918163706 = 2 * 53959081853 and for no smaller k>0 is 69^6 + k^2 a semiprime.
a(100) = 7 because 100^6 + 7^2 = 1000000000049 = 6337 * 157803377 and for no smaller k>0 is 100^6 + k^2 a semiprime.
		

Crossrefs

Formula

a(n) = minimal value of k>0 such that n^6 + k^2 is semiprime.

A109202 Minimal value of k>0 such that n^7 + k^2 is a semiprime.

Original entry on oeis.org

2, 3, 1, 2, 5, 6, 7, 4, 5, 8, 1, 6, 7, 5, 27, 16, 1, 12, 1, 2, 3, 8, 3, 6, 7, 2, 5, 2, 3, 12, 7, 4, 9, 2, 5, 6, 7, 4, 21, 2, 9, 4, 11, 6, 3, 4, 1, 2, 7, 25, 21, 14, 1, 4, 5, 4, 15, 8, 3, 22, 17, 8, 21, 10, 5, 2, 1, 14, 9, 32, 11, 6, 1, 13, 3, 2, 3, 3, 1, 2, 63, 4, 5, 10, 11, 9, 9, 4, 5, 33, 19, 6, 3
Offset: 0

Views

Author

Jonathan Vos Post, Jul 02 2005

Keywords

Comments

It seems that one or more primes nearly always occur before finding the first such semiprime for a given n. There seems to be a high correlation with the n^6 + k^2 sequence (A109201) with 24 times less than 100 the same values A109201(n) = A109202(n) for [n = 0,1,2,6,8,10,20,22,25,27,30,34,39,45,47,54,58,65,71,75,88,91,92,96].

Examples

			a(0) = 2 because 0^7 + 1^2 = 1 is not semiprime, but 0^7 + 2^2 = 4 = 2^2 is.
a(1) = 3 because 1^7 + 1^2 and 1^7 + 2^2 are not semiprime, but 1^7 + 3^2 = 10 = 2 * 5 is semiprime.
a(2) = 1 because 2^7 + 1^2 = 129 = 3 * 43 is semiprime.
a(80) = 63 because 80^7 + 63^2 = 20971520003969 = 47363 * 442782763 and for no smaller k>0 is 80^7 + k^2 a semiprime.
a(100) = 9 because 100^7 + 9^2 = 100000000000081 = 47309 * 2113762709 and for no smaller k>0 is 100^7 + k^2 a semiprime.
		

Crossrefs

Programs

  • Mathematica
    svk[n_]:=Module[{k=1,n7=n^7},While[PrimeOmega[n7+k^2]!=2,k++];k]; Array[ svk,100,0] (* Harvey P. Dale, Mar 01 2017 *)

A109203 Minimal value of k>0 such that n^8 + k^2 is a semiprime.

Original entry on oeis.org

2, 3, 3, 14, 3, 2, 1, 5, 7, 1, 1, 4, 5, 1, 3, 7, 1, 10, 1, 11, 1, 4, 1, 6, 13, 3, 1, 20, 1, 4, 11, 4, 1, 1, 1, 16, 5, 5, 1, 4, 3, 6, 1, 1, 15, 4, 5, 1, 17, 4, 1, 1, 1, 1, 11, 4, 1, 14, 1, 10, 1, 14, 7, 4, 15, 4, 1, 4, 1, 1, 1, 9, 1, 15, 9, 8, 9, 10, 5, 14, 3, 1, 5, 6, 1, 3, 19, 14, 5, 6, 41, 4, 1, 14, 1
Offset: 0

Views

Author

Jonathan Vos Post, Jul 03 2005

Keywords

Comments

There seems to be a modest correlation with the n^7 sequence (A109202) with often the same values [n = 10,16,18,23,31,45,52,55,66,72,82,88,100]. Sometimes the same value of k occurs for the n^6 sequence (A109201), the n^7 sequence (A109202) and this n^8 sequence, for instance n=88, k=5. The statistics of these sequences is unclear, as are the asymptotics.

Examples

			a(0) = 2 because 0^8 + 1^2 = 1 is not semiprime, but 0^8 + 2^2 = 4 = 2^2 is.
a(1) = 3 because 1^8 + 1^2 and 1^8 + 2^2 are not semiprime, but 1^8 + 3^2 = 10 = 2 * 5 is semiprime.
a(2) = 3 because 2^8 + 3^2 = 265 = 5 * 53 is semiprime, but 2^8 + 1^2 and 2^8 + 2^2 are not semiprimes.
a(90) = 41 because 90^8 + 41^2 = 4304672100001681 = 6317 * 681442472693 and for no smaller k>0 is 90^8 + k^2 a semiprime.
a(100) = 9 because 100^8 + 9^2 = 10000000000000081 = 34361 * 291027618521 and for no smaller k>0 is 100^8 + k^2 a semiprime.
		

Crossrefs

A109204 Minimal value of k>0 such that n^9 + k^2 is a semiprime.

Original entry on oeis.org

2, 3, 5, 10, 5, 2, 11, 4, 7, 2, 9, 4, 7, 5, 3, 2, 7, 16, 7, 2, 39, 2, 25, 12, 5, 7, 21, 2, 5, 3, 7, 16, 9, 17, 5, 24, 19, 4, 3, 20, 7, 6, 11, 4, 3, 4, 17, 12, 17, 2, 7, 70, 3, 3, 5, 2, 11, 16, 5, 42, 7, 4, 3, 26, 3, 9, 25, 26, 9, 5, 33, 6, 23, 12, 23, 2, 9, 6, 7, 2, 23, 4, 3, 16, 11, 16, 9, 2, 3
Offset: 0

Views

Author

Jonathan Vos Post, Jul 04 2005

Keywords

Examples

			a(0) = 2 because 0^9 + 1^2 = 1 is not semiprime, but 0^9 + 2^2 = 4 = 2^2 is.
a(1) = 3 because 1^9 + 1^2 and 1^9 + 2^2 are not semiprime, but 1^9 + 3^2 = 10 = 2 * 5 is semiprime.
a(2) = 5 because 2^9 + 5^2 = 537 = 3 * 179 is semiprime, but 2^9 plus no smaller square is.
a(51) = 70 because 51^9 + 70^2 = 2334165173095351 = 43063 * 54203496577 and for no smaller k>0 is 51^9 + k^2 a semiprime.
a(100) = 7 because 100^9 + 7^2 = 1000000000000000049 = 157 * 6369426751592357 and for no smaller k>0 is 100^9 + k^2 a semiprime.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := (For[k = 1, PrimeOmega[n^9 + k^2] != 2, k++]; k); a /@ Range[0, 88] (* Giovanni Resta, Jun 17 2016 *)
  • PARI
    a(n) = my(k=1); while(bigomega(n^9+k^2)!=2, k++); k \\ Felix Fröhlich, Jun 17 2016

Extensions

a(15) corrected by Giovanni Resta, Jun 17 2016

A109205 Minimal value of k>0 such that n^10 + k^2 is a semiprime.

Original entry on oeis.org

2, 3, 7, 4, 1, 4, 5, 2, 5, 10, 3, 2, 11, 7, 9, 8, 1, 10, 7, 4, 7, 4, 5, 2, 5, 3, 1, 20, 3, 9, 7, 2, 7, 5, 21, 4, 5, 2, 3, 4, 3, 4, 25, 3, 3, 13, 31, 2, 7, 24, 7, 2, 5, 2, 1, 4, 9, 7, 5, 4, 23, 9, 17, 8, 29, 8, 17, 2, 3, 10, 13, 2, 13, 7, 5, 4, 11, 8, 5, 10, 17, 4, 21, 5, 31, 4, 5, 4, 13, 2, 7, 4, 25
Offset: 0

Views

Author

Jonathan Vos Post, Jul 05 2005

Keywords

Examples

			a(0) = 2 because 0^10 + 1^2 = 1 is not semiprime, but 0^10 + 2^2 = 4 = 2^2 is.
a(1) = 3 because 1^10 + 1^2 and 1^10 + 2^2 are not semiprime, but 1^10 + 3^2 = 10 = 2 * 5 is semiprime.
a(2) = 7 because 2^10 + 7^2 = 1073 = 29 * 37 is semiprime, but 2^10 plus no smaller square is.
a(99) = 56 because 99^10 + 56^2 = 90438207500880452137 = 3733 * 24226682963000389 and for no smaller k>0 is 99^10 + k^2 a semiprime.
a(100) = 17 because 100^10 + 17^2 = 100000000000000000289 = 181 *
552486187845303869 and for no smaller k>0 is 100^10 + k^2 a semiprime.
		

Crossrefs

Programs

  • Mathematica
    mvk[n_]:=Module[{c=n^10,k=1},While[PrimeOmega[c+k^2]!=2,k++];k]; Array[ mvk,100,0] (* Harvey P. Dale, Aug 01 2021 *)

A109206 Minimal value of k>0 such that n^11 + k^2 is a semiprime.

Original entry on oeis.org

2, 3, 1, 2, 3, 6, 1, 4, 9, 8, 13, 4, 1, 2, 3, 8, 7, 6, 5, 28, 3, 4, 5, 6, 5, 2, 9, 4, 9, 6, 29, 2, 15, 7, 5, 48, 5, 5, 33, 8, 7, 24, 17, 4, 15, 14, 11, 4, 5, 8, 9, 10, 7, 6, 31, 8, 3, 4, 5, 18, 13, 34, 5, 2, 5, 18, 35, 12, 15, 2, 27, 6, 31, 5, 3, 34, 5, 9, 7, 2, 3, 4, 13, 14, 23, 2, 15, 22, 21, 48
Offset: 0

Views

Author

Jonathan Vos Post, Jul 06 2005

Keywords

Comments

It seems that one or more primes almost always occur before finding the first such semiprime for a given n. There seems to be a modest correlation with the n^10 sequence (A109205) with often the same values [n = 0,1,15,21,22,24,31,36,58,81,94]. Or differs by 10 [n = 10,12,60,65,67, 86, 92,100]. Or 20 [n = 41, 46] or 30 [n = 38, 54,75]. Sometimes A109206(n) = A109205(n) = A109204(n) [n = 58,81]. Is it obvious that there must be a k for each n and not an infinite sequence of nonsemiprimes of the form n^11 + k^2?

Examples

			a(0) = 2 because 0^11 + 1^2 = 1 is not semiprime, but 0^11 + 2^2 = 4 = 2^2 is.
a(1) = 3 because 1^11 + 1^2 and 1^11 + 2^2 are not semiprime, but 1^11 + 3^2 = 10 = 2 * 5 is semiprime.
a(2) = 1 because 2^11 + 1^2 = 2049 = 3 * 683 is semiprime.
a(35) = 48 because 35^11 + 48^2 = 96549157373049179 = 401 * 240770966017579 and for no smaller k>0 is 35^11 + k^2 a semiprime.
a(100) = 37 because 100^11 + 37^2 = 10000000000000000001369 = 60089 *
166419810614255521 and for no smaller k>0 is 100^11 + k^2 a semiprime.
		

Crossrefs

Programs

  • Mathematica
    mk[n_]:=Module[{n11=n^11,k=1},While[PrimeOmega[n11+k^2]!=2,k++];k]; Array[ mk,100,0] (* Harvey P. Dale, Aug 06 2012 *)
Showing 1-7 of 7 results.