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.

Previous Showing 21-29 of 29 results.

A188947 a(n) = n^3 - 2*n^2 + 2*n + 1.

Original entry on oeis.org

2, 5, 16, 41, 86, 157, 260, 401, 586, 821, 1112, 1465, 1886, 2381, 2956, 3617, 4370, 5221, 6176, 7241, 8422, 9725, 11156, 12721, 14426, 16277, 18280, 20441, 22766, 25261, 27932, 30785, 33826, 37061, 40496, 44137, 47990, 52061, 56356, 60881, 65642, 70645
Offset: 1

Views

Author

Adeniji, Adenike, Apr 14 2011

Keywords

Comments

The original definition was "Identity difference partial one - one transformation semigroup is a semigroup having the property that the difference between max im(alpha) and min im(alpha) is not greater than 1. This is denoted by S = IDI_n for each n." [Needs editing.]
For all n >= 3, a(n) expressed in base n has the three digits n-2, 2, and 1; for example, a(16) in hexadecimal is "E21". For all n >= 3, a(n+1) expressed in base n is "1112". For all n >= 7, a(n+2) expressed in base n is "1465". - Mathew Englander, Jan 07 2021

Crossrefs

Cf. A027444, A053698, A056106 (first differences), A060354, A162607, A188377, A188716.

Programs

Formula

a(n) = (n+1) + n*(n-1)^2 = n^3 - 2*n^2 + 2*n + 1 = 1 + A053698(n-1).
G.f.: ( -x*(-2 + 3*x - 8*x^2 + x^3) ) / ( (x-1)^4 ). - R. J. Mathar, Apr 14 2011
a(n) = A060354(n) + A162607(n+1). - Lechoslaw Ratajczak, Sep 24 2020
E.g.f.: exp(x)*(1 + x)*(1 + x^2) - 1. - Stefano Spezia, Apr 10 2022

Extensions

Edited by N. J. A. Sloane, Apr 23 2011

A251599 Centers of rows of the triangular array formed by the natural numbers.

Original entry on oeis.org

1, 2, 3, 5, 8, 9, 13, 18, 19, 25, 32, 33, 41, 50, 51, 61, 72, 73, 85, 98, 99, 113, 128, 129, 145, 162, 163, 181, 200, 201, 221, 242, 243, 265, 288, 289, 313, 338, 339, 365, 392, 393, 421, 450, 451, 481, 512, 513, 545, 578, 579, 613, 648, 649, 685, 722, 723
Offset: 1

Views

Author

Dave Durgin, Dec 05 2014

Keywords

Comments

Forms a cascade of 3-number triangles down the center of the triangle array. Related to A000124 (left/west bank of same triangular array), A000217 (right/east bank) and A001844 (center column).
Sums of the mentioned cascading triangles: a(3*n-2) + a(3*n-1) + a(3*n) = A058331(n) + A001105(n) + A001844(n-1) = 2*A056106(n) = 2*(3*n^2-n+1). - Reinhard Zumkeller, Dec 13 2014
Union of A080827 and A000982. - David James Sycamore, Aug 09 2018

Examples

			First ten terms (1,2,3,5,8,9,13,18,19,25) may be read down the center of the triangular formation:
               1
             2   3
           4   5   6
         7   8   9  10
      11  12  13  14  15
    16  17  18  19  20  21
  22  23  24  25  26  27  28
		

Crossrefs

Cf. A092942 (first differences).

Programs

  • Haskell
    a251599 n = a251599_list !! (n-1)
    a251599_list = f 0 $ g 1 [1..] where
       f i (us:vs:wss) = [head $ drop i us] ++ (take 2 $ drop i vs) ++
                         f (i + 1) wss
       g k zs = ys : g (k + 1) xs where (ys,xs) = splitAt k zs
    -- Reinhard Zumkeller, Dec 12 2014
    
  • Maple
    a:= n-> (m-> 2*(m+1)^2-[2*m+1, 0, -1][1+r])(iquo(n-1, 3, 'r')):
    seq(a(n), n=1..100);  # Alois P. Heinz, Dec 10 2014
  • Mathematica
    LinearRecurrence[{1, 0, 2, -2, 0, -1, 1}, {1, 2, 3, 5, 8, 9, 13}, 60] (* Jean-François Alcover, Jan 09 2016 *)
  • PARI
    Vec(-x*(x^2+1)*(x^4-x^3+x+1)/((x^2+x+1)^2*(x-1)^3) + O(x^80)) \\ Michel Marcus, Jan 09 2016

Formula

Terms for n=1 (mod 3): 2m^2+2m+1, for n=2 (mod 3): 2m^2+4m+2, for n=0 (mod 3): 2m^2+4m+3, where m = floor((n-1)/3).
G.f.: -x*(x^2+1)*(x^4-x^3+x+1)/((x^2+x+1)^2*(x-1)^3). - Alois P. Heinz, Dec 10 2014

A185877 Array T given by T(n,k) = k^2 +(2*n-3)*k -2*n +3, by antidiagonals.

Original entry on oeis.org

1, 3, 1, 7, 5, 1, 13, 11, 7, 1, 21, 19, 15, 9, 1, 31, 29, 25, 19, 11, 1, 43, 41, 37, 31, 23, 13, 1, 57, 55, 51, 45, 37, 27, 15, 1, 73, 71, 67, 61, 53, 43, 31, 17, 1, 91, 89, 85, 79, 71, 61, 49, 35, 19, 1, 111, 109, 105, 99, 91, 81, 69, 55, 39, 21, 1, 133, 131, 127, 121, 113, 103, 91, 77, 61, 43, 23, 1, 157, 155, 151, 145, 137, 127, 115, 101, 85, 67, 47, 25, 1, 183, 181, 177, 171, 163, 153, 141, 127, 111, 93, 73, 51, 27, 1
Offset: 1

Views

Author

Clark Kimberling, Feb 05 2011

Keywords

Comments

A member of the accumulation chain ... < A185879 < A185877 < A185878 < A185880 < ... (See A144112 for the definition of accumulation array).

Examples

			Northwest corner:
  1, 3,  7, 13, 21
  1, 5, 11, 19, 29
  1, 7, 15, 25, 45
  1, 9, 19, 31, 45
		

Crossrefs

Row 1 to 3: A002061, A028387, A082111.
diag (1,5,...): A056108;
diag (3,11,...): A056106;
diag (7,19,...): A003215;
diag (13,29,...): A144391;
diag (1,7,...): A003215;
diag (1,9,...): A144390.

Programs

  • Mathematica
    (* This program generates A185877, its accumulation array A185878, and its weight array A185879. *)
    f[n_,0]:=0;f[0,k_]:=0;
    f[n_,k_]:=k^2+(2n-3)k-2n+3;
    TableForm[Table[f[n,k],{n,1,10},{k,1,15}]] (* A185877 *)
    Table[f[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten
    s[n_,k_]:=Sum[f[i,j],{i,1,n},{j,1,k}]; (* accumulation array of {f(n,k)} *)
    FullSimplify[s[n,k]]  (* formula for A185878 *)
    TableForm[Table[s[n,k],{n,1,10},{k,1,15}]]
    Table[s[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten
    w[m_,n_]:=f[m,n]+f[m-1,n-1]-f[m,n-1]-f[m-1,n]/;Or[m>0,n>0];
    TableForm[Table[w[n,k],{n,1,10},{k,1,15}]] (* A185879 *)
    Table[w[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten

Formula

T(n,k) = k^2 + (2*n-3)*k - 2*n + 3, k>=1, n>=1.

A185880 Second accumulation array of A185877, by antidiagonals.

Original entry on oeis.org

1, 5, 3, 16, 17, 6, 40, 56, 38, 10, 85, 140, 128, 70, 15, 161, 295, 320, 240, 115, 21, 280, 553, 670, 600, 400, 175, 28, 456, 952, 1246, 1250, 1000, 616, 252, 36, 705, 1536, 2128, 2310, 2075, 1540, 896, 348, 45, 1045, 2355, 3408, 3920, 3815, 3185, 2240, 1248, 465, 55, 1496, 3465, 5190, 6240, 6440, 5831, 4620, 3120, 1680, 605, 66, 2080, 4928, 7590, 9450, 10200, 9800, 8428, 6420, 4200, 2200
Offset: 1

Views

Author

Clark Kimberling, Feb 05 2011

Keywords

Comments

A member of the accumulation chain ... < A185879 < A185877 < A185878 < A185880 < ... See A144112 for the definition of accumulation array.

Examples

			Northwest corner:
   1,    5,   16,   40,   85
   3,   17,   56,  140,  295
   6,   38,  128,  320,  670
  10,   70,  240,  600, 1250
		

Crossrefs

Antidiagonal sums: A037235.
diag (1,5,...): A056108 (4th spoke on hexagonal wheel);
diag (3,11,...): A056106 (2nd spoke on hexagonal wheel);
diag (7,19,...): A003215 (hex numbers);
diag (13,29,...): A144391.

Programs

  • Mathematica
    (* This program generates A185878 first and then generates A185880 as the accumulation array of A185878. *)
    f[n_,k_]:=(k*n/6)(7-3k+2k^2-3n+3kn);
    TableForm[Table[f[n,k],{n,1,10},{k,1,15}]] (* A185878 *)
    Table[f[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten
    s[n_,k_]:=Sum[f[i,j],{i,1,n},{j,1,k}];
    FullSimplify[s[n,k]]
    TableForm[Table[s[n,k],{n,1,10},{k,1,15}]] (* A185880 *)
    f[n_, k_] := (1/72)*k*(1 + k)*n*(1 + n)*(16 - k + 3 *k^2 + 4 *(-1 + k) *n); Table[f[n - k + 1, k], {n, 10}, {k, n, 1, -1}] // Flatten (* G. C. Greubel, Jul 21 2017 *)

Formula

T(n,k) = C(k,2)*C(n,2)*(3*k^2+4*k*n-k-4*n+16)/18, k>=1, n>=1.

A113653 Isolated semiprimes in the hexagonal spiral.

Original entry on oeis.org

6, 51, 69, 82, 91, 183, 194, 221, 249, 265, 287, 289, 309, 314, 319, 323, 355, 371, 403, 417, 437, 469, 478, 511, 517, 519, 533, 579, 589, 649, 681, 689, 731, 749, 758, 807, 838, 849, 926, 943, 951, 961, 965, 979, 1011, 1018, 1037, 1055, 1057, 1067, 1077, 1099, 1126, 1145, 1149, 1154, 1159
Offset: 1

Views

Author

Jonathan Vos Post, Jan 16 2006

Keywords

Comments

Isolated semiprimes in the hexagonal spiral of A003215 and A001399, which is centered on 0. Of course such a spiral can be constructed beginning with any integer. Centering on 0 gives the interesting partition and multigraph equalities of A001399.
Integers in A001358 which are not adjacent in any of six directions to any other integer in A001358 when arranged in the hexagonal spiral.
An analog of A113688 "Isolated semiprimes in the [square] spiral," and of the hexagonal prime spiral of [Abbott 2005; Weisstein, "Prime Spiral", MathWorld].
Unfortunately the original submission (which has been preserved as the "dead" sequence A335704) omitted the number 44 from the spiral, which has caused an enormous amount of trouble. - N. J. A. Sloane, Jun 27 2020

Examples

			The spiral begins:
                120-119-118-117-116-115-114
                 /                         \
              121  85--84--83-*82*-81--80 113
               /   /                     \   \
            122  86  56--55--54--53--52  79 112
             /   /   /                 \   \   \
          123  87  57  33--32--31--30 *51* 78 111
           /   /   /   /             \   \   \   \
        124  88  58  34  16--15--14  29  50  77 110
         /   /   /   /   /         \   \   \   \   \
      125  89  59  35  17   5---4  13  28  49  76 109
       /   /   /   /   /   /     \   \   \   \   \   \
    126  90  60  36  18  *6*  0   3  12  27  48  75 108
     /   /   /   /   /   /   /   /   /   /   /   /   /
  127 *91* 61  37  19   7   1---2  11  26  47  74 107 146
     \   \   \   \   \   \         /   /   /   /   /   /
    128  92  62  38  20   8---9--10  25  46  73 106 145
       \   \   \   \   \             /   /   /   /   /
      129  93  63  39  21--22--23--24  45  72 105 144
         \   \   \   \                 /   /   /   /
        130  94  64  40--41--42--43--44  71 104 143
           \   \   \                     /   /   /
          131  95  65--66--67--68-*69*-70 103 142
             \   \                         /   /
            132  96--97--98--99-100-101-102 141
               \                             /
              133-134-135-136-137-138-139-140
		

References

  • Abbott, P. (Ed.). "Mathematica One-Liners: Spiral on an Integer Lattice." Mathematica J. 1, 39, 1990.

Crossrefs

For the sequence of isolated primes see A335916.
Related sequences:
A113519 Semiprimes in 1st spoke of a hexagonal spiral starting at 1 (A056105).
A113524 Semiprimes in 2nd spoke of a hexagonal spiral (A056106).
A113525 Semiprimes in 3rd spoke of a hexagonal spiral (A056107).
A113527 Semiprimes in 4th spoke of a hexagonal spiral (A056108).
A113528 Semiprimes in 5th spoke of a hexagonal spiral (A056109).
A113530 Semiprimes in 6th spoke of a hexagonal spiral (A003215).

Extensions

Corrected and edited by N. J. A. Sloane, Jun 27 2020. Thanks to Jeffrey K. Aronson for pointing out the error in the original submission.
Terms a(4) onwards corrected by R. J. Mathar, Jun 29 2020

A362007 Fourth Lie-Betti number of a path graph on n vertices.

Original entry on oeis.org

0, 0, 3, 16, 48, 107, 203, 347, 551, 828, 1192, 1658, 2242, 2961, 3833, 4877, 6113, 7562, 9246, 11188, 13412, 15943, 18807, 22031, 25643, 29672, 34148, 39102, 44566, 50573, 57157, 64353, 72197, 80726, 89978, 99992, 110808
Offset: 1

Views

Author

Samuel J. Bevins, Apr 05 2023

Keywords

Comments

Sequence T(n,4) in A360571.

Crossrefs

Cf. A360571 (path graph triangle), A088459 (second Lie-Betti number of path graphs), A361230.

Programs

  • Python
    def A362007(n):
        values = [0,0,3]
        for i in range(4, n+1):
            result = (i**4 + 18*i**3 - 97*i**2 + 174*i - 168)/24
            values.append(int(result))
        return values

Formula

a(1) = a(2) = 0, a(3) = 3, a(n) = (n^4 + 18*n^3 - 97*n^2 + 174*n - 168)/24 for n >= 4.
a(n) = A011379(n-3) + A006002(n-4) + A001105(n-3) + A056106(n-2) + A000027(n-3) + A000332(n-3) + A000217(n-5) + A000027(n-4) for n >= 5.
From Stefano Spezia, Mar 02 2025: (Start)
G.f.: x^2*(3 + x - 2*x^2 - 3*x^3 + 3*x^4 - x^5)/(1 - x)^5.
E.g.f.: (12*(6 + 4*x + x^2) - exp(x)*(72 - 24*x - 36*x^2 - 28*x^3 - x^4))/24. (End)

Extensions

a(34) and Python program corrected by Robert C. Lyons, Apr 17 2023

A275673 List of numbers that are in a spoke of a hexagonal spiral.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 15, 17, 19, 22, 25, 28, 31, 34, 37, 41, 45, 49, 53, 57, 61, 66, 71, 76, 81, 86, 91, 97, 103, 109, 115, 121, 127, 134, 141, 148, 155, 162, 169, 177, 185, 193, 201, 209, 217, 226, 235, 244, 253, 262, 271, 281, 291, 301, 311, 321
Offset: 1

Views

Author

Peter Kagey, Aug 04 2016

Keywords

Comments

This sequence contains k if and only if k is in one of the following sequences: A056105, A056106, A056107, A056108, A056109, A003215.
Alternatively, this sequence consists of the numbers of the form 3k^2 + bk + 1 for nonnegative k and -2 <= b <= 3.

Crossrefs

Programs

  • Haskell
    a275673 n = a275673_list !! (n - 1)
    a275673_list = scanl (+) 1 $ concatMap (replicate 6) [1..]

Formula

Conjectures from Colin Barker, Aug 05 2016: (Start)
a(n) = 2*a(n-1)-a(n-2)+a(n-6)-2*a(n-7)+a(n-8) for n>8.
G.f.: x*(1-x^6+x^7) / ((1-x)^3*(1+x)*(1-x+x^2)*(1+x+x^2)).
(End)
Conjecture: a(n) = (n+4-3*floor((n+4)/6)-2)*floor((n+4)/6)+1. - Luce ETIENNE, May 25 2017

A329482 Interleave 1 - n + 3*n^2, 1 + 3*n*(1+n) for n >= 0.

Original entry on oeis.org

1, 1, 3, 7, 11, 19, 25, 37, 45, 61, 71, 91, 103, 127, 141, 169, 185, 217, 235, 271, 291, 331, 353, 397, 421, 469, 495, 547, 575, 631, 661, 721, 753, 817, 851, 919, 955, 1027, 1065, 1141, 1181, 1261
Offset: 0

Views

Author

Paul Curtz, Nov 14 2019

Keywords

Comments

a(n+1) - 2*a(n) = -1, 1, 1, -3, -3, -13, -13, -29, -29, ...
Hexagonal spiral for A000265:
.
17--35---9--37
/
33 17---9--19---5
/ / \
1 1 3---7---1 21
/ / / \ \
31 15 5 1---1 9 11
\ \ \ / / /
15 7 1---3 5 23
\ \ / /
29 13---3--11 3
\ /
7--27--13--25
.
The two sequences are perpendicular.
a(n+1) - a(n) = 0, 2, 4, 4, 8, 6, 12, ... = 2*A029578(n+2).
A003215 is a bisection of 1, 1, 13, 7, 49, 19, 109, 37, ... .

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1, 2, -2, -1, 1}, {1, 1, 3, 7, 11}, 42] (* Amiram Eldar, Nov 23 2019 *)
    Module[{nn=20,a,b},a=Table[1-n+3 n^2,{n,0,nn}];b=Table[1+3n(1+n),{n,0,nn}];Riffle[a,b]] (* Harvey P. Dale, Apr 30 2023 *)
  • PARI
    Vec((1 + 4*x^3 + x^4) / ((1 - x)^3*(1 + x)^2) + O(x^40)) \\ Colin Barker, Nov 15 2019

Formula

From Colin Barker, Nov 14 2019: (Start)
G.f.: (1 + 4*x^3 + x^4) / ((1 - x)^3*(1 + x)^2).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 4.
a(n) = (5 + 3*(-1)^n - 2*(1 + (-1)^n)*n + 6*n^2) / 8.
(End)
E.g.f.: (1/8)*exp(-x)*(3 + 2*x + exp(2*x)*(5 + 4*x + 6*x^2)). - Stefano Spezia, Nov 14 2019 after Colin Barker
a(-n) = 1, 1, 5, 7, 15, 19, ... = interleave 1 + n + 3*n^2, 1 + 3*n*(1+n), both in the spiral.

A335704 Erroneous version of A113653.

Original entry on oeis.org

6, 51, 55, 69, 82, 183, 194, 249, 259, 287, 309, 314, 319
Offset: 1

Views

Author

Keywords

Comments

This is the erroneous version of A113653 that was submitted to the OEIS by Jonathan Vos Post on Jan 16 2006. Because 44 was omitted from the spiral, not only are the terms here incorrect, but a large number of other sequences will also need to be corrected. For this reason the whole of the original submission has been preserved here with a different A-number. - N. J. A. Sloane, Jun 27 2020
Isolated semiprimes in the hexagonal spiral, embedded in the triangular lattice, are the analogy to A113688 "Isolated semiprimes in the [square] spiral," as well as analogous in another way to the hexagonal prime spiral of [Abbott 2005; Weisstein, "Prime Spiral", MathWorld]. A113519 Semiprimes in first spoke of a hexagonal spiral (A056105). A113524 Semiprimes in second spoke of a hexagonal spiral (A056106). A113525 Semiprimes in third spoke of a hexagonal spiral (A056107). A113527 Semiprimes in fourth spoke of a hexagonal spiral (A056108). A113528 Semiprimes in fifth spoke of a hexagonal spiral (A056109). A113530 Semiprimes in sixth spoke of a hexagonal spiral (A003215). This is embedded in the hexagonal spiral of A003215 and A001399, which is centered on zero; of course such a spiral can be constructed beginning with any integer. Centering on zero gives the interesting partition and multigraph equalities of A001399.

Examples

			Copy this as proportionally spaced text, make semiprimes bold, draw boundaries around clumps of adjacent semiprimes. For example, there is a triangular clump of three semiprimes: {4, 14, 15}; a linear clump of three semiprimes {49, 77, 111}; a linear clump of two semiprimes {247, 305}; an irregular clump of seven {115, 155, 201, 202, 203, 253, 254}; a clump of eighteen whose least element is 33 and greatest is 206; and a long branching clump of sixteen whose least element is 9 and greatest is 129.
.................209.208.207.206.205.204.203.202.201
................210.162.161.160.159.158.157.156.155.200
..............211.163.121.120.119.118.117.116.115.154.199
............212.164.122.86..85..84..83..82..81.114.153.198
..........213.165.123.87..57..56..55..54..53..80.113.152.197
........214.166.124.88..58..33..32..31..30..52..79.112.151.196
......215.167.125.89..59..34..16..15..14..29..51..78.111.150.195
....216.168.126.90..60..35..17..5...4...13..28..50..77.110.149.194
..217.169.127.91..61..36..18..6...0...3...12..27..49..76.109.148.193
218.170.128.92..62..37..19..7...1...2...11..26..48..75.108.147.192.243
..219.171.129.93..63..38..20..8...9...10..25..47..74.107.146.191.242
....220.172.130.94..64..39..21..22..23..24..46..73.106.145.190.241
......221.173.131.95..65..40..41..42..43..45..72.105.144.189.240
........222.174.132.96..66..67..68..69..70..71.104.143.188.239
..........223.175.133.97..98..99.100.101.102.103.142.187.238
............224.176.134.135.136.137.138.139.140.141.186.237
..............225.177.178.179.180.181.182.183.184.185.236
................226.227.228.229.230.231.232.233.234.235
		

References

  • Abbott, P. (Ed.). "Mathematica One-Liners: Spiral on an Integer Lattice." Mathematica J. 1, 39, 1990.

Crossrefs

Formula

{a(n)} = {integers in A001358 which are not adjacent in any of six directions to any other integers in A001358 when arranged as the hexagonal spiral of A003215}.
Previous Showing 21-29 of 29 results.