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 29 results. Next

A015518 a(n) = 2*a(n-1) + 3*a(n-2), with a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 2, 7, 20, 61, 182, 547, 1640, 4921, 14762, 44287, 132860, 398581, 1195742, 3587227, 10761680, 32285041, 96855122, 290565367, 871696100, 2615088301, 7845264902, 23535794707, 70607384120, 211822152361, 635466457082
Offset: 0

Views

Author

Keywords

Comments

Number of walks of length n between any two distinct vertices of the complete graph K_4. - Paul Barry and Emeric Deutsch, Apr 01 2004
For n >= 1, a(n) is the number of integers k, 1 <= k <= 3^(n-1), whose ternary representation ends in an even number of zeros (see A007417). - Philippe Deléham, Mar 31 2004
Form the digraph with matrix A=[0,1,1,1;1,0,1,1;1,1,0,1;1,0,1,1]. A015518(n) corresponds to the (1,3) term of A^n. - Paul Barry, Oct 02 2004
The same sequence may be obtained by the following process. Starting a priori with the fraction 1/1, the denominators of fractions built according to the rule: add top and bottom to get the new bottom, add top and 4 times the bottom to get the new top. The limit of the sequence of fractions is 2. - Cino Hilliard, Sep 25 2005
(A046717(n))^2 + (2*a(n))^2 = A046717(2n). E.g., A046717(3) = 13, 2*a(3) = 14, A046717(6) = 365. 13^2 + 14^2 = 365. - Gary W. Adamson, Jun 17 2006
For n >= 2, number of ordered partitions of n-1 into parts of sizes 1 and 2 where there are two types of 1 (singletons) and three types of 2 (twins). For example, the number of possible configurations of families of n-1 male (M) and female (F) offspring considering only single births and twins, where the birth order of M/F/pair-of-twins is considered and there are three types of twins; namely, both F, both M, or one F and one M - where birth order within a pair of twins itself is disregarded. In particular, for a(3)=7, two children could be either: (1) F, then M; (2) M, then F; (3) F,F; (4) M,M; (5) F,F twins; (6) M,M twins; or (7) M,F twins (emphasizing that birth order is irrelevant here when both/all children are the same gender and when two children are within the same pair of twins). - Rick L. Shepherd, Sep 18 2004
a(n) is prime for n = {2, 3, 5, 7, 13, 23, 43, 281, 359, ...}, where only a(2) = 2 corresponds to a prime of the form (3^k - 1)/4. All prime terms, except a(2) = 2, are the primes of the form (3^k + 1)/4. Numbers k such that (3^k + 1)/4 is prime are listed in A007658. Note that all prime terms have prime indices. Prime terms are listed in A111010. - Alexander Adamchuk, Nov 19 2006
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=-2, A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=1, a(n)=charpoly(A,1). - Milan Janjic, Jan 26 2010
Select an odd size subset S from {1,2,...,n}, then select an even size subset from S. - Geoffrey Critzer, Mar 02 2010
a(n) is the number of ternary sequences of length n where the numbers of (0's, 1's) are (even, odd) respectively, and, by symmetry, the number of such sequences where those numbers are (odd, even) respectively. A122983 covers (even, even), and A081251 covers (odd, odd). - Toby Gottfried, Apr 18 2010
An elephant sequence, see A175654. For the corner squares just one A[5] vector, with decimal value 341, leads to this sequence (without the leading 0). For the central square this vector leads to the companion sequence A046717 (without the first leading 1). - Johannes W. Meijer, Aug 15 2010
Let R be the commutative algebra resulting from adjoining the elements of the Klein four-group to the integers (equivalently, K = Z[x,y,z]/{x*y - z, y*z - x, x*z - y, x^2 - 1, y^2 - 1, z^2 - 1}). Then a(n) is equal to the coefficients of x, y, and z in the expansion of (x + y + z)^n. - Joseph E. Cooper III (easonrevant(AT)gmail.com), Nov 06 2010
Pisano period lengths: 1, 2, 2, 4, 4, 2, 6, 8, 2, 4, 10, 4, 6, 6, 4, 16, 16, 2, 18, 4, ... - R. J. Mathar, Aug 10 2012
The ratio a(n+1)/a(n) converges to 3 as n approaches infinity. - Felix P. Muga II, Mar 09 2014
This is a divisibility sequence, also the values of Chebyshev polynomials, and also the number of ways of packing a 2 X n-1 rectangle with dominoes and unit squares. - R. K. Guy, Dec 16 2016
For n>0, gcd(a(n),a(n+1))=1. - Kengbo Lu, Jul 02 2020

References

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

Crossrefs

a(n) = A080926(n-1) + 1 = (1/3)*A054878(n+1) = (1/3)*abs(A084567(n+1)).
First differences of A033113 and A039300.
Partial sums of A046717.
The following sequences (and others) belong to the same family: A000129, A001333, A002532, A002533, A002605, A015518, A015519, A026150, A046717, A063727, A083098, A083099, A083100, A084057.
Cf. A046717.

Programs

  • Magma
    [Round(3^n/4): n in [0..30]]; // Vincenzo Librandi, Jun 24 2011
    
  • Mathematica
    Table[(3^n-(-1)^n)/4,{n,0,30}] (* Alexander Adamchuk, Nov 19 2006 *)
  • Maxima
    a(n):= round(3^n/4)$ /* Dimitri Papadopoulos, Nov 28 2023 */
  • PARI
    a(n)=round(3^n/4)
    
  • Python
    for n in range(0, 20): print(int((3**n-(-1)**n)/4), end=', ') # Stefano Spezia, Nov 30 2018
    
  • Sage
    [round(3^n/4) for n in range(0,27)]
    

Formula

G.f.: x/((1+x)*(1-3*x)).
a(n) = (3^n - (-1)^n)/4 = floor(3^n/4 + 1/2).
a(n) = 3^(n-1) - a(n-1). - Emeric Deutsch, Apr 01 2004
E.g.f.: (exp(3*x) - exp(-x))/4. Second inverse binomial transform of (5^n-1)/4, A003463. Inverse binomial transform for powers of 4, A000302 (when preceded by 0). - Paul Barry, Mar 28 2003
a(n) = Sum_{k=0..floor(n/2)} C(n, 2k+1)*2^(2k). - Paul Barry, May 14 2003
a(n) = Sum_{k=1..n} binomial(n, k)*(-1)^(n+k)*4^(k-1). - Paul Barry, Apr 02 2003
a(n+1) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*2^(n-2*k)*3^k. - Paul Barry, Jul 13 2004
a(n) = U(n-1, i/sqrt(3))(-i*sqrt(3))^(n-1), i^2=-1. - Paul Barry, Nov 17 2003
G.f.: x*(1+x)^2/(1 - 6*x^2 - 8*x^3 - 3*x^4) = x(1+x)^2/characteristic polynomial(x^4*adj(K_4)(1/x)). - Paul Barry, Feb 03 2004
a(n) = sum_{k=0..3^(n-1)} A014578(k) = -(-1)^n*A014983(n) = A051068(3^(n-1)), for n > 0. - Philippe Deléham, Mar 31 2004
E.g.f.: exp(x)*sinh(2*x)/2. - Paul Barry, Oct 02 2004
a(2*n+1) = A054880(n) + 1. - M. F. Hasler, Mar 20 2008
2*a(n) + (-1)^n = A046717(n). - M. F. Hasler, Mar 20 2008
a(n) = ((1+sqrt(4))^n - (1-sqrt(4))^n)/4. - Al Hakanson (hawkuu(AT)gmail.com), Dec 31 2008
a(n) = abs(A014983(n)). - Zerinvary Lajos, May 28 2009
a(n) = round(3^n/4). - Mircea Merca, Dec 28 2010
a(n) = Sum_{k=1,3,5,...} binomial(n,k)*2^(k-1). - Geoffrey Critzer, Mar 02 2010
From Sergei N. Gladkovskii, Jul 19 2012: (Start)
G.f.: G(0)/4 where G(k)= 1 - 1/(9^k - 3*x*81^k/(3*x*9^k - 1/(1 + 1/(3*9^k - 27*x*81^k/(9*x*9^k + 1/G(k+1)))))); (continued fraction).
E.g.f.: G(0)/4 where G(k)= 1 - 1/(9^k - 3*x*81^k/(3*x*9^k - (2*k+1)/(1 + 1/(3*9^k - 27*x*81^k/(9*x*9^k + (2*k+2)/G(k+1)))))); (continued fraction). (End)
G.f.: G(0)*x/(2*(1-x)), where G(k) = 1 + 1/(1 - x*(4*k-1)/(x*(4*k+3) - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 26 2013
a(n+1) = Sum_{k = 0..n} A238801(n,k)*2^k. - Philippe Deléham, Mar 07 2014
a(n) = (-1)^(n-1)*Sum_{k=0..n-1} A135278(n-1,k)*(-4)^k = (-1)^(n-1)*Sum_{k=0..n-1} (-3)^k. Equals (-1)^(n-1)*Phi(n,-3), where Phi is the cyclotomic polynomial when n is an odd prime. (For n > 0.) - Tom Copeland, Apr 14 2014
a(n) = 2*A006342(n-1) - n mod 2 if n > 0, a(0)=0. - Yuchun Ji, Nov 30 2018
a(n) = 2*A033113(n-2) + n mod 2 if n > 0, a(0)=0. - Yuchun Ji, Aug 16 2019
a(2*k) = 2*A002452(k), a(2*k+1) = A066443(k). - Yuchun Ji, Aug 14 2019
a(n+1) = 2*Sum_{k=0..n} a(k) if n odd, and 1 + 2*Sum_{k=0..n} a(k) if n even. - Kengbo Lu, May 30 2020
a(n) = F(n) + Sum_{k=1..(n-1)} a(k)*L(n-k), for F(n) and L(n) the Fibonacci and Lucas numbers. - Kengbo Lu and Greg Dresden, Jun 05 2020
From Kengbo Lu, Jun 11 2020: (Start)
a(n) = A002605(n) + Sum_{k = 1..n-2} a(k)*A002605(n-k-1).
a(n) = A006130(n-1) + Sum_{k = 1..n-1} a(k)*A006130(n-k-1). (End)
a(2n) = Sum_{i>=0, j>=0} binomial(n-j-1,i)*binomial(n-i-1,j)* 2^(2n-2i-2j-1)* 3^(i+j). - Kengbo Lu, Jul 02 2020
a(n) = 3*a(n-1) - (-1)^n. - Dimitri Papadopoulos, Nov 28 2023
G.f.: x/((1 + x)*(1 - 3*x)) = Sum_{n >= 0} x^(n+1) * Product_{k = 1..n} (k + 3*x + 1)(1 + k*x) (a telescoping series). Cf. A007482. - Peter Bala, May 08 2024
From Peter Bala, Jun 29 2025: (Start)
For n >= 1, a(n+1) = 2^n * hypergeom([1/2 - (1/2)*n, -(1/2)*n], [-n], -3).
G.f. A(x) = x*exp(Sum_{n >= 1} a(2*n)/a(n)*x^n/n) = x + 2*x^2 + 7*x^3 + 20*x^4 + ....
sqrt(A(x)/x) is the g.f. of A002426.
The following series telescope:
Sum_{n >= 1} (-3)^n/(a(n)*a(n+1)) = -1; Sum_{n >= 1} (-3)^n/(a(n)*a(n+1)*a(n+2)*a(n+3)) = -1/98.
In general, for k >= 0, Sum_{n >= 1} (-3)^n/(a(n)*a(n+1)*...*a(n+2*k+1)) = -1/((a(1)*a(2)*...*a(2*k+1))*a(2*k+1)).
Sum_{n >= 1} 3^n/(a(n)*a(n+1)*a(n+2)) = 1/4; Sum_{n >= 1} 3^n/(a(n)*a(n+1)*a(n+2)* a(n+3)*a(n+4)) = 1/5600.
In general, for k >= 1, Sum_{n >= 1} 3^n/(a(n)*a(n+1)*...*a(n+2*k)) = 1/((a(1)*a(2)*...*a(2*k))*a(2*k)). (End)

Extensions

More terms from Emeric Deutsch, Apr 01 2004
Edited by Ralf Stephan, Aug 30 2004

A057941 Number of prime factors of 3^n + 1 (counted with multiplicity).

Original entry on oeis.org

2, 2, 3, 2, 3, 3, 3, 3, 5, 4, 4, 3, 3, 4, 6, 2, 5, 4, 4, 3, 7, 4, 3, 6, 5, 4, 7, 4, 5, 6, 4, 2, 7, 4, 5, 4, 5, 4, 8, 5, 4, 7, 3, 5, 10, 4, 5, 4, 5, 8, 9, 4, 4, 5, 7, 6, 8, 4, 4, 7, 4, 5, 13, 2, 5, 6, 4, 5, 9, 9, 7, 8, 4, 5, 12, 6, 6, 7, 5, 5, 12, 5, 6, 10, 9, 7, 11, 6, 5, 9, 8, 4, 9, 4, 8, 6, 5, 9, 14, 6, 4
Offset: 1

Views

Author

Patrick De Geest, Oct 15 2000

Keywords

Crossrefs

bigomega(b^n+1): A057934 (b=10), A057935 (b=9), A057936 (b=8), A057937 (b=7), A057938 (b=6), A057939 (b=5), A057940 (b=4), this sequence (b=3), A054992 (b=2).

Programs

Formula

a(n) = A057958(2n) - A057958(n) - T. D. Noe, Jun 19 2003
a(n) = A001222(A034472(n)). - Amiram Eldar, Feb 01 2020

A128066 Numbers k such that (3^k + 4^k)/7 is prime.

Original entry on oeis.org

3, 5, 19, 37, 173, 211, 227, 619, 977, 1237, 2437, 5741, 13463, 23929, 81223, 121271
Offset: 1

Views

Author

Alexander Adamchuk, Feb 14 2007

Keywords

Comments

All terms are primes.

Crossrefs

Cf. A007658 = n such that (3^n + 1)/4 is prime; A057469 ((3^n + 2^n)/5); A122853 ((3^n + 5^n)/8).
Cf. A059801 (4^n - 3^n); A121877 ((5^n - 3^n)/2).

Programs

  • Maple
    a:=proc(n) if type((3^n+4^n)/7,integer)=true and isprime((3^n+4^n)/7)=true then n else fi end: seq(a(n),n=1..1500); # Emeric Deutsch, Feb 17 2007
  • Mathematica
    Do[ p=Prime[n]; f=(3^p+4^p)/(4+3); If[ PrimeQ[f], Print[p]], {n,1,100} ]
  • PARI
    f(n)=(3^n + 4^n)/7;
    forprime(n=3,10^5,if(ispseudoprime(f(n)),print1(n,", ")))
    /* Joerg Arndt, Mar 27 2011 */

Extensions

3 more terms from Emeric Deutsch, Feb 17 2007
2 more terms from Farideh Firoozbakht, Apr 16 2007
Two more terms (13463 and 23929) found by Lelio R Paula in 2008 corresponding to probable primes with 8105 and 14406 digits. Jean-Louis Charton, Oct 06 2010
Two more terms (81223 and 121271) found by Jean-Louis Charton in March 2011 corresponding to probable primes with 48901 and 73012 digits

A126856 Numbers n such that (31^n + 1)/32 is prime.

Original entry on oeis.org

109, 461, 1061, 50777
Offset: 1

Views

Author

Alexander Adamchuk, Mar 23 2007

Keywords

Comments

All terms are primes.
a(5) > 10^5. - Robert Price, Jul 12 2013

Crossrefs

Programs

  • Mathematica
    Do[ p=Prime[n]; If[ PrimeQ[ (31^p + 1)/32 ], Print[p] ], {n,1,1100} ]
  • PARI
    is(n)=isprime((31^n+1)/32) \\ Charles R Greathouse IV, Feb 17 2017

Extensions

a(4) from Robert Price, Jul 12 2013

A128071 Numbers k such that (3^k + 13^k)/16 is prime.

Original entry on oeis.org

3, 7, 127, 2467, 3121, 34313
Offset: 1

Views

Author

Alexander Adamchuk, Feb 14 2007

Keywords

Comments

All terms are primes.
a(4) is certified prime by primo; a(5) is a probable prime. - Ray G. Opao, Aug 02 2007
a(7) > 10^5. - Robert Price, Apr 14 2013

Crossrefs

Cf. A007658 = numbers n such that (3^n + 1)/4 is prime. Cf. A057469 = numbers n such that (3^n + 2^n)/5 is prime. Cf. A122853 = numbers n such that (3^n + 5^n)/8 is prime. Cf. A128066, A128067, A128068, A128069, A128070, A128072, A128073, A128074, A128075. Cf. A059801 = numbers n such that 4^n - 3^n is prime. Cf. A121877 = numbers n such that (5^n - 3^n)/2 is a prime. Cf. A128024, A128025, A128026, A128027, A128028, A128029, A128030, A128031, A128032.

Programs

  • Mathematica
    k=13; Do[ p=Prime[n]; f=(3^p+k^p)/(k+3); If[ PrimeQ[f], Print[p]], {n,1,100} ]
  • PARI
    is(n)=isprime((3^n+13^n)/16) \\ Charles R Greathouse IV, Feb 17 2017

Extensions

One more term from Ray G. Opao, Aug 02 2007
a(6) from Robert Price, Apr 14 2013

A128075 Numbers k such that (3^k + 19^k)/22 is prime.

Original entry on oeis.org

3, 61, 71, 109, 9497, 36007, 50461, 66919
Offset: 1

Views

Author

Alexander Adamchuk, Feb 14 2007

Keywords

Comments

All terms are primes.
a(9) > 10^5. - Robert Price, Jul 21 2013

Crossrefs

Cf. A007658 (numbers k such that (3^k + 1)/4 is prime).
Cf. A057469 (numbers k such that (3^k + 2^k)/5 is prime).
Cf. A122853 (numbers k such that (3^k + 5^k)/8 is prime).
Cf. A059801 (numbers k such that 4^k - 3^k is prime).
Cf. A121877 (numbers k such that (5^k - 3^k)/2 is prime).

Programs

  • Mathematica
    k=19; Do[ p=Prime[n]; f=(3^p+k^p)/(k+3); If[ PrimeQ[f], Print[p]], {n,1,9592} ]
  • PARI
    is(n)=isprime((3^n+19^n)/22) \\ Charles R Greathouse IV, Feb 17 2017

Extensions

a(5)-a(8) from Robert Price, Jul 21 2013

A229145 Numbers k such that (36^k + 1)/37 is prime.

Original entry on oeis.org

31, 191, 257, 367, 3061, 110503, 1145393
Offset: 1

Views

Author

Robert Price, Sep 15 2013

Keywords

Comments

All such numbers k are prime.
Note that a(6) = 110503 corresponds to (36^110503 + 1)/37, which is only a probable prime with 171975 digits.
The primes corresponding to the terms of this sequence have 1 as their last digit and an even number as their next-to-last digit. - Iain Fox, Dec 08 2017

Crossrefs

Programs

  • Mathematica
    Do[ p=Prime[n]; If[ PrimeQ[ (36^p + 1)/37 ], Print[p] ], {n, 1, 9592} ]
  • PARI
    is(n)=isprime((36^n+1)/37) \\ Charles R Greathouse IV, Feb 17 2017

Extensions

a(6) = 110503 (posted by Lelio R. Paula on primenumbers.net) from Paul Bourdelais, Dec 08 2017
a(7) from Paul Bourdelais, Nov 03 2023

A185240 Numbers k such that (35^k + 1)/36 is prime.

Original entry on oeis.org

11, 13, 79, 127, 503, 617, 709, 857, 1499, 3823, 135623, 280979
Offset: 1

Views

Author

Robert Price, Aug 29 2013

Keywords

Comments

All terms are primes. a(11) > 10^5.

Crossrefs

Programs

  • Mathematica
    Do[ p=Prime[n]; If[ PrimeQ[ (35^p + 1)/36 ], Print[p] ], {n, 1, 9592} ]
  • PARI
    is(n)=isprime((35^n+1)/36) \\ Charles R Greathouse IV, Feb 17 2017

Extensions

a(11)=135623 found as probable prime and added by Paul Bourdelais, Jul 05 2018
a(12) from Paul Bourdelais, Sep 13 2021

A128072 Numbers k such that (3^k + 14^k)/17 is prime.

Original entry on oeis.org

3, 7, 71, 251, 1429, 2131, 2689, 36683, 60763
Offset: 1

Views

Author

Alexander Adamchuk, Feb 14 2007

Keywords

Comments

All terms are primes.
a(10) > 10^5. - Robert Price, Apr 20 2013

Crossrefs

Cf. A007658 (numbers k such that (3^k + 1)/4 is prime).
Cf. A057469 (numbers k such that (3^k + 2^k)/5 is prime).
Cf. A122853 (numbers k such that (3^k + 5^k)/8 is prime).
Cf. A059801 (numbers k such that 4^k - 3^k is prime).
Cf. A121877 (numbers k such that (5^k - 3^k)/2 is prime).

Programs

  • Mathematica
    k=14; Do[ p=Prime[n]; f=(3^p+k^p)/(k+3); If[ PrimeQ[f], Print[p]], {n,1,100} ]
  • PARI
    is(n)=isprime((3^n+14^n)/17) \\ Charles R Greathouse IV, Feb 17 2017

Extensions

3 more terms from Ryan Propper, Jan 28 2008
a(8)-a(9) from Robert Price, Apr 20 2013

A128073 Numbers k such that (3^k + 16^k)/19 is prime.

Original entry on oeis.org

5, 17, 61, 673, 919, 2089, 86939
Offset: 1

Views

Author

Alexander Adamchuk, Feb 14 2007

Keywords

Comments

All terms are primes.
a(8) > 10^5 - Robert Price, Jun 29 2013

Crossrefs

Cf. A007658 (numbers k such that (3^k + 1)/4 is prime).
Cf. A057469 (numbers k such that (3^k + 2^k)/5 is prime).
Cf. A122853 (numbers k such that (3^k + 5^k)/8 is prime).
Cf. A059801 (numbers k such that 4^k - 3^k is prime).
Cf. A121877 (numbers k such that (5^k - 3^k)/2 is prime).

Programs

  • Mathematica
    k=16; Do[ p=Prime[n]; f=(3^p+k^p)/(k+3); If[ PrimeQ[f], Print[p]], {n,1,100} ]
  • PARI
    is(n)=isprime((3^n+16^n)/19) \\ Charles R Greathouse IV, Feb 17 2017

Extensions

a(5) from Alexander Adamchuk, Feb 14 2007
a(6) and a(7) from Robert Price, Jun 29 2013
Showing 1-10 of 29 results. Next