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

A188653 Second differences of A000463; first differences of A188652.

Original entry on oeis.org

1, 1, -3, 7, -11, 17, -23, 31, -39, 49, -59, 71, -83, 97, -111, 127, -143, 161, -179, 199, -219, 241, -263, 287, -311, 337, -363, 391, -419, 449, -479, 511, -543, 577, -611, 647, -683, 721, -759, 799, -839, 881, -923, 967, -1011, 1057, -1103, 1151, -1199, 1249, -1299, 1351, -1403, 1457, -1511, 1567, -1623, 1681, -1739, 1799, -1859, 1921, -1983, 2047, -2111, 2177, -2243, 2311, -2379, 2449, -2519, 2591, -2663, 2737, -2811
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 13 2011

Keywords

Crossrefs

Programs

  • Haskell
    a188653 n = a188653_list !! (n-1)
    a188653_list = zipWith (-) (tail a188652_list) a188652_list
  • Mathematica
    LinearRecurrence[{-2, 0, 2, 1}, {1, 1, -3, 7}, 75] (* Jean-François Alcover, Dec 16 2021 *)
    Differences[Flatten[Table[{n,n^2},{n,50}]],2] (* Harvey P. Dale, Aug 03 2025 *)

Formula

a(2*n) = a(2*n-1)+4*n^2-2*n-2, a(2*n+1) = -a(2*n)-2*n.
a(2*n) = A056220(n), a(2*n-1) = -A142463(n).
Abs(a(n)) = A047838(n) for n > 1.
a(n) = A188652(n+1)-A188652(n) = A000463(n+2)-2*A000463(n+1)+A000463(n).
G.f.: x*(-1-3*x+x^2+x^3) / ((x-1)*(1+x)^3). - R. J. Mathar, Apr 14 2011
a(n) = a(-n) = ((2*n^2-5)*(-1)^n+1)/4. - Bruno Berselli, Sep 14 2011
E.g.f.: 1 + ((x^2 - x - 2)*cosh(x) - (x^2 - x - 3)*sinh(x))/2. - Stefano Spezia, Jul 08 2023
Sum_{n>=1} 1/a(n) = 1/2 - cot(Pi/sqrt(2))*Pi/(2*sqrt(2)) - tan(sqrt(3)*Pi/2)*Pi/(2*sqrt(3)). - Amiram Eldar, May 11 2025

A188652 First differences of A000463.

Original entry on oeis.org

0, 1, 2, -1, 6, -5, 12, -11, 20, -19, 30, -29, 42, -41, 56, -55, 72, -71, 90, -89, 110, -109, 132, -131, 156, -155, 182, -181, 210, -209, 240, -239, 272, -271, 306, -305, 342, -341, 380, -379, 420, -419, 462, -461, 506, -505, 552, -551, 600, -599, 650, -649, 702, -701, 756, -755, 812, -811, 870, -869, 930, -929, 992, -991, 1056, -1055, 1122, -1121, 1190, -1189, 1260, -1259, 1332, -1331, 1406
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 13 2011

Keywords

Crossrefs

Cf. A188653 (first differences).

Programs

  • Haskell
    a188652 n = a188652_list !! (n-1)
    a188652_list = zipWith (-) (tail a000463_list) a000463_list
  • Mathematica
    Differences[Flatten[Array[{#,#^2}&,40]]] (* Harvey P. Dale, Aug 04 2012 *)

Formula

a(2n) = 1 - a(2n-1), a(2n+1) = 2*n + 1 - a(2n).
a(n) = A000463(n+1) - A000463(n).
a(2n-1) = A002378(n-1), a(2n) = - A165900(n).
G.f.: -x^2*(-1-3*x+x^2+x^3) / ( (x-1)^2*(1+x)^3 ). - R. J. Mathar, Apr 14 2011
a(n) = (2*n+3-(2*n^2-2*n-5)*(-1)^n)/8. - Luce ETIENNE, Dec 18 2014
E.g.f.: ((4 + x - x^2)*cosh(x) - (1 - x - x^2)*sinh(x) - 4)/4. - Stefano Spezia, Jul 08 2023
Sum_{n>=2} 1/a(n) = 1 + (sqrt(5)-5)*Pi*tan(sqrt(5)*Pi/2)/(5*(sqrt(5)-1)). - Amiram Eldar, May 11 2025

A159693 Partial sums of A000463.

Original entry on oeis.org

1, 2, 4, 8, 11, 20, 24, 40, 45, 70, 76, 112, 119, 168, 176, 240, 249, 330, 340, 440, 451, 572, 584, 728, 741, 910, 924, 1120, 1135, 1360, 1376, 1632, 1649, 1938, 1956, 2280, 2299, 2660, 2680, 3080, 3101, 3542, 3564, 4048, 4071, 4600, 4624, 5200, 5225, 5850
Offset: 1

Views

Author

Gerald Hillier, Apr 20 2009

Keywords

Comments

Sum of integers followed by squares.

Examples

			For n=9, a(n) = 1+1+2+4+3+9+4+16+5 = 45.
		

Crossrefs

Programs

  • Haskell
    a159693 n = a159693_list !! (n-1)
    a159693_list = scanl1 (+) a000463_list -- Reinhard Zumkeller, Nov 08 2015
  • Magma
    S:=&cat[ [ n, n^2 ]: n in [1..25] ]; [ n eq 1 select S[1] else Self(n-1)+S[n]: n in [1..#S] ]; // Klaus Brockhaus, Apr 20 2009
    
  • Maple
    seq((2*n^3+9*n^2+19*n+9+3*(n^2-n-3)*(-1)^n)/48, n=1..100); # Robert Israel, Dec 30 2014
  • Mathematica
    CoefficientList[Series[x*(1+x-x^2+x^3)/((1+x)^3*(x-1)^4), {x, 0, 50}], x] (* or *) Table[(2*n^3+9*n^2+19*n+9+3*(n^2-n-3)*(-1)^n)/48, {n,0,50}] (* G. C. Greubel, Jun 02 2018 *)
    Accumulate[Flatten[{#,#^2}&/@Range[30]]] (* Harvey P. Dale, Nov 30 2019 *)

Formula

a(n) = (n^3+3*n^2+8*n+r(n))/24, where r(n) = 3*n+9 if n is odd, 3*n^2 if n is even.
G.f.: x*(1+x-x^2+x^3)/((1+x)^3*(x-1)^4). - R. J. Mathar, Apr 20 2009
a(n) = a(n-1)+3*a(n-2)-3*a(n-3)-3*a(n-4)+3*a(n-5)+a(n-6)-a(n-7). - R. J. Mathar, Apr 20 2009
a(n) = (2*n^3+9*n^2+19*n+9+3*(n^2-n-3)*(-1)^n)/48. - Luce ETIENNE, Dec 29 2014
E.g.f.: (2*x^3+15*x^2+30*x+9)*exp(x)/48 +(x^2-3)*exp(-x)/16. - Robert Israel, Dec 30 2014

Extensions

More terms from R. J. Mathar and Klaus Brockhaus, Apr 20 2009

A109588 n followed by n^2 followed by n^3.

Original entry on oeis.org

1, 1, 1, 2, 4, 8, 3, 9, 27, 4, 16, 64, 5, 25, 125, 6, 36, 216, 7, 49, 343, 8, 64, 512, 9, 81, 729, 10, 100, 1000, 11, 121, 1331, 12, 144, 1728, 13, 169, 2197, 14, 196, 2744, 15, 225, 3375, 16, 256, 4096, 17, 289, 4913, 18, 324, 5832, 19, 361, 6859, 20, 400, 8000
Offset: 1

Views

Author

Mohammad K. Azarian, Aug 30 2005

Keywords

Crossrefs

Cf. A000463.

Programs

  • GAP
    Flat(List([1..20],n->[n,n^2,n^3])); # Muniru A Asiru, Sep 12 2018
  • Maple
    seq(seq(n^k, k=1..3), n=1..20); # Zerinvary Lajos, Jun 29 2007
  • Mathematica
    CoefficientList[Series[(1 + x + x^2 - 2*x^3 + 4*x^5 + x^6 - x^7 + x^8)/((1 - x)^4*(1 + x + x^2)^4), {x, 0, 20}], x] (* Stefano Spezia, Sep 12 2018 *)
    Table[{n,n^2,n^3},{n,20}]//Flatten (* or *) LinearRecurrence[{0,0,4,0,0,-6,0,0,4,0,0,-1},{1,1,1,2,4,8,3,9,27,4,16,64},60] (* Harvey P. Dale, Jan 10 2020 *)

Formula

From R. J. Mathar, Mar 30 2009: (Start)
a(n) = 4*a(n-3) - 6*a(n-6) + 4*a(n-9) - a(n-12).
a(3*k+1) = k+1, a(3*k+2) = A000290(k+1), a(3*k+3) = A000578(k+1).
G.f.: x*(1 + x + x^2 - 2*x^3 + 4*x^5 + x^6 - x^7 + x^8)/((1 - x)^4*(1 + x + x^2)^4). (End)
a(n) = floor((n + 2)/3)*((1 - (-1)^(2^(n + 2 - 3*floor((n + 2)/3))))/2 + floor((n + 2)/3)*(1 - (-1)^(2^(n + 1 - 3*floor((n + 1)/3))))/2 + (floor((n + 2)/3))^2*(1 - (-1)^(2^(n - 3*floor(n/3))))/2). - Luce ETIENNE, Dec 16 2014
E.g.f.: ((2*x^3 + 3*x^2 + 8*x - 21)*exp(-x/2)*cos(sqrt(3)*x/2) + (3*x^2 + 8*x + 15)*sqrt(3)*exp(-x/2)*sin(sqrt(3)*x/2) + (x^3 + 6*x^2 + 19*x + 21)*exp(x))/81. - Robert Israel, Dec 17 2014

A109594 n followed by n^3 followed by n^2.

Original entry on oeis.org

1, 1, 1, 2, 8, 4, 3, 27, 9, 4, 64, 16, 5, 125, 25, 6, 216, 36, 7, 343, 49, 8, 512, 64, 9, 729, 81, 10, 1000, 100, 11, 1331, 121, 12, 1728, 144, 13, 2197, 169, 14, 2744, 196, 15, 3375, 225, 16, 4096, 256, 17, 4913, 289, 18, 5832, 324, 19, 6859, 361, 20, 8000, 400
Offset: 1

Views

Author

Mohammad K. Azarian, Aug 30 2005

Keywords

Crossrefs

Programs

  • Maple
    map(t -> (t,t^3,t^2), [$1..100]); # Robert Israel, Dec 17 2017
  • Mathematica
    Flatten[Table[{n,n^3,n^2},{n,20}]] (* Harvey P. Dale, Jul 22 2012 *)
  • PARI
    Vec(x*(1+x+x^2-2*x^3+4*x^4+x^6+x^7-x^8)/((1-x)^4*(1+x+x^2)^4) + O(x^100)) \\ Colin Barker, Dec 02 2015

Formula

From Colin Barker, Dec 02 2015: (Start)
a(n) = 4*a(n-3) - 6*a(n-6) + 4*a(n-9) - a(n-12) for n > 12.
G.f.: x*(1+x+x^2-2*x^3+4*x^4+x^6+x^7-x^8) / ((1-x)^4*(1+x+x^2)^4).
(End)
a(n) = floor((n+2)/3)^((3*(n mod 3)^2-5*(n mod 3)+4)/2). - Luce ETIENNE, Dec 17 2017

A137442 n^2 followed by smallest integer not yet listed.

Original entry on oeis.org

1, 2, 4, 3, 9, 5, 16, 6, 25, 7, 36, 8, 49, 10, 64, 11, 81, 12, 100, 13, 121, 14, 144, 15, 169, 17, 196, 18, 225, 19, 256, 20, 289, 21, 324, 22, 361, 23, 400, 24, 441, 26, 484, 27, 529, 28, 576, 29, 625, 30, 676, 31, 729, 32, 784, 33, 841, 34, 900, 35, 961, 37, 1024, 38
Offset: 1

Views

Author

Andy Martin, Apr 18 2008

Keywords

Comments

Sequence is a permutation of the positive integers.

Crossrefs

Cf. A000463.

Programs

  • Mathematica
    f[s_List] := Block[{k = 1}, While[ MemberQ[s, k], k++ ]; Flatten@ Append[s, {((2 + Length@s)/2)^2, k}]]; Nest[f, {1, 2}, 33] (* Robert G. Wilson v, May 31 2009 *)
    Module[{nn=40,sq,int,len},sq=Range[nn]^2;int=Complement[Range[nn],sq];len=Min[Length[int],nn];Riffle[Take[sq,len],Take[int,len]]](* Harvey P. Dale, Nov 05 2013 *)
  • PARI
    lista(nn) = {for (n=1, nn, print1(n^2, ", ", n+round(sqrt(n)), ", "););} \\ Michel Marcus, Nov 02 2014
    
  • PARI
    a(n) = if (n % 2, ((n+1)/2)^2, (n/2)+round(sqrt(n/2))); \\ Michel Marcus, Nov 02 2014
  • Ruby
    # correct to any term:
    sk_ct = 2
    skip = 4
    at = 1
    (1..(1.0/0)).each{ |i|
    if (at+=1) == skip
    at+=1
    sk_ct +=1
    skip = sk_ct * sk_ct
    end
    print i*i, " ", at, " "
    }
    
  • Ruby
    # Simpler Ruby code, correct until i is so large that floating point rounding causes errors. I estimate this will be before i reaches 10000000000000000
    (1..(1.0/0)).each{ |i|
    print i*i, " ", i + (Math.sqrt(i) + 0.5).to_i, " "
    }
    

Formula

Formula, generating two terms for every m: m^2, m + round(sqrt(m)).
IFTE(n mod 2 ==1, ((n+1)/2)^2, (n/2)+round(sqrt(n/2),0)). - Gerald Hillier, Nov 15 2010

Extensions

More terms from Robert G. Wilson v, May 31 2009

A109614 n^3 followed by n followed by n^2.

Original entry on oeis.org

1, 1, 1, 8, 2, 4, 27, 3, 9, 64, 4, 16, 125, 5, 25, 216, 6, 36, 343, 7, 49, 512, 8, 64, 729, 9, 81, 1000, 10, 100, 1331, 11, 121, 1728, 12, 144, 2197, 13, 169, 2744, 14, 196, 3375, 15, 225, 4096, 16, 256, 4913, 17, 289, 5832, 18, 324, 6859, 19, 361, 8000, 20, 400
Offset: 1

Views

Author

Mohammad K. Azarian, Aug 30 2005

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (transpose)
    a109614 n = a109614_list !! (n-1)
    a109614_list = concat $ transpose
                   [tail a000578_list, a000027_list, tail a000290_list]
    -- Reinhard Zumkeller, Mar 14 2014
  • Mathematica
    Table[{n^3,n,n^2},{n,20}]//Flatten (* or *) LinearRecurrence[{0,0,4,0,0,-6,0,0,4,0,0,-1},{1,1,1,8,2,4,27,3,9,64,4,16},60] (* Harvey P. Dale, Feb 25 2016 *)

Formula

From R. J. Mathar, Jun 26 2009: (Start)
a(n) = 4*a(n-3) - 6*a(n-6) + 4*a(n-9) - a(n-12).
G.f.: -(-1-x-x^2-4*x^3+2*x^4-x^6-x^7+x^8)/((x-1)^4*(1+x+x^2)^4). (End)
a(n) = floor((n+2)/3)^((-3*(n mod 3)^2 + 5*(n mod 3) + 4)/2). - Luce ETIENNE, Mar 01 2018

A110001 n followed by n^2 followed by n^3 followed by n^4.

Original entry on oeis.org

1, 1, 1, 1, 2, 4, 8, 16, 3, 9, 27, 81, 4, 16, 64, 256, 5, 25, 125, 625, 6, 36, 216, 1296, 7, 49, 343, 2401, 8, 64, 512, 4096, 9, 81, 729, 6561, 10, 100, 1000, 10000, 11, 121, 1331, 14641, 12, 144, 1728, 20736, 13, 169, 2197, 28561, 14, 196, 2744, 38416, 15, 225
Offset: 1

Views

Author

Mohammad K. Azarian, Sep 02 2005

Keywords

Crossrefs

Programs

  • Maple
    seq(seq(n^k, k=1..4), n=1..15); # Zerinvary Lajos, Jun 29 2007
  • Mathematica
    Table[(3/8 + n/4 - (1/4) Cos[(Pi n)/2] - (1/8) Cos[Pi n] + (1/4) Sin[(Pi n)/2])^(Mod[n + 3, 4] + 1), {n, 1, 58}] (* Ilya Gutkovskiy, Dec 02 2015 *)
  • PARI
    Vec(x*(1+x+x^2+x^3-3*x^4-x^5+3*x^6+11*x^7+3*x^8-x^9-3*x^10+11*x^11-x^12+x^13-x^14+x^15) / ((1-x)^5*(1+x)^5*(1+x^2)^5) + O(x^100)) \\ Colin Barker, Dec 02 2015

Formula

a(n) = (3/8 + n/4 - (1/4)*cos((Pi*n)/2) - (1/8)*cos(Pi*n) + (1/4)*sin((Pi*n)/2))^(((n + 3) mod 4) + 1). - Ilya Gutkovskiy, Dec 02 2015
From Colin Barker, Dec 02 2015: (Start)
a(n) = 5*a(n-4)-10*a(n-8)+10*a(n-12)-5*a(n-16)+a(n-20) for n>20.
G.f.: x*(1+x+x^2+x^3-3*x^4-x^5+3*x^6+11*x^7+3*x^8-x^9-3*x^10+11*x^11-x^12+x^13-x^14+x^15) / ((1-x)^5*(1+x)^5*(1+x^2)^5).
(End)

A110009 n followed by n^4 followed by n^2 followed by n^3.

Original entry on oeis.org

1, 1, 1, 1, 2, 16, 4, 8, 3, 81, 9, 27, 4, 256, 16, 64, 5, 625, 25, 125, 6, 1296, 36, 216, 7, 2401, 49, 343, 8, 4096, 64, 512, 9, 6561, 81, 729, 10, 10000, 100, 1000, 11, 14641, 121, 1331, 12, 20736, 144, 1728, 13, 28561, 169, 2197, 14, 38416, 196, 2744, 15, 50625
Offset: 1

Views

Author

Mohammad K. Azarian, Sep 02 2005

Keywords

Crossrefs

Programs

  • Maple
    map(t -> (t,t^4,t^3,t^2), [$1..100]); # Robert Israel, Aug 15 2016
  • Mathematica
    Flatten[Table[{n,n^4,n^2,n^3},{n,20}]] (* or *) Flatten[ With[ {c=Range[20]}, Thread[{c,c^4,c^2,c^3}]]] (* Harvey P. Dale, Mar 28 2012 *)
  • PARI
    Vec(x*(1+x+x^2+x^3-3*x^4+11*x^5-x^6+3*x^7+3*x^8+11*x^9-x^10-3*x^11-x^12+x^13+x^14-x^15)/((1-x)^5*(1+x)^5*(1+x^2)^5) + O(x^60)) \\ Colin Barker, Aug 15 2016

Formula

a(n) = (2*n+3-(-1)^n+2*(-1)^((2*n-3-(-1)^n)/4))*(n^3+10*n^2+28*n+88+(n^3+10*n^2-4*n-72)*(-1)^n+(n^3+2*n^2-4*n+56)*(-1)^((2*n-3-(-1)^n)/4)-(n^3+2*n^2+28*n-40)*(-1)^((2*n-1+(-1)^n)/4))/2048. - Luce ETIENNE, Aug 15 2016
G.f.: x*(1+x+x^2+x^3-3*x^4+11*x^5-x^6+3*x^7+3*x^8+11*x^9-x^10-3*x^11-x^12+x^13+x^14-x^15) / ((1-x)^5*(1+x)^5*(1+x^2)^5). - Colin Barker, Aug 15 2016

A110622 n^2 followed by n followed by n^3 followed by n^4.

Original entry on oeis.org

1, 1, 1, 1, 4, 2, 8, 16, 9, 3, 27, 81, 16, 4, 64, 256, 25, 5, 125, 625, 36, 6, 216, 1296, 49, 7, 343, 2401, 64, 8, 512, 4096, 81, 9, 729, 6561, 100, 10, 1000, 10000, 121, 11, 1331, 14641, 144, 12, 1728, 20736, 169, 13, 2197, 28561, 196, 14, 2744, 38416, 225, 15
Offset: 1

Views

Author

Mohammad K. Azarian, Sep 14 2005

Keywords

Crossrefs

Programs

  • Magma
    &cat[[n^2, n, n^3, n^4]: n in [1..20]]; // Vincenzo Librandi, Nov 25 2012
    
  • Mathematica
    Flatten[Table[{n^2, n, n^3, n^4}, {n, 40}]] (* Vincenzo Librandi, Nov 25 2012 *)
  • PARI
    lista(nn) = for(n=1, nn, print1(n^2, ", ", n, ", ", n^3, ", "n^4, ", ")); \\ Jinyuan Wang, Feb 28 2020

Formula

a(n) = 5*a(n-4) - 10*a(n-8) + 10*a(n-12) - 5*a(n-16) + a(n-20).
G.f.: -x*(1 + x + x^2 + x^3 - x^4 - 3*x^5 + 3*x^6 + 11*x^7 - x^8 + 3*x^9 - 3*x^10 + 11*x^11 + x^12 - x^13 - x^14 + x^15) / ( (x-1)^5*(1+x)^5*(x^2+1)^5 ). - R. J. Mathar, Dec 20 2010
a(n) = (2*n + 3 - (-1)^n + 2*(-1)^((2*n + 5 - (-1)^n)/4))*(n^3 + 4*n^2 + 24*n + 116 + (n^3 - 4*n^2 - 24*n + 12)*(-1)^n - (n^3 + 4*n^2 - 8*n - 108)*(-1)^((2*n + 5 - (-1)^n)/4) + (n^3 - 4*n^2 + 8*n - 20)*(-1)^((2*n + 7 + (-1)^n)/4))/2048. - Luce ETIENNE, Sep 02 2016
Showing 1-10 of 24 results. Next