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

A000325 a(n) = 2^n - n.

Original entry on oeis.org

1, 1, 2, 5, 12, 27, 58, 121, 248, 503, 1014, 2037, 4084, 8179, 16370, 32753, 65520, 131055, 262126, 524269, 1048556, 2097131, 4194282, 8388585, 16777192, 33554407, 67108838, 134217701, 268435428, 536870883, 1073741794, 2147483617
Offset: 0

Views

Author

Rosario Salamone (Rosario.Salamone(AT)risc.uni-linz.ac.at)

Keywords

Comments

Number of permutations of degree n with at most one fall; called "Grassmannian permutations" by Lascoux and Schützenberger. - Axel Kohnert (Axel.Kohnert(AT)uni-bayreuth.de)
Number of different permutations of a deck of n cards that can be produced by a single shuffle. [DeSario]
Number of Dyck paths of semilength n having at most one long ascent (i.e., ascent of length at least two). Example: a(4)=12 because among the 14 Dyck paths of semilength 4, the only paths that have more than one long ascent are UUDDUUDD and UUDUUDDD (each with two long ascents). Here U = (1, 1) and D = (1, -1). Also number of ordered trees with n edges having at most one branch node (i.e., vertex of outdegree at least two). - Emeric Deutsch, Feb 22 2004
Number of {12,1*2*,21*}-avoiding signed permutations in the hyperoctahedral group.
Number of 1342-avoiding circular permutations on [n+1].
2^n - n is the number of ways to partition {1, 2, ..., n} into arithmetic progressions, where in each partition all the progressions have the same common difference and have lengths at least 1. - Marty Getz (ffmpg1(AT)uaf.edu) and Dixon Jones (fndjj(AT)uaf.edu), May 21 2005
if b(0) = x and b(n) = b(n-1) + b(n-1)^2*x^(n-2) for n > 0, then b(n) is a polynomial of degree a(n). - Michael Somos, Nov 04 2006
The chromatic invariant of the Mobius ladder graph M_n for n >= 2. - Jonathan Vos Post, Aug 29 2008
Dimension sequence of the dual alternative operad (i.e., associative and satisfying the identity xyz + yxz + zxy + xzy + yzx + zyx = 0) over the field of characteristic 3. - Pasha Zusmanovich, Jun 09 2009
An elephant sequence, see A175654. For the corner squares six A[5] vectors, with decimal values between 26 and 176, lead to this sequence (without the first leading 1). For the central square these vectors lead to the companion sequence A168604. - Johannes W. Meijer, Aug 15 2010
a(n+1) is also the number of order-preserving and order-decreasing partial isometries (of an n-chain). - Abdullahi Umar, Jan 13 2011
A040001(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n. - Michael Somos, May 12 2012
A130103(n+1) = p(n+1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n. - Michael Somos, May 12 2012
The number of labeled graphs with n vertices whose vertex set can be partitioned into a clique and a set of isolated points. - Alex J. Best, Nov 20 2012
For n > 0, a(n) is a B_2 sequence. - Thomas Ordowski, Sep 23 2014
See coefficients of the linear terms of the polynomials of the table on p. 10 of the Getzler link. - Tom Copeland, Mar 24 2016
Consider n points lying on a circle, then for n>=2 a(n-1) is the maximum number of ways to connect two points with non-intersecting chords. - Anton Zakharov, Dec 31 2016
Also the number of cliques in the (n-1)-triangular honeycomb rook graph. - Eric W. Weisstein, Jul 14 2017
From Eric M. Schmidt, Jul 17 2017: (Start)
Number of sequences (e(1), ..., e(n)), 0 <= e(i) < i, such that there is no triple i < j < k with e(i) != e(j) < e(k). [Martinez and Savage, 2.7]
Number of sequences (e(1), ..., e(n)), 0 <= e(i) < i, such that there is no triple i < j < k with e(i), e(j), e(k) pairwise distinct. [Martinez and Savage, 2.7]
Number of sequences (e(1), ..., e(n)), 0 <= e(i) < i, such that there is no triple i < j < k with e(j) >= e(k) and e(i) != e(k) pairwise distinct. [Martinez and Savage, 2.7]
(End)
Number of F-equivalence classes of Łukasiewicz paths. Łukasiewicz paths are F-equivalent iff the positions of pattern F are identical in these paths. - Sergey Kirgizov, Apr 08 2018
From Gus Wiseman, Feb 10 2019: (Start)
Also the number of connected partitions of an n-cycle. For example, the a(1) = 1 through a(4) = 12 connected partitions are:
{{1}} {{12}} {{123}} {{1234}}
{{1}{2}} {{1}{23}} {{1}{234}}
{{12}{3}} {{12}{34}}
{{13}{2}} {{123}{4}}
{{1}{2}{3}} {{124}{3}}
{{134}{2}}
{{14}{23}}
{{1}{2}{34}}
{{1}{23}{4}}
{{12}{3}{4}}
{{14}{2}{3}}
{{1}{2}{3}{4}}
(End)
Number of subsets of n-set without the single-element subsets. - Yuchun Ji, Jul 16 2019
For every prime p, there are infinitely many terms of this sequence that are divisible by p (see IMO Compendium link and Doob reference). Corresponding indices n are: for p = 2, even numbers A299174; for p = 3, A047257; for p = 5, A349767. - Bernard Schott, Dec 10 2021
Primes are in A081296 and corresponding indices in A048744. - Bernard Schott, Dec 12 2021

Examples

			G.f. = 1 + x + 2*x^2 + 5*x^3 + 12*x^4 + 27*x^5 + 58*x^6 + 121*x^7 + ...
		

References

  • Michael Doob, The Canadian Mathematical Olympiad & L'Olympiade Mathématique du Canada 1969-1993, Canadian Mathematical Society & Société Mathématique du Canada, Problem 4, 1983, page 158, 1993.

Crossrefs

Column 1 of triangle A008518.
Row sum of triangles A184049 and A184050.

Programs

  • Haskell
    a000325 n = 2 ^ n - n
    a000325_list = zipWith (-) a000079_list [0..]
    -- Reinhard Zumkeller, Jul 17 2012
    
  • Magma
    [2^n - n: n in [0..35]]; // Vincenzo Librandi, May 13 2011
    
  • Maple
    A000325 := proc(n) option remember; if n <=1 then n+1 else 2*A000325(n-1)+n-1; fi; end;
    g:=1/(1-2*z): gser:=series(g, z=0, 43): seq(coeff(gser, z, n)-n, n=0..31); # Zerinvary Lajos, Jan 09 2009
  • Mathematica
    Table[2^n - n, {n, 0, 39}] (* Alonso del Arte, Sep 15 2014 *)
    LinearRecurrence[{4, -5, 2}, {1, 2, 5}, {0, 20}] (* Eric W. Weisstein, Jul 14 2017 *)
  • PARI
    {a(n) = 2^n - n}; /* Michael Somos, Nov 04 2006 */
    
  • Python
    def A000325(n): return (1<Chai Wah Wu, Jan 11 2023

Formula

a(n+1) = 2*a(n) + n - 1, a(0) = 1. - Reinhard Zumkeller, Apr 12 2003
Binomial transform of 1, 0, 1, 1, 1, .... The sequence starting 1, 2, 5, ... has a(n) = 1 + n + 2*Sum_{k=2..n} binomial(n, k) = 2^(n+1) - n - 1. This is the binomial transform of 1, 1, 2, 2, 2, 2, .... a(n) = 1 + Sum_{k=2..n} C(n, k). - Paul Barry, Jun 06 2003
G.f.: (1-3x+3x^2)/((1-2x)*(1-x)^2). - Emeric Deutsch, Feb 22 2004
A107907(a(n+2)) = A000051(n+2) for n > 0. - Reinhard Zumkeller, May 28 2005
a(n+1) = sum of n-th row of the triangle in A109128. - Reinhard Zumkeller, Jun 20 2005
Row sums of triangle A133116. - Gary W. Adamson, Sep 14 2007
G.f.: 1 / (1 - x / (1 - x / ( 1 - x / (1 + x / (1 - 2*x))))). - Michael Somos, May 12 2012
First difference is A000225. PSUM transform is A084634. - Michael Somos, May 12 2012
a(n) = [x^n](B(x)^n-B(x)^(n-1)), n>0, a(0)=1, where B(x) = (1+2*x+sqrt(1+4*x^2))/2. - Vladimir Kruchinin, Mar 07 2014
E.g.f.: (exp(x) - x)*exp(x). - Ilya Gutkovskiy, Aug 07 2016
a(n) = A125128(n) - A000225(n) + 1. - Miquel Cerda, Aug 12 2016
a(n) = 2*A125128(n) - A095151(n) + 1. - Miquel Cerda, Aug 12 2016
a(n) = A079583(n-1) - A000225(n-1). - Miquel Cerda, Aug 15 2016
a(n)^2 - 4*a(n-1)^2 = (n-2)*(a(n)+2*a(n-1)). - Yuchun Ji, Jul 13 2018
a(n) = 2^(-n) * A186947(n) = 2^n * A002064(-n) for all n in Z. - Michael Somos, Jul 18 2018
a(2^n) = (2^a(n) - 1)*2^n. - Lorenzo Sauras Altuzarra, Feb 01 2022

A048744 Numbers k such that 2^k - k is prime.

Original entry on oeis.org

2, 3, 9, 13, 19, 21, 55, 261, 3415, 4185, 7353, 12213, 44169, 60975, 61011, 108049, 182451, 228271, 481801, 500899, 505431, 1015321, 1061095
Offset: 1

Views

Author

Keywords

Comments

All terms except for the first are odd. - Joerg Arndt, Jul 19 2016
From Iain Fox, Nov 14 2017: (Start)
If k is congruent to 5 mod 6, then 3 divides 2^k - k; therefore a(n) is never congruent to 5 mod 6.
For even k, 2^k - k is divisible by 2; thus all terms other than 2 are odd.
It follows that for n > 1, a(n) is congruent to {1, 3} mod 6.
(End)

Examples

			2^55 - 55 = 36028797018963913 is prime, so 55 is a term.
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 261, p. 70, Ellipses, Paris 2008.

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[ 2^n - n ], Print[ n ] ], {n, 0, 7353} ]
    (* Second program: *)
    Select[Range[8000], PrimeQ[2^# - #] &] (* Michael De Vlieger, Nov 15 2017 *)
  • PARI
    for(n=1,10^5,if(ispseudoprime(2^n-n),print1(n,", "))) \\ Derek Orr, Sep 01 2014

Extensions

261 and 3415 found by Warut Roonguthai
4185 and 7353 are probable primes (the latter was found by Jud McCranie).
12213 found by Robert G. Wilson v, Jan 02 2001
More terms from Henri Lifchitz contributed by Ray Chandler, Mar 02 2007
Edited by T. D. Noe, Oct 30 2008
a(22)-a(23) from Henri Lifchitz contributed by Robert Price, Sep 01 2014

A129962 Primes of the form 2^k + k.

Original entry on oeis.org

3, 11, 37, 521, 32783, 549755813927, 37778931862957161709643, 2417851639229258349412433, 618970019642690137449562201, 266998379490113760299377713271194014325338065294581596243380200977777465722580068752870260867389
Offset: 1

Views

Author

Cino Hilliard, Jun 10 2007

Keywords

Comments

It is convenient, although not necessary, to let k be an odd number since k even => 2^k + k is even > 2.
Conjecture: sequence is infinite.
If k is prime we have A057664.

Examples

			For k = 3, 2^3 + 3 = 11 prime, so 11 is a term.
		

Crossrefs

Cf. A052007 (values of k), A057664, A081296.

Programs

  • Magma
    [a: n in [0..400] | IsPrime(a) where a is 2^n + n]; // Vincenzo Librandi, Jul 25 2019
  • Mathematica
    Select[Table[2^n+n,{n,600}],PrimeQ[#]&] (* Vladimir Joseph Stephan Orlovsky, Feb 18 2011 *)
  • PARI
    f(n) = forstep(x=1,n,2,y=2^x+x;if(isprime(y),print1(y",")))
    

A224420 Primes of the form 3^n - n.

Original entry on oeis.org

2, 7, 6553, 3486784381, 12157665459056928761, 41745579179292917813953351511015323088870709281977, 30432527221704537086371993251530170531786747066636939
Offset: 1

Views

Author

Alex Ratushnyak, Apr 06 2013

Keywords

Comments

The next term is too big to display. Corresponding n are given in A058037.

Crossrefs

Programs

  • Mathematica
    Select[Table[3^k - k, {k, 2, 200, 2}], PrimeQ] (* Bruno Berselli, Apr 07 2013 *)

A224468 Primes of the form 7^n - n.

Original entry on oeis.org

47, 117643, 5764793, 13841287189, 15286700631942576193765185769276826357, 36703368217294125441230211032033660188753
Offset: 1

Views

Author

Alex Ratushnyak, Apr 06 2013

Keywords

Comments

The next term is too big to display. Corresponding n are given in A224470.

Crossrefs

Programs

  • Mathematica
    Select[Table[7^k - k, {k, 2, 1000, 2}], PrimeQ] (* Bruno Berselli, Apr 07 2013 *)

A224469 Primes of the form 8^n - n.

Original entry on oeis.org

7, 509, 2596148429267413814265248164610011, 43556142965880123323311949751266331066323
Offset: 1

Views

Author

Alex Ratushnyak, Apr 06 2013

Keywords

Comments

The next term is too big to display.
Corresponding n are given in A224471.

Crossrefs

Programs

  • Maple
    A224469:=proc(q) local n;
    for n from 1 to q do if isprime(8^n-n) then print(8^n-n); fi; od; end:
    A224469(100); # Paolo P. Lava, Apr 19 2013
  • Mathematica
    Select[Table[8^n - n, {n, 500}], PrimeQ] (* Alonso del Arte, Apr 06 2013 *)

A273940 Primes of the form 5^m - m.

Original entry on oeis.org

23, 15619, 244140613
Offset: 1

Views

Author

Vincenzo Librandi, Jun 05 2016

Keywords

Comments

Corresponding values of m are given in A058046.
The next term has 254 digits.

Crossrefs

Primes of the form k^m - m: A081296 (k=2), A224420 (k=3), A224451 (k=4), this sequence (k=5), A273941 (k=6), A224468 (k=7), A224469 (k=8).

Programs

  • Magma
    [a: n in [0..400] | IsPrime(a) where a is 5^n-n];
    
  • Mathematica
    Select[Table[5^n - n, {n, 400}], PrimeQ]
  • PARI
    forstep(n=2,1e4,2, if(ispseudoprime(t=5^n-n), print1(t", "))) \\ Charles R Greathouse IV, Jun 08 2016

Formula

a(n) = A024050(A058046(n)). - Amiram Eldar, Jul 27 2025

A241764 Semiprimes sp such that sp-3 is also semiprime.

Original entry on oeis.org

9, 25, 38, 49, 58, 65, 77, 85, 94, 118, 121, 122, 145, 146, 158, 161, 169, 205, 206, 209, 217, 218, 221, 262, 265, 298, 301, 302, 305, 326, 329, 358, 361, 365, 394, 398, 454, 469, 481, 485, 505, 514, 517, 529, 538, 545, 554, 562, 565, 586, 589, 614
Offset: 1

Views

Author

K. D. Bajpai, Apr 29 2014

Keywords

Comments

Also semiprimes of the form 2^x - x.
The primes of the form 2^x - x are in A081296.

Examples

			a(3)= 38 = 2*19, which is semiprime: 38-3 = 35 = 5*7 is also semiprime.
a(5)= 58 = 2*29, which is semiprime: 58-3 = 55 = 5*11 is also semiprime.
		

Crossrefs

Programs

A100339 Primes of the form 2^q + q where q is not a prime.

Original entry on oeis.org

3, 521, 32783, 549755813927, 37778931862957161709643, 2417851639229258349412433
Offset: 1

Views

Author

Cino Hilliard, Jan 11 2005

Keywords

Comments

The next term is 2^735+735 = 18073..35103, 222 digits long.

Examples

			For q = 9, 2^9+9 = 521 which is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[If[!PrimeQ[n],2^n+n,0],{n,1200}],PrimeQ] (* Vladimir Joseph Stephan Orlovsky, Feb 18 2011*)
  • PARI
    g1(p,n)=for(x=1,n,c=composite(x);y=p^c+c;if(gcd(y,c)==1,if(isprime(y),print1 (y",")))) composite(n) = \ the n-th composite number { local(c,x); c=1; x=0; while(c <= n, x++; if(!isprime(x),c++); ); return(x) }

Formula

a(n) = A006127(A100556(n-1)) for n >= 2. - Amiram Eldar, Jun 30 2024

A295111 Primes p such that 2^p - p is also a prime.

Original entry on oeis.org

2, 3, 13, 19, 481801
Offset: 1

Views

Author

Iain Fox, Nov 14 2017

Keywords

Comments

a(6) > 1061095.
Intersection of A000040 and A048744.
Since numbers other than 3 that are congruent to 3 mod 6 are composite, for n > 2, a(n) is congruent to 1 mod 6 (see comments by Iain Fox in A048744).

Examples

			p=13, 2^13 - 13 = 8179 is prime.
		

Crossrefs

Programs

  • PARI
    lista(nn) = forprime(p=2, nn, if(ispseudoprime(2^p - p), print1(p, ", ")))
Showing 1-10 of 10 results.