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

A174120 Partial sums of A024012.

Original entry on oeis.org

1, 2, 2, 1, 1, 8, 36, 115, 307, 738, 1662, 3589, 7541, 15564, 31752, 64295, 129575, 260358, 522178, 1046105, 2094281, 4190992, 8384812, 16772891, 33549531, 67103338, 134211526, 268428525, 536863197, 1073733268, 2147474192
Offset: 1

Views

Author

Keywords

Comments

A024012 2^n-n^2 -> 1,1,0,-1,0,7,28,79,192,431,924,1927,3952,..

Programs

  • Mathematica
    f[n_]:=Sum[2^i-i^2,{i,0,n}];Table[f[n],{n,0,5!}]
  • PARI
    Vec(-x*(x^3+4*x^2-4*x+1)/((x-1)^4*(2*x-1)) + O(x^100)) \\ Colin Barker, Oct 27 2014

Formula

a(n) = (-1+2^n-n/6+n^2/2-n^3/3). G.f.: -x*(x^3+4*x^2-4*x+1) / ((x-1)^4*(2*x-1)). - Colin Barker, Oct 27 2014

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

Original entry on oeis.org

5, 7, 9, 17, 19, 51, 53, 81, 83, 119, 189, 219, 227, 301, 455, 461, 623, 2037, 2221, 2455, 3547, 5515, 6825, 8303, 9029, 12103, 49989, 55525, 64773, 80307, 119087, 141915, 192023, 205933, 301683, 307407
Offset: 1

Views

Author

Daniel Gronau (Daniel.Gronau(AT)gmx.de), Jun 30 2002

Keywords

Comments

The numbers corresponding to k = 2037, 2221, 3547 and 5515 have been certified prime with Primo. - Rick L. Shepherd, Nov 10 2002
The remaining k's > 1000 correspond only to probable primes.
Certainly k must be odd. Let N(k) = 2^k - k^2. Additional restrictions come from the facts that 7 | N(k) if k is in {2, 4, 5, 6, 10, 15} mod 21 and 17 | N(k) if k is in {31, 57, 61, 71, 107, 109, 113, 131} mod 136. - Daniel Gronau, Jul 06 2002
Henri Lifchitz found the terms > 40000 in 2001 and 119087 in March 2002. - Hugo Pfoertner, Nov 16 2004

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[ 2^n - n^2], Print[n]], {n, 1, 22850, 2}]
  • PARI
    is(n)=isprime(2^n-n^2) \\ Charles R Greathouse IV, Feb 17 2017

Extensions

Edited and extended by Robert G. Wilson v, Jul 01 2002
More terms from Hugo Pfoertner, Nov 16 2004
More terms from Henri Lifchitz submitted by Ray Chandler, Mar 02 2007

A024040 a(n) = 4^n - n^4.

Original entry on oeis.org

1, 3, 0, -17, 0, 399, 2800, 13983, 61440, 255583, 1038576, 4179663, 16756480, 67080303, 268397040, 1073691199, 4294901760, 17179785663, 68719371760, 274877776623, 1099511467776, 4398046316623, 17592185810160, 70368743897823, 281474976378880, 1125899906451999
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Formula

G.f.: (1-6*x+3*x^2+23*x^3+48*x^4+3*x^5)/((1-4*x)*(1-x)^5).
E.g.f.: exp(4*x)-(x^4+6*x^3+7*x^2+x)*exp(x). - Robert Israel, Dec 29 2014

A024054 a(n) = 5^n - n^5.

Original entry on oeis.org

1, 4, -7, -118, -399, 0, 7849, 61318, 357857, 1894076, 9665625, 48667074, 243891793, 1220331832, 6102977801, 30516818750, 152586842049, 762938033268, 3814695376057, 19073483852026, 95367428440625
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Formula

G.f.: (-6*x^6 - 123*x^5 - 319*x^4 - 44*x^3 + 6*x^2 + 7*x - 1)/((x - 1)^6*(5*x - 1)). - Harvey P. Dale, Oct 15 2014
a(0)=1, a(1)=4, a(2)=-7, a(3)=-118, a(4)=-399, a(5)=0, a(6)=7849, a(n) = 11*a(n-1) - 45*a(n-2) + 95*a(n-3) - 115*a(n-4) + 81*a(n-5) - 31*a(n-6) + 5*a(n-7). - Harvey P. Dale, Oct 15 2014

A024068 a(n) = 6^n - n^6.

Original entry on oeis.org

1, 5, -28, -513, -2800, -7849, 0, 162287, 1417472, 9546255, 59466176, 361025495, 2173796352, 13055867207, 78356634560, 470173593951, 2821093130240, 16926635307167, 101559922656192, 609359692964615, 3656158376062976, 21936950554611735, 131621703728887232, 789730222905566927
Offset: 0

Views

Author

Keywords

Comments

6^n in the formula can be removed (for example) with the following Maple code: "with(gfun): rec1:={u1(0)=1,u1(n+1)=6*u1(n)}: rec2:={u2(n)=n^6}: poltorec(u1(n)-u2(n),[rec1,rec2],u1(n),u2(n)],a(n));". This yields a polynomial recurrence: {a(n+1)-5*n^6+6*n^5+15*n^4+20*n^3+15*n^2-6*a(n)+6*n+1, a(0) = 1} that can further be transformed into a linear recurrence with constant coefficients. - Georg Fischer, Feb 23 2021

Crossrefs

Programs

Formula

From Chai Wah Wu, Jan 26 2020: (Start)
a(n) = 13*a(n-1) - 63*a(n-2) + 161*a(n-3) - 245*a(n-4) + 231*a(n-5) - 133*a(n-6) + 43*a(n-7) - 6*a(n-8) for n > 7.
G.f.: (5*x^7 + 348*x^6 + 1734*x^5 + 1545*x^4 + 5*x^3 - 30*x^2 - 8*x + 1)/((x - 1)^7*(6*x - 1)). (End)

Extensions

More terms from Georg Fischer, Feb 23 2021

A075896 Primes of the form 2^k - k^2.

Original entry on oeis.org

7, 79, 431, 130783, 523927, 2251799813682647, 9007199254738183, 2417851639229258349405791, 9671406556917033397642519, 664613997892457936451903530140158127, 784637716923335095479473677900958302012794430558004278391
Offset: 1

Views

Author

Zak Seidov, Oct 17 2002

Keywords

Crossrefs

Primes in A024012.

Programs

  • Magma
    [a: n in [1..200] | IsPrime(a) where a is 2^n-n^2]; // Vincenzo Librandi, Dec 07 2011
  • Mathematica
    Select[Table[2^n - n^2, {n, 500}], PrimeQ] (* Vincenzo Librandi, Dec 07 2011 *)
  • PARI
    for(n=2,10^7,if(isprime(2^n-n^2),print1(2^n-n^2",")))
    

Formula

a(n) = A024012(A072180(n)). - Elmo R. Oliveira, Feb 18 2025

Extensions

More terms from Ralf Stephan, Mar 30 2003

A024082 7^n-n^7.

Original entry on oeis.org

1, 6, -79, -1844, -13983, -61318, -162287, 0, 3667649, 35570638, 272475249, 1957839572, 13805455393, 96826261890, 678117659345, 4747390650568, 33232662134145, 232630103648534, 1628412985690417, 11398894291501404, 79792265017612001, 558545862282195466
Offset: 0

Views

Author

Keywords

Comments

a(20)=79792265017612001 and a(24)=191581231375979942977 are primes, thus terms of A123206. - M. F. Hasler, Aug 20 2014

Crossrefs

Programs

Formula

G.f.: (1-9*x-85*x^2-407*x^3+5991*x^4+15665*x^5+8245*x^6+831*x^7+8*x^8)/((1-7*x)*(1-x)^8). - Bruno Berselli, May 16 2011

Extensions

More terms from Stefan Steinerberger, Apr 08 2006

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

Original entry on oeis.org

1, 2, 5, 18, 65, 218, 693, 2138, 6497, 19602, 58949, 177026, 531297, 1594154, 4782773, 14348682, 43046465, 129139874, 387420165, 1162261106, 3486784001, 10460352762, 31381059125, 94143178298, 282429535905, 847288608818
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. sequences of the form k^n-n^2: A024012 (k=2), this sequence (k=3), A024038 (k=4), A024051 (k=5), A024064 (k=6), A024077 (k=7), A024090 (k=8), A024103 (k=9), A024116 (k=10), A024129 (k=11), A024142 (k=12).

Programs

  • Magma
    [3^n-n^2: n in [0..30]]; // Vincenzo Librandi, Jul 02 2011
    
  • Maple
    A024025:=n->3^n-n^2: seq(A024025(n), n=0..50); # Wesley Ivan Hurt, Jan 11 2017
  • Mathematica
    Table[3^n - n^2, {n, 0, 25}] (* or *) CoefficientList[Series[(1 - 4 x + 5 x^2 + 2 x^3)/((1 - 3 x) (1 - x)^3), {x, 0, 30}], x] (* Vincenzo Librandi, Oct 05 2014 *)
  • SageMath
    [3^n-n^2 for n in range(31)] # G. C. Greubel, Aug 18 2023

Formula

G.f.: (1-4*x+5*x^2+2*x^3)/((1-3*x)*(1-x)^3). - Vincenzo Librandi, Oct 05 2014
a(n) = 6*a(n-1) -12*a(n-2) +10*a(n-3) -3*a(n-4) for n>3. - Vincenzo Librandi, Oct 05 2014
a(n) = A000244(n) - A000290(n). - Michel Marcus, Oct 05 2014
E.g.f.: exp(3*x) - x*(1+x)*exp(x). - G. C. Greubel, Aug 18 2023

A024096 a(n) = 8^n - n^8.

Original entry on oeis.org

1, 7, -192, -6049, -61440, -357857, -1417472, -3667649, 0, 91171007, 973741824, 8375575711, 68289495040, 548940083167, 4396570722048, 35181809198207, 281470681743360, 2251792837927807, 18014387489521408, 144115171092292831
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [8^n-n^8: n in [0..25]]; // Vincenzo Librandi, May 16 2011
    
  • Mathematica
    Table[8^n - n^8, {n, 0, 20}] (* or *) LinearRecurrence[ {17, -108, 372, -798, 1134, -1092, 708, -297, 73, -8}, {1, 7, -192, -6049, -61440, -357857, -1417472, -3667649, 0, 91171007}, 20] (* Harvey P. Dale, Oct 10 2013 *)
  • PARI
    a(n)=8^n-n^8 \\ Charles R Greathouse IV, Oct 07 2015

Formula

G.f.: (1 - 10*x - 203*x^2 - 2401*x^3 + 18851*x^4 + 109207*x^5 + 120743*x^6 + 34061*x^7 + 1984*x^8 + 7*x^9) / ((1-8*x)*(1-x)^9). - Bruno Berselli, May 16 2011
a(0)=1, a(1)=7, a(2)=-192, a(3)=-6049, a(4)=-61440, a(5)=-357857, a(6)=-1417472, a(7)=-3667649, a(8)=0, a(9)=91171007; for n>9, a(n) = 17*a(n-1) - 108*a(n-2) + 372*a(n-3) - 798*a(n-4) + 1134*a(n-5) - 1092*a(n-6) + 708*a(n-7) - 297*a(n-8) + 73*a(n-9) - 8*a(n-10). - Harvey P. Dale, Oct 10 2013

A024110 a(n) = 9^n - n^9.

Original entry on oeis.org

1, 8, -431, -18954, -255583, -1894076, -9546255, -35570638, -91171007, 0, 2486784401, 29023111918, 277269756129, 2531261328956, 22856131408177, 205852688735274, 1852951469375105, 16677063111790072, 150094436937708753
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Formula

From Chai Wah Wu, Jan 26 2020: (Start)
a(n) = 19*a(n-1) - 135*a(n-2) + 525*a(n-3) - 1290*a(n-4) + 2142*a(n-5) - 2478*a(n-6) + 2010*a(n-7) - 1125*a(n-8) + 415*a(n-9) - 91*a(n-10) + 9*a(n-11) for n > 10.
G.f.: (-10*x^10 - 4507*x^9 - 131015*x^8 - 779378*x^7 - 1317686*x^6 - 637664*x^5 - 43448*x^4 + 10210*x^3 + 448*x^2 + 11*x - 1)/((x - 1)^10*(9*x - 1)). (End)
Showing 1-10 of 25 results. Next