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.

User: Nicolay Avilov

Nicolay Avilov's wiki page.

Nicolay Avilov has authored 40 sequences. Here are the ten most recent ones:

A382973 a(n) = 4*n^3 - 6*n^2 + 6*n - 2 + (-1)^n.

Original entry on oeis.org

1, 19, 69, 183, 377, 683, 1117, 1711, 2481, 3459, 4661, 6119, 7849, 9883, 12237, 14943, 18017, 21491, 25381, 29719, 34521, 39819, 45629, 51983, 58897, 66403, 74517, 83271, 92681, 102779, 113581, 125119, 137409, 150483, 164357, 179063, 194617, 211051, 228381, 246639
Offset: 1

Author

Nicolay Avilov, Jun 02 2025

Keywords

Comments

a(n) is the number of 1 X 1 X 1 black cubes in a cube (2*n - 1) X (2*n - 1) X (2*n - 1), which is made up of 1 X 1 X 1 black cubes and 1 X 1 X 1 white cubes. In this case, any 1 X 1 X 1 cube is either completely black or completely white. The black and white cubes are arranged as follows: if the central cube has coordinates (0, 0, 0), then all cubes with coordinates (0, y, z), (x, 0, z) and (x, y, 0) are black. Then the cubes adjacent to the black ones are painted white so that a triangular layer with all white cubes is obtained. There will be eight such layers. In the next step, all cubes adjacent to the white ones are painted black so that a triangular layer of black cubes is formed, and so on, alternating layers of black cubes and layers of white cubes until all the cubes are painted (see the link "Illustration of coloring a cube").

Examples

			a(2) = 3^3 - 8*1 = 19;
a(3) = 5^3 - 8*7 = 69.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3, -2, -2, 3, -1}, {1, 19, 69, 183, 377}, 20] (* Hugo Pfoertner, Jun 12 2025 *)

Formula

a(n) = (2n - 1)^3 - 8*A011934(n-1).
G.f.: x*(1 + 16*x + 14*x^2 + 16*x^3 + x^4)/((1 - x)^4*(1 + x)). - Stefano Spezia, Jun 12 2025

A383585 Number of vertices of even degree in a cubic lattice n X n X n.

Original entry on oeis.org

0, 0, 13, 32, 63, 112, 185, 288, 427, 608, 837, 1120, 1463, 1872, 2353, 2912, 3555, 4288, 5117, 6048, 7087, 8240, 9513, 10912, 12443, 14112, 15925, 17888, 20007, 22288, 24737, 27360, 30163, 33152, 36333, 39712, 43295, 47088, 51097, 55328, 59787, 64480, 69413, 74592, 80023, 85712, 91665, 97888
Offset: 1

Author

Nicolay Avilov, May 01 2025

Keywords

Comments

An n X n X n cubic lattice is a graph with n^3 vertices. All interior vertices of the n X n X n cubic lattice are vertices of even degree, and all interior edge vertices of the cube are also vertices of even degree, so the number of vertices of even degree in an n X n X n lattice is (n - 2)^3 + 12*(n - 2).

Examples

			a(4) = 2^3 + 12*2 = 32;
a(5) = 3^3 + 12*3 = 63.
		

Crossrefs

Cf. A000578.

Programs

  • Mathematica
    a[n_] := n^3 - 6*n^2 + 24*n - 32; a[1] = 0; Array[a, 48] (* Amiram Eldar, May 13 2025 *)

Formula

a(n) = n^3 - 6*n^2 + 24*n - 32 for n >= 2.
From Chai Wah Wu, May 19 2025: (Start)
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n > 5.
G.f.: x^3*(13*x^2 - 20*x + 13)/(x - 1)^4. (End)

A381380 Decimal expansion of the area of a ruled surface formed by moving a segment of length sqrt(6), the ends of which lie on the diagonals of opposite faces of a unit cube oriented at right angles to each other.

Original entry on oeis.org

2, 7, 2, 7, 0, 5, 4, 7, 7, 3, 8, 1, 2, 0, 4, 8, 9, 8, 8, 4, 3, 5, 1, 5, 5, 6, 7, 9, 0, 2, 0, 2, 5, 9, 8, 4, 2, 8, 3, 4, 6, 4, 7, 7, 1, 9, 9, 0, 3, 1, 3, 8, 7, 4, 0, 0, 3, 1, 0, 7, 1, 1, 8, 9, 3, 9, 5, 3, 9, 5, 1, 4, 0, 1, 3, 6, 7, 1, 4, 8, 4, 8, 4, 4, 9, 4, 0, 4, 0, 1, 1
Offset: 1

Author

Nicolay Avilov, Feb 22 2025

Keywords

Comments

A segment of constant length continuously sliding its endpoints along two intersecting straight lines defines a ruled surface -- a linoid. Here we consider a linoid defined by a segment of length sqrt(6)/2 sliding along two intersecting diagonals of opposite faces of a cube with edge 1. The surface of a linoid is given by the equation 2*x^2/(z - 1/2)^2 + 2*y^2/(z + 1/2)^2 = 1.
The surface of a linoid consists of four congruent surfaces. The area of one of them is calculated using integrals and multiplied by 4.
The name of the figure "linoid" was introduced by the author in the related article, see link.

Examples

			2.72705477381204898843515567902...
		

Formula

Equals sqrt(2)*Integral_{t=0..Pi/2} Integral_{z=0..1/2} sqrt(5 + 24*z^2 + 24*z*cos(2*t) + cos(4*t)) dz dt.

Extensions

Terms corrected by Jinyuan Wang, Feb 23 2025

A380371 a(n) is the integer part of the area of a rhombus with side n and angle n degrees.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 3, 5, 8, 12, 17, 23, 29, 38, 47, 58, 70, 84, 100, 117, 136, 158, 181, 206, 234, 264, 296, 330, 368, 407, 450, 494, 542, 593, 646, 702, 761, 823, 889, 957, 1028, 1102, 1180, 1261, 1344, 1431, 1522, 1615, 1712, 1812, 1915, 2021, 2130, 2243, 2359
Offset: 0

Author

Nicolay Avilov, Jan 23 2025

Keywords

Comments

The angle n ranges 0 to 180 inclusive.
Terms increase to a maximum 12951 at n = 131 and then decrease.

Examples

			a(30) = 30*30*sin(30 degrees) = 450.
a(90) = 8100 is the area of a square with a side of 90.
		

Formula

a(n) = floor(n^2*sin(Pi*n/180)).

A379747 The number of Hamiltonian cycles with rotational symmetry of order 3 on the triangular grid, n vertices on each side.

Original entry on oeis.org

0, 1, 1, 0, 2, 6, 0, 52, 270, 0, 17130, 189154, 0, 51417622
Offset: 1

Author

Nicolay Avilov, Jan 01 2025

Keywords

Comments

If n = 3*k + 1, then the triangular grid has a central node, so for such n there are no Hamiltonian cycles and a(n) = 0.

Examples

			a(3) = 1, the only Hamiltonian cycle being the obvious one running around the edge of the triangle;
a(4) = 0 because there are no Hamiltonian cycles;
a(5) = 2 because there are exactly two Hamiltonian cycles.
		

Crossrefs

Cf. A112676.

Extensions

a(9)-a(10) from Andrey Zabolotskiy, Jan 02 2025
a(11)-a(13) from Talmon Silver, Jan 04 2025
a(14) from Talmon Silver, Jan 06 2025

A375209 Number of simple symmetric Hamiltonian paths connecting opposite corners of a 2n+1 X 2n+1 grid.

Original entry on oeis.org

1, 2, 16, 564, 93866, 72054120, 260324223938, 4400423201461008, 349815282628284276844, 130501147375292529852604266, 228964256366276749773274186140858
Offset: 0

Author

Nicolay Avilov, Oct 16 2024

Keywords

Examples

			a(2) = 16, see link "Illustration".
		

Crossrefs

Formula

a(n) = 2*A331001(2*n + 1) for n > 0. - Andrew Howroyd, Oct 16 2024

Extensions

Thanks to Suleiman Makarenko.
a(5)-a(10) from Andrew Howroyd, Oct 16 2024

A374296 a(n) is the integer part of the area of a regular n-gon whose side lengths are n.

Original entry on oeis.org

3, 16, 43, 93, 178, 309, 500, 769, 1133, 1612, 2228, 3005, 3969, 5147, 6570, 8268, 10275, 12627, 15360, 18514, 22130, 26250, 30921, 36187, 42099, 48707, 56063, 64221, 73239, 83174, 94087, 106039, 119095, 133320, 148782, 165551, 183699, 203299
Offset: 3

Author

Nicolay Avilov, Jul 03 2024

Keywords

Examples

			Areas of polygons (starting from n=3):
  3.897... (equilateral triangle), so a(3) = 3,
 16.000... (square), so a(4) = 16,
 43.011... (pentagon), so a(5) = 43,
 93.530... (hexagon), so a(6) = 93,
178.061... (heptagon), so a(7) = 178.
		

Crossrefs

Cf. A064313.

Formula

a(n) = floor(n^3/(4*tan(Pi/n))).
a(n) = n^4/(4*Pi) - (Pi/12)*n^2 + O(1). - Charles R Greathouse IV, Jul 03 2024

A373584 a(n) is equal to the number of shaded cells in a regular hexagon with side n drawn on a hexagonal grid.

Original entry on oeis.org

1, 7, 13, 19, 31, 49, 67, 85, 109, 139, 169, 199, 235, 277, 319, 361, 409, 463, 517, 571, 631, 697, 763, 829, 901, 979, 1057, 1135, 1219, 1309, 1399, 1489, 1585, 1687, 1789, 1891, 1999, 2113, 2227, 2341, 2461, 2587, 2713, 2839, 2971, 3109, 3247, 3385, 3529
Offset: 1

Author

Nicolay Avilov, Jun 10 2024

Keywords

Comments

On a hexagonal grid, cells are colored as follows: one cell and all those located along three straight lines passing through the center of the original cell and forming six 60° angles between each other are painted. In each of these corners, cells are painted over so that a V-shaped arrangement of cells repeats ad infinitum. The number of shaded cells in regular hexagons centered on the starting cell determines the sequence a(n).

Examples

			a(3) = 19 - 6*1 = 13;
a(4) = 37 - 6*3 = 19.
                                                   o . o . o
                                 o . . o          . o . . o .
                   o . o        . o . o .        o . o . o . o
         o o      . o o .      . . o o . .      . . . o o . . .
   o    o o o    o o o o o    o o o o o o o    o o o o o o o o o
         o o      . o o .      . . o o . .      . . . o o . . .
                   o . o        . o . o .        o . o . o . o
                                 o . . o          . o . . o .
                                                   o . o . o
   1      7         13             19                 31
		

Crossrefs

Programs

  • Mathematica
    Table[6*Ceiling[n*(n - 1)/4] + 1, {n, 100}] (* Paolo Xausa, Jul 01 2024 *)

Formula

a(n+4) = a(n) + 12*n + 18.
a(n) = 6*ceiling(n*(n - 1)/4) + 1.
a(n) = A003215(n) - 6*A011848(n+1).
a(n) = 6*A054925(n) + 1.
G.f.: (1 + 4*x - 4*x^2 + 4*x^3 + x^4)/((1 - x)^3*(1 + x^2)). - Stefano Spezia, Jun 11 2024
E.g.f.: (exp(x)*(5 + 6*x + 3*x^2) - 3*cos(x) + 3*sin(x))/2. - Stefano Spezia, Aug 31 2025

A372630 Numbers k with property that there exists an m>k such that the sum of the natural numbers from k^2 to m^2 inclusive is a square number.

Original entry on oeis.org

1, 3, 8, 11, 12, 14, 17, 23, 30, 33, 35, 37, 41, 48, 59, 60, 65, 68, 77, 79, 82, 84, 89, 93, 94, 99
Offset: 1

Author

Nicolay Avilov, May 07 2024

Keywords

Examples

			The number 3 is a member of the sequence because the sum of all natural numbers from 3^2 to 4^2 inclusive is 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 = 100, with 100 = 10^2.
		

Crossrefs

Programs

  • PARI
    check(k, mm=100) = my(d=2*k^2-1, v=List([]), x, y, z); for(t=d+1, 17*d, if(issquare((t^2-d^2)/2), listput(v, t))); if(v[#v\2] != 3*d, return(-1)); for(i=1, #v\2, x=v[i]; y=v[i+#v\2]; for(j=1, mm, if(issquare((x-1)/2) && x>d+2, return(1)); z=6*y-x; x=y; y=z)); 0; \\ Jinyuan Wang, Jul 06 2024; just for checking

A372631 Numbers m for which there exists some k < m where the sum of the natural numbers from k^2 to m^2 inclusive is a square.

Original entry on oeis.org

4, 5, 7, 12, 15, 19, 29, 34, 41, 47, 55, 56, 65, 71, 73, 80, 84, 98, 111, 119, 124, 126, 141, 158, 165, 169, 175, 191, 209, 231, 239, 253, 260, 265, 287, 322, 335, 345, 352, 359, 369, 376, 403, 408, 425, 436, 444, 463, 465, 491, 505, 532, 542, 548, 587, 620
Offset: 1

Author

Nicolay Avilov, May 07 2024

Keywords

Examples

			4 is a term because the sum of all natural numbers from 3^2 to 4^2 inclusive is 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 = 100 = 10^2.
		

Crossrefs

Programs

  • Mathematica
    a={}; For[m=1, m<=620, m++, flag=0; tot=m^2*(m^2+1)/2; For[k=1, kStefano Spezia, May 11 2024  after Michael S. Branicky, May 10 2024 *)
  • Python
    from math import isqrt
    def ok(m):
        tot = m**2*(m**2+1)//2
        for k in range(1, m):
            skm = tot - k**2*(k**2-1)//2
            if isqrt(skm)**2 == skm:
                return True
        return False
    print([m for m in range(621) if ok(m)]) # Michael S. Branicky, May 10 2024
    
  • Python
    from itertools import count, islice
    from sympy.abc import x,y
    from sympy.ntheory.primetest import is_square
    from sympy.solvers.diophantine.diophantine import diop_quadratic
    def A372631_gen(startvalue=2): # generator of terms >= startvalue
        for m in count(max(startvalue,2)):
            m2 = m**2
            for k in diop_quadratic(m2*(m2+1)-x*(x-1)-2*y**2):
                if (r:=int(k[0]))A372631_list = list(islice(A372631_gen(),56)) # Chai Wah Wu, May 13 2024