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

A102808 Numbers k such that the k-th prime is in A057468.

Original entry on oeis.org

1, 2, 3, 7, 10, 11, 16, 17, 26, 59, 118, 178, 353, 411, 505, 535, 545, 702, 941, 8738, 11498, 15769, 22544, 28901, 40444, 48479, 82800
Offset: 1

Views

Author

Ali A. Tanara (tanara(AT)khayam.ut.ac.ir), Feb 26 2005

Keywords

Crossrefs

Cf. A057468.

Programs

Extensions

More terms from Robert G. Wilson v, Mar 03 2005
a(21)-a(27) from Robert Price, Mar 27 2021

A001047 a(n) = 3^n - 2^n.

Original entry on oeis.org

0, 1, 5, 19, 65, 211, 665, 2059, 6305, 19171, 58025, 175099, 527345, 1586131, 4766585, 14316139, 42981185, 129009091, 387158345, 1161737179, 3485735825, 10458256051, 31376865305, 94134790219, 282412759265, 847255055011, 2541798719465, 7625463267259, 22876524019505
Offset: 0

Views

Author

Keywords

Comments

a(n+1) is the sum of the elements in the n-th row of triangle pertaining to A036561. - Amarnath Murthy, Jan 02 2002
Number of 2 X n binary arrays with a path of adjacent 1's and no path of adjacent 0's from top row to bottom row. - R. H. Hardin, Mar 21 2002
With offset 1, partial sums of A027649. - Paul Barry, Jun 24 2003
Number of distinct lines through the origin in the n-dimensional lattice of side length 2. A049691 has the values for the 2-dimensional lattice of side length n. - Joshua Zucker, Nov 19 2003
a(n+1)/(n+1)=(3*3^n-2*2^n)/(n+1) is the second binomial transform of the harmonic sequence 1/(n+1). - Paul Barry, Apr 19 2005
a(n+1) is the sum of n-th row of A036561. - Reinhard Zumkeller, May 14 2006
The sequence gives the sum of the lengths of the segments in Cantor's dust generating sequence up to the i-th step. Measurement unit = length of the segment of i-th step. - Giorgio Balzarotti, Nov 18 2006
Let T be a binary relation on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xTy if x is a proper subset of y. Then a(n) = |T|. - Ross La Haye, Dec 22 2006
From Alexander Adamchuk, Jan 04 2007: (Start)
a(n) is prime for n in A057468.
p divides a(p) - 1 for prime p.
Quotients (3^p - 2^p - 1)/p, where p = prime(n), are listed in A127071.
Numbers k such that k divides 3^k - 2^k - 1 are listed in A127072.
Pseudoprimes in A127072(n) include all powers of primes {2,3,7} and some composite numbers that are listed in A127073, which includes all Carmichael numbers A002997.
Numbers n such that n^2 divides 3^n - 2^n - 1 are listed in A127074.
5 divides a(2n).
5^2 divides a(2*5n).
5^3 divides a(2*5^2n).
5^4 divides a(2*5^3n).
7^2 divides a(6*7n).
13 divides a(4n).
13^2 divides a(4*13n).
19 divides a(3n).
19^2 divides a(3*19n).
23^2 divides a(11n).
23^3 divides a(11*23n).
23^4 divides a(11*23^2n).
29 divides a(7n).
p divides a((p-1)n) for prime p>3.
p divides a((p-1)/2) for prime p in A097934. Also primes p such that 6 is a square mod p, except {2,3}, A038876(n).
p^(k+1) divides a(p^k*(p-1)/2*n) for prime p in A097934.
p^(k+1) divides a(p^k*(p-1)*n) for prime p>3.
Note the exception that for p = 23, p^(k+2) divides a(p^k*(p-1)/2*n).
There are no more such exceptions for primes p up to 600000. (End)
a(n) divides a(q*(n+1)-1), for all q integer. Leonardo Sarasua, Apr 15 2024
Final digits of terms follow sequence 1,5,9,5. - Enoch Haga, Nov 26 2007
This is also the second column sequence of the Sheffer triangle A143494 (2-restricted Stirling2 numbers). See the e.g.f. given below. - Wolfdieter Lang, Oct 08 2011
Partial sums give A000392. - Jon Perry, Apr 05 2014
For n >= 1, this is also row 2 of A281890: when consecutive positive integers are written as a product of primes in nondecreasing order, "3" occurs in n-th position a(n) times out of every 6^n. - Peter Munn, May 17 2017
a(n) is the number of ternary sequences of length n which include the digit 2. For example, a(2)=5 since the sequences are 02,20,12,21,22. - Enrique Navarrete, Apr 05 2021
a(n-1) is the number of ways we can form disjoint unions of two nonempty subsets of [n] such that the union contains n. For example, for n = 3, a(2) = 5 since the disjoint unions are {1}U{3}, {1}U{2,3}, {2}U{3}, {2}U{1,3}, and {1,2}U{3}. Cf. A000392 if we drop the requirement that the union contains n. - Enrique Navarrete, Aug 24 2021
Configures as a composite Koch Snowflake Fractal (see illustration in links) based on the five-fold division of the Cantor Square/Cantor Dust Fractal of (9^n-4^n)/5 see my illustration in (A016153). - John Elias, Oct 13 2021
Number of pairs (A,B) where B is a subset of {1,2,...,n} and A is a proper subset of B. - Jianing Song, Jun 18 2022
From Manfred Boergens, Mar 29 2023: (Start)
With regard to the comments by Ross La Haye and Jianing Song: Omitting "proper" gives A000244.
Number of pairs (A,B) where B is a nonempty subset of {1,2,...,n} and A is a nonempty subset of B. For nonempty proper subsets see a(n+1) in A028243. (End)
a(n) is the number of n-digit numbers whose smallest decimal digit is 7. - Stefano Spezia, Nov 15 2023
a(n-1) is the number of all possible player-reduced binary games observed by each player in an nx2 game assuming the individual strategies of k < n - 1 players are fixed and the remaining n - k - 1 player will play as one, either maintaining their status quo strategies or jointly adopting an alternative strategy. - Ambrosio Valencia-Romero, Apr 11 2024

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 86-87.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n) = row sums of A091913, row 2 of A047969, column 1 of A090888 and column 1 of A038719.
Cf. partitions: A241766, A241759.
A diagonal of A262307.

Programs

  • Haskell
    a001047 n = a001047_list !! n
    a001047_list = map fst $ iterate (\(u, v) -> (3 * u + v, 2 * v)) (0, 1)
    -- Reinhard Zumkeller, Jun 09 2013
  • Magma
    [3^n - 2^n: n in [0..30]]; // Vincenzo Librandi, Jul 17 2011
    
  • Maple
    seq(3^n - 2^n, n=0..40); # Giorgio Balzarotti, Nov 18 2006
    A001047:=1/(3*z-1)/(2*z-1); # Simon Plouffe in his 1992 dissertation, dropping the initial zero
  • Mathematica
    Table[ 3^n - 2^n, {n, 0, 25} ]
    LinearRecurrence[{5, -6}, {0, 1}, 25] (* Harvey P. Dale, Aug 18 2011 *)
    Numerator@NestList[(3#+1)/2&,1/2,100] (* Zak Seidov, Oct 03 2011 *)
  • PARI
    {a(n) = 3^n - 2^n};
    
  • Python
    [3**n - 2**n for n in range(25)] # Ross La Haye, Aug 19 2005; corrected by David Radcliffe, Jun 26 2016
    
  • Sage
    [lucas_number1(n, 5, 6) for n in range(26)]  # Zerinvary Lajos, Apr 22 2009
    

Formula

G.f.: x/((1-2*x)*(1-3*x)).
a(n) = 5*a(n-1) - 6*a(n-2).
a(n) = 3*a(n-1) + 2^(n-1). - Jon Perry, Aug 23 2002
Starting 0, 0, 1, 5, 19, ... this is 3^n/3 - 2^n/2 + 0^n/6, the binomial transform of A086218. - Paul Barry, Aug 18 2003
a(n) = A083323(n)-1 = A056182(n)/2 = (A002783(n)-1)/2 = (A003063(n+2)-A003063(n+1))/2. - Ralf Stephan, Jan 12 2004
Binomial transform of A000225. - Ross La Haye, Feb 07 2005
a(n) = Sum_{k=0..n-1} binomial(n, k)*2^k. - Ross La Haye, Aug 20 2005
a(n) = 2^(2n) - A083324(n). - Ross La Haye, Sep 10 2005
a(n) = A112626(n, 1). - Ross La Haye, Jan 11 2006
E.g.f.: exp(3*x) - exp(2*x). - Mohammad K. Azarian, Jan 14 2009
a(n) = A217764(n,1). - Ross La Haye, Mar 27 2013
a(n) = 2*a(n-1) + 3^(n-1). - Toby Gottfried, Mar 28 2013
a(n) = A000244(n) - A000079(n). - Omar E. Pol, Mar 28 2013
a(n) = Sum_{k=0..2} Stirling1(2,k)*(k+1)^n = c_2^{(-n)}, poly-Cauchy numbers. - Takao Komatsu, Mar 28 2013
a(n) = A227048(n,A098294(n)). - Reinhard Zumkeller, Jun 30 2013
a(n+1) = Sum_{k=0..n} 2^k*3^(n-k). - J. M. Bergot, Mar 27 2018
Sum_{n>=1} 1/a(n) = A329064. - Amiram Eldar, Nov 20 2020
a(n) = (1/2)*Sum_{k=0..n} binomial(n, k)*(2^(n-k) + 2^k - 2).
a(n) = A001117(n) + 2*A000918(n) + 1. - Ambrosio Valencia-Romero, Mar 08 2022
a(n) = A000225(n) + A028243(n+1). - Ambrosio Valencia-Romero, Mar 09 2022
From Peter Bala, Jun 27 2025: (Start)
exp(Sum_{n >=1} a(2*n)/a(n)*x^n/n) = Sum_{n >= 0} a(n+1)*x^n.
exp(Sum_{n >=1} a(3*n)/a(n)*x^n/n) = 1 + 19*x + 247*x^2 + ... is the g.f. of A019443.
exp(Sum_{n >=1} a(4*n)/a(n)*x^n/n) = 1 + 65*x + 2743*x^2 + ... is the g.f. of A383754.
The following are all examples of telescoping series:
Sum_{n >= 1} 6^n/(a(n)*a(n+1)) = 2, since 6^n/(a(n)*a(n+1)) = b(n) - b(n+1), where b(n) = 2^n/a(n);
Sum_{n >= 1} 18^n/(a(n)*a(n+1)*a(n+2)) = 22/75, since 18^n/(a(n)*a(n+1)*a(n+2)) = c(n) - c(n+1), where c(n) = (5*6^n - 2*4^n)/(15*a(n)*a(n+1));
Sum_{n >= 1} 54^n/(a(n)*a(n+1)*a(n+2)*a(n+3)) = 634/48735 since 54^n/(a(n)*a(n+1)*a(n+2)*a(n+3)) = d(n) - d(n+1), where d(n) = (57*18^n - 38*12^n + 8*8^n)/(513*a(n)*a(n+1)*a(n+2)).
Sum_{n >= 1} 6^n/(a(n)*a(n+2)) = 14/25; Sum_{n >= 1} (-6)^n/(a(n)*a(n+2)) = -6/25.
Sum_{n >= 1} 6^n/(a(n)*a(n+3)) = 306/1805.
Sum_{n >= 1} 6^n/(a(n)*a(n+4)) = 4282/80275; Sum_{n >= 1} (-6)^n/(a(n)*a(n+4)) = -1698/80275. (End)

Extensions

Edited by Charles R Greathouse IV, Mar 24 2010

A059801 Numbers k such that 4^k - 3^k is prime.

Original entry on oeis.org

2, 3, 7, 17, 59, 283, 311, 383, 499, 521, 541, 599, 1193, 1993, 2671, 7547, 24019, 46301, 48121, 68597, 91283, 131497, 148663, 184463, 341233
Offset: 1

Views

Author

Mike Oakes, Feb 23 2001

Keywords

Comments

Some of the larger entries may only correspond to probable primes.
The values corresponding to 1193 (719 digits) and 1993 (1200 digits) have been certified prime with Primo. - Rick L. Shepherd, Sep 10 2002
8 more terms found by Jean-Louis Charton during 2004 - 2006. Corresponding numbers of decimal digits are 14461, 27876, 28972, 41300, 54958, 79170, 89505, 111058, 205443. - Alexander Adamchuk, Dec 02 2006

Crossrefs

Programs

A059802 Numbers k such that 5^k - 4^k is prime.

Original entry on oeis.org

3, 43, 59, 191, 223, 349, 563, 709, 743, 1663, 5471, 17707, 19609, 35449, 36697, 45259, 91493, 246497, 265007, 289937
Offset: 1

Views

Author

Mike Oakes, Feb 23 2001

Keywords

Comments

Some of the larger terms may only correspond to probable primes.
5^1663 - 4^1663, a 1163-digit number, has been certified prime with Primo. - Rick L. Shepherd, Nov 13 2002
4 more terms found by Predrag Minovic in 2004: 35449, 36697, 45259, 91493. Corresponding numbers of decimal digits are 24778, 25651, 31635, 63951. - Alexander Adamchuk, Dec 02 2006

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], PrimeQ[5^# - 4^#] &] (* Alonso del Arte, Sep 09 2013 *)
  • PARI
    forprime(p=2,1e5,if(ispseudoprime(5^p-4^p),print1(p", "))) \\ Charles R Greathouse IV, Jun 10 2011

Extensions

New term 246497 found by Jean-Louis Charton in 2008 corresponding to a probable prime with 172295 digits - Jean-Louis Charton, Sep 02 2009
New term a(19) = 265007 found by Jean-Louis Charton, Feb 19 2013
a(20) = 289937 found by Jean-Louis Charton, Mar 15 2013

A062572 Numbers k such that 6^k - 5^k is prime.

Original entry on oeis.org

2, 5, 11, 13, 23, 61, 83, 421, 1039, 1511, 31237, 60413, 113177, 135647, 258413
Offset: 1

Views

Author

Mike Oakes, May 18 2001, May 19 2001

Keywords

Comments

The 809- and 1176-digit numbers associated with the terms 1039 and 1511 have been certified prime with Primo. - Rick L. Shepherd, Nov 15 2002

Examples

			2 is in the sequence because 6^2 - 5^2 = 36 - 25 = 11, which is prime.
3 is not in the sequence because 6^3 - 5^3 = 216 - 125 = 91 = 7 * 13, which is not prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], PrimeQ[6^# - 5^#] &] (* Alonso del Arte, Sep 04 2013 *)
  • PARI
    forprime(p=2,1e4,if(ispseudoprime(6^n-5^n),print1(p", "))) \\ Charles R Greathouse IV, Jun 10 2011

Extensions

Edited by T. D. Noe, Oct 30 2008
Two more terms (31237 and 60413) found by Predrag Minovic in 2004 corresponding to probable primes with 24308 and 47011 digits. Jean-Louis Charton, Oct 06 2010
Two more terms (113177 and 135647) found by Jean-Louis Charton in 2009 corresponding to probable primes with 88069 and 105554 digits. Jean-Louis Charton, Oct 13 2010
a(15) from Jean-Louis Charton, Apr 08 2013

A062666 Numbers k such that 100^k - 99^k is prime.

Original entry on oeis.org

2, 5, 19, 59, 1013, 2371, 13967, 44683
Offset: 1

Views

Author

Mike Oakes, May 18 2001, May 19 2001

Keywords

Comments

Terms > 10000 correspond to probable primes.
a(9) > 10^5. - Robert Price, Jul 10 2013

Crossrefs

Programs

Extensions

Edited by T. D. Noe, Oct 30 2008
a(7)-a(8) from Robert Price, Jul 10 2013

A062589 Numbers k such that 23^k - 22^k is prime, or a strong pseudoprime.

Original entry on oeis.org

229, 241, 673, 5387, 47581
Offset: 1

Views

Author

Mike Oakes, May 18 2001, May 19 2001

Keywords

Comments

Terms greater than 1000 often correspond to "unproven" strong pseudoprimes.
a(6) > 10^5. - Robert Price, Aug 22 2012

Crossrefs

Extensions

a(5) from Robert Price, Aug 22 2012
Edited by M. F. Hasler, Sep 21 2013

A062587 Numbers k such that 21^k - 20^k is prime.

Original entry on oeis.org

2, 19, 41, 43, 337, 479, 9127, 37549, 44017, 59971, 128327, 176191, 193601
Offset: 1

Views

Author

Mike Oakes, May 18 2001, May 19 2001

Keywords

Comments

Terms greater than 1000 may correspond to (unproven) strong pseudoprimes.

Crossrefs

Programs

Extensions

a(8) from Jean-Louis Charton, Feb 29 2012
a(9) and a(10) from Robert Price, May 30 2012
Edited by M. F. Hasler, Sep 16 2013
a(11) added by Jean-Louis Charton, Nov 24 2014
a(12) added by Jean-Louis Charton, Feb 05 2015
a(13) added by Jean-Louis Charton, Feb 18 2015

A128027 Numbers n such that (11^n - 3^n)/8 is prime.

Original entry on oeis.org

3, 5, 19, 31, 367, 389, 431, 2179, 10667, 13103, 90397
Offset: 1

Views

Author

Alexander Adamchuk, Feb 11 2007

Keywords

Comments

All terms are primes.
No other terms < 10^5.

Crossrefs

Cf. A028491 = numbers n such that (3^n - 1)/2 is prime. Cf. A057468 = numbers n such that 3^n - 2^n is prime. 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, A128028, A128029, A128030, A128031, A128032.

Programs

  • Magma
    [p: p in PrimesUpTo(400) | IsPrime((11^p-3^p) div 8)]; // Vincenzo Librandi, Nov 20 2014
    
  • Maple
    A128027:=n->`if`(isprime((11^n-3^n)/8),n,NULL): seq(A128027(n),n=1..1000); # Wesley Ivan Hurt, Nov 19 2014
  • Mathematica
    k=8; Select[ Prime[ Range[1,200] ], PrimeQ[ ((k+3)^# - 3^#)/k ]& ]
    Do[If[PrimeQ[(11^n - 3^n)/8], Print[n]], {n, 10^4}] (* Ryan Propper, Mar 17 2007 *)
    Select[Prime[Range[1200]], PrimeQ[(11^# - 3^#)/8] &] (* Vincenzo Librandi, Nov 20 2014 *)
  • PARI
    is(n)=ispseudoprime((11^n - 3^n)/8) \\ Charles R Greathouse IV, Feb 17 2017

Extensions

a(8) from Ryan Propper, Mar 17 2007
a(9) from Farideh Firoozbakht, Apr 04 2007
a(10)=13103, a(11)=90397 from Robert Price, Apr 24 2011

A128024 Numbers k such that (7^k - 3^k)/4 is prime.

Original entry on oeis.org

3, 7, 19, 109, 131, 607, 863, 2917, 5923, 12421, 187507, 353501, 817519
Offset: 1

Views

Author

Alexander Adamchuk, Feb 11 2007

Keywords

Comments

All terms are primes. No other terms < 1000000.

Crossrefs

Programs

  • Mathematica
    k=4; Select[ Prime[ Range[1,200] ], PrimeQ[ ((k+3)^# - 3^#)/k ]& ]
  • PARI
    forprime(p=3,1e5,if(ispseudoprime((7^p-3^p)/4),print1(p", "))) \\ Charles R Greathouse IV, Jun 01 2011
    
  • Python
    from sympy import isprime
    def aupto(lim): return [k for k in range(lim+1) if isprime((7**k-3**k)//4)]
    print(aupto(900)) # Michael S. Branicky, Mar 07 2021

Extensions

a(8)-a(9) from Farideh Firoozbakht, Apr 08 2007
a(10) from Robert Price, Jun 01 2011
a(11)-a(13) from Jon Grantham, Jul 29 2023
Showing 1-10 of 123 results. Next