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: Alexander M. Domashenko

Alexander M. Domashenko's wiki page.

Alexander M. Domashenko has authored 9 sequences.

A381159 Numbers whose prime divisors all end in the same digit.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 39, 41, 43, 47, 49, 53, 59, 61, 64, 67, 69, 71, 73, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 117, 119, 121, 125, 127, 128, 129, 131, 137, 139, 149, 151, 157, 159, 163, 167, 169, 173, 179
Offset: 1

Author

Keywords

Comments

51st All-Russian Mathematical Olympiad for Schoolchildren. Problem. Let us call a natural number "lopsided" if it is greater than 1 and all its prime divisors end with the same digit. Is there an increasing arithmetic progression with a difference not exceeding 2025, consisting of 150 natural numbers, each of which is "lopsided"? (A. Chironov)
All powers of primes (A000961) are terms.

Examples

			16, 69, 117 are included in the sequence because 16 = 2*2*2*2, 69 = 3*23, 117 = 3*3*13.
		

Crossrefs

Union of A004618 (9), A004618 (3), A090652 (7), A004615 (1), A000351 (5), and A000079 (2).
Union of A000961 and A380758.

Programs

  • Maple
    q:= n-> nops(map(p-> irem(p, 10), numtheory[factorset](n)))<2:
    select(q, [$1..250])[];  # Alois P. Heinz, Feb 15 2025
  • Mathematica
    q[n_] := SameQ @@ Mod[FactorInteger[n][[;; , 1]], 10]; Select[Range[2, 180], q] (* Amiram Eldar, Feb 16 2025 *)
  • PARI
    isok(k) = if (k==1, 1, my(f=factor(k)); #Set(vector(#f~, i, f[i, 1] % 10)) == 1); \\ Michel Marcus, Feb 16 2025
    
  • Python
    from sympy import factorint, isprime
    def ok(n): return n == 1 or isprime(n) or len(set(p%10 for p in factorint(n))) == 1
    print([k for k in range(1, 180) if ok(k)]) # Michael S. Branicky, Feb 16 2025

A374597 a(n) = floor(area) for the area of the largest square that can be inscribed in the n-th Pythagorean triangle, with one side of the square on the hypotenuse of the triangle, for Pythagorean triangles ordered first by increasing perimeter, then by shorter leg.

Original entry on oeis.org

2, 10, 11, 23, 24, 42, 28, 46, 65, 93, 94, 99, 75, 128, 52, 104, 168, 213, 112, 185, 223, 262, 269, 84, 318, 373, 156, 378, 290, 391, 444, 398, 252, 301, 515, 584, 209, 417, 591, 124, 673, 555, 621, 759, 632, 568, 839, 852, 269, 448, 949, 1038, 172, 742, 895, 1051, 679, 1077
Offset: 1

Author

Keywords

Comments

For a triangle with leg lengths x,y, the square has side length x*y*z/(x*y + z^2) and the area rounded down is a(n) = f(x,y,z) = floor((x*y*z/(x*y + z^2))^2) .

Examples

			The first Pythagorean triangle is (x,y,z) = (3,4,5) and the rounded area of the square inside it is a(1) = f(3,4,5) = floor((3*4*5/(3*4+5^2))^2) = 2.
		

Crossrefs

Cf. A376608.

A374596 Floor(area) for the area of the largest square which fits in each Pythagorean triangle, with sides of the square on the legs of the triangle, for Pythagorean triangles ordered first by increasing perimeter, then shorter leg, then longer leg.

Original entry on oeis.org

2, 11, 12, 26, 27, 47, 29, 49, 73, 104, 105, 108, 79, 144, 53, 112, 188, 238, 117, 199, 244, 293, 297, 86, 355, 419, 162, 423, 311, 431, 496, 435, 264, 319, 576, 656, 215, 448, 661, 126, 752, 601, 680, 849, 687, 610, 944, 952, 276, 469, 1060, 1166, 174, 797, 979
Offset: 1

Author

Keywords

Comments

For a triangle with leg lengths x,y, the square has side length x*y/(x+y) and the area rounded down is a(n) = f(x,y) = floor( (x*y/(x+y))^2 ).

Examples

			The first Pythagorean triangle is (x,y,z) = (3,4,5) and the rounded area of the square inside it is a(1) = f(3,4) = floor((3*4/(3+4))^2) = 2.
		

Crossrefs

Cf. A374597.

A370082 The number of square lattice nodes inside the n-th largest octagon with angles 3*Pi/4, along the perimeter of which there are only 8 lattice nodes - at the vertices of the octagon.

Original entry on oeis.org

4, 32, 88, 116, 172, 200, 256, 284, 368, 424, 452, 508, 592, 620, 676, 704, 760, 788, 872, 956, 1012, 1040, 1096, 1180, 1208, 1264, 1292, 1348, 1376, 1432, 1544, 1600, 1628, 1684, 1796, 1852, 1880, 1936, 1964, 2020, 2048, 2132, 2188, 2216, 2272, 2356, 2440, 2468, 2552, 2608, 2636
Offset: 1

Author

Keywords

Comments

The adjacent sides of an octagon are not equal, the ratio of the larger side to the smaller one is sqrt(2), its area is 7 times the square of the shorter side. Using Pick's formula N = S - V/2 + 1 we obtain N = S - 3 = 7*A004613(n) - 3.

Crossrefs

Cf. A004613.

Formula

a(n) = 7*A004613(n) - 3.

A360467 a(n) = Fibonacci(4*n+2) + 3*Fibonacci(2*n+1)^2.

Original entry on oeis.org

4, 20, 130, 884, 6052, 41474, 284260, 1948340, 13354114, 91530452, 627359044, 4299982850, 29472520900, 202007663444, 1384581123202, 9490060198964, 65045840269540, 445830821687810, 3055769911545124, 20944558559128052, 143556140002351234, 983948421457330580
Offset: 0

Author

Keywords

Comments

Values of x + 3*y in solutions of x^2 = 5*y^2 - 4*y in positive integers. In the solutions, the values of x and y are given by Fibonacci(4*n + 2) and Fibonacci(2*n + 1)^2 respectively.
The above Diophantine equation arises out of the following problem regarding the subdivision of a square into four triangles of integer area. For n >= 1, the sequence gives the areas of the squares in the solutions (see illustration in Links). Two lines are drawn from a corner of a square to points on the opposing sides. A third line is added between the two points so that the square is divided into four triangles. The area of each triangle is required to be an integer and those of the right triangles to form an arithmetic progression with difference 1. The smallest right triangle by area is the one formed by the third line. In the solutions, the area of the inner triangle is given by Fibonacci(4*n + 2) and the total area of the three right triangles is 3*Fibonacci(2*n + 1)^2. The area of the square is then equal to a(n).

Examples

			a(2) = F(4*2+2) + 3*F(2*2 +1)^2 = F(10) + 3*F(5)^2 = 55 + 3*5^2 = 130.
a(4) = F(4*4+2) + 3*F(2*4 +1)^2 = F(18) + 3*F(9)^2 = 2584+ 3*34^2 = 6052.
G.f. = 4 + 20*x + 130*x^2 + 884*x^3 + 6052*x^4 + ... - _Michael Somos_, Mar 02 2023
		

Crossrefs

Programs

  • Maple
    a := proc(n) option remember; if n < 3 then return [4, 20, 130][n + 1] fi;
    a(n-3) - 8 * (a(n-2) - a(n-1)) end: seq(a(n), n = 0..22); # Peter Luschny, Feb 17 2023
  • Mathematica
    LinearRecurrence[{8, -8, 1}, {4, 20, 130}, 22] (* Amiram Eldar, Feb 17 2023 *)
    a[ n_] := 2 * Fibonacci[2*n+1] * Fibonacci[2*n+3]; (* Michael Somos, Mar 02 2023 *)
  • PARI
    Vec(2*(2 - 6*x + x^2)/((1 - x)*(1 - 7*x + x^2)) + O(x^25)) \\ Andrew Howroyd, Feb 16 2023
    
  • SageMath
    print([2*(lucas_number2(n+1, 7, 1) + 3) // 5 for n in range(23)]) # Peter Luschny, Feb 17 2023

Formula

a(n) = A033890(n) + 3*A081068(n)^2.
a(n) = Fibonacci(2*n+1)*(Fibonacci(2*n) + Fibonacci(2*n+2) + 3*Fibonacci(2*n+1)).
a(n) = 2*A064170(n+3).
G.f.: 2*(2 - 6*x + x^2)/((1 - x)*(1 - 7*x + x^2)). - Andrew Howroyd, Feb 16 2023
a(n) = a(n-3) - 8 * (a(n-2) - a(n-1)) for n >= 3. - Peter Luschny, Feb 17 2023
a(n) = a(-2-n) = 2*F(2*n+1) * F(2*n+3) = A295683(4*(n+1)) for all n in Z. - Michael Somos, Mar 02 2023

A358257 The least significant digit of k such that 2^k, 5^k, 8^k start with the same digit.

Original entry on oeis.org

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

Author

Keywords

Comments

The sequence consists of groups of identical digits. The numbers representing each group, starting from the second group, form a cycle (5, 8, 1, 4, 7, 0, 3, 6, 9, 2).

Examples

			a(3) = A358197(3) mod 10 = 15 mod 10 = 5,
a(4) = A358197(4) mod 10 = 98 mod 10 = 8,
a(9) = A358197(9) mod 10 = 221 mod 10 = 1.
		

Crossrefs

Formula

a(n) = A358197(n) mod 10.
a(n) = A010879(A358197(n)).

A358197 Numbers k such that 2^k, 5^k and 8^k have the same first digit.

Original entry on oeis.org

0, 5, 15, 98, 108, 118, 191, 201, 211, 284, 294, 304, 387, 397, 407, 480, 490, 500, 583, 593, 603, 676, 686, 696, 779, 789, 872, 882, 892, 965, 975, 985, 1068, 1078, 1088, 1161, 1171, 1181, 1264, 1274, 1284, 1357, 1367, 1377, 1450, 1460, 1470, 1553, 1563, 1573, 1646, 1656, 1666
Offset: 1

Author

Keywords

Comments

The first digit of 2^k is A008952(k) = floor(10^{k*log_10(2)}), the first digit of 5^k is A111395(k) = floor(10^{k*log_10(5)}), and the first digit of 8^k is A008952(3*k) = floor(10^{k*log_10(8)}), where "{x}" denotes the fractional part of x.
All numbers 2^k, 5^k, 8^k for k = a(n) > 0 start only with 3.
From Jianing Song, Dec 26 2022: (Start)
Write lg = log_10. Note that {k*lg(5)} = 1 - {k*lg(2)} and that {k*lg(8)} = {k*lg(2)} + 0, 1, or 2, so we have {k > 0 : 2^k, 5^k, 8^k all start with a} = {k: {k*lg(2)} is in I_a}, where I_a = (lg(a), lg(a+1)) intersect (1-lg(a+1), 1-lg(a)) intersect (((lg(a))/3, (lg(a+1))/3) U ((lg(a)+1)/3, (lg(a+1)+1)/3) U ((lg(a)+2)/3, (lg(a+1)+2)/3)). Note that I_3 = ((lg(3)+1)/3, 1-lg(3)) and I_a is empty otherwise (since (lg(a), lg(a+1)) intersect (1-lg(a+1), 1-lg(a)) is empty). As a result, k > 0 is a term if and only if (lg(3)+1)/3 < {k*lg(2)} < 1-lg(3).
Except for 0, also numbers k in A358196 such that 2^k starts with 3 (see the comment in A358196).
Claim: for n > 1, a(n+1) - a(n) = 10, 73, or 83. Proof: write a = (lg(3)+1)/3, b = 1-lg(3).
Step 1. If k > 0 is a term, then:
(a) {k*lg(2)} is in (a, b-(10*lg(2)-3)) => {(k+10)*lg(2)} is in (a+(10*lg(2)-3), b) => k+10 is a term;
(b) {k*lg(2)} is in (a+(25-83*lg(2)), b) => {(k+83)*lg(2)} is in (a, b-(25-83*lg(2))) => k+83 is a term.
Note that (a, b-(10*lg(2)-3)) U (a+(25-83*lg(2)), b) = (a, b), so at least one of k+10 and k+83 is a term.
Step 2. If k > 0 and k+m are both terms, 0 < m <= 83, then {k*lg(2)} and {(k+m)*lg(2)} are both in (a, b), so m*lg(2) is the range (N-(b-a), N+(b-a)) for some integer N, which implies that m = 10, 20, 73, or 83.
Note that if {k*lg(2)} < 1 - 2*(10*lg(2)-3), then {(k+10)*lg(2)} = {k*lg(2)} + (10*lg(2)-3), {(k+20)*lg(2)} = {k*lg(2)} + 2*(10*lg(2)-3), so {k*lg(2)} < {(k+10)*lg(2)} < {(k+20)*lg(2)}, which means that if k and k+20 are both terms, so is k+10. This shows that the next term after k is either 10, 73, or 83 larger.
We can show similarly that, for k > 0 being a term of this sequence:
(a) if k+73 is a term, then k+83 is a term;
(b) if k+83 is a term, then k+93 is a term;
(c) if k+166 is a term, then k+73 is a term;
(d) if k+10, k+73 are not terms (i.e., the next term is k+83), then k+176, k+196 are terms.
As a result, if we write out the sequence of the first differences, 73 is always followed by two 10's, and 83 is followed by one or two 10's; 83, 10, 10 is always followed by 73, 10, 10, and 83, 10 is always followed by 83, 10, 10. (End)

Examples

			5 is a term because the first digit of 2^5 = 32, 5^5 = 3125, 8^5 = 32768 is 3.
15 is a term because the first digit of 2^15 = 32768, 5^15 = 30517578125, 8^15 = 35184372088832 is 3.
		

Crossrefs

Intersection of A088935 and A358196.

Programs

  • Maple
    ld:= n -> floor(n/10^ilog10(n)):filter:= proc(k) local d;
      d:= ld(2^k);
      ld(5^k) = d and ld(8^k) = d
    end proc:select(filter, [$0..2000]); # Robert Israel, Nov 02 2022
  • Mathematica
    Select[Range[0, 1666], Equal @@ IntegerDigits[{2, 5, 8}^#][[;; , 1]] &] (* Amiram Eldar, Nov 02 2022 *)
  • Python
    def ok(n): return str(2**n)[0] == str(5**n)[0] == str(8**n)[0]
    print([k for k in range(1667) if ok(k)]) # Michael S. Branicky, Nov 03 2022

A357733 Integer lengths of the sides of such regular hexagons that a polyline described in A356047 exists.

Original entry on oeis.org

1, 2, 286, 299, 56653, 56834, 11006686, 11009207, 2135467321, 2135502434, 414272813758, 414273302819, 80366834417221, 80366841228962, 15590752217183806, 15590752312059119, 3024525571838019313, 3024525573159461954, 586742370303288400606, 586742370321693722267, 113824995314922590647741
Offset: 1

Author

Keywords

Comments

The length of the side of the hexagon is determined using a triangular grid depending on the number of links, which reduces to nontrivial solutions of the Pell equation x^2 - 3y^2 = 1 for even x.

Crossrefs

Cf. A356047.

Formula

a(n) = k(n)*sqrt((k(n)+1)^2/3 + 1)/4 for odd n,
a(n) = (k(n) + 1)*sqrt(k(n)^2/3 + 1)/4 for even n,
where k(n) = A356047(n).
Conjectures from Chai Wah Wu, Mar 13 2023: (Start)
a(n) = 208*a(n-2) - 2718*a(n-4) + 208*a(n-6) - a(n-8) for n > 8.
G.f.: x*(1+x)*(x^6+x^5+77*x^4-194*x^3+77*x^2+x+1) / ( (x^2+4*x+1) *(x^2-4*x+1) *(x^2-14*x+1) *(x^2+14*x+1) ). (End)

A356047 The number of links of a qualifying "snake" polyline that connects the midpoints of opposite sides of the n-th regular integer hexagon that allows such a construction.

Original entry on oeis.org

2, 3, 44, 45, 626, 627, 8732, 8733, 121634, 121635, 1694156, 1694157, 23596562, 23596563, 328657724, 328657725, 4577611586, 4577611587, 63757904492, 63757904493, 888033051314, 888033051315, 12368704813916, 12368704813917, 172273834343522, 172273834343523, 2399464975995404, 2399464975995405, 33420235829592146, 33420235829592147
Offset: 1

Author

Keywords

Comments

A polyline qualifies if its n-th link has length n; the angle between adjacent links is Pi/3; and links of the same parity are parallel.
Finding the possible numbers of links reduces to finding nontrivial solutions to the Pell equation x^2 - 3y^2 = 1 for even x. See the formulas below.

Examples

			a(1) = 2, since the first nontrivial pair (2;1) of the Pell equation x^2 - 3y^2 = 1 determines a(1) = 3*y(1) - 1 = 3*1 - 1 = 2 and in a hexagon with side 1 a broken line of two links connects the midpoints of its opposite sides.
a(2) = 3, since the first nontrivial pair (2;1) of the Pell equation x^2 - 3y^2 = 1 determines a(2) = 3*y(2 -1) = 3 and in a hexagon with side 2 a broken line of three links connects the midpoints of its opposite sides.
a(3) = 44, since the third nontrivial pair (26;15) of the Pell equation x^2 - 3y^2 = 1 determines a(3) = 3*y(3) - 1 = 3*15 - 1 = 44.
a(4) = 45, since the third nontrivial pair (26;15) of the Pell equation x^2 - 3y^2 = 1 determines a(4) = 3*y(4 -1) = 3*15 = 45.
		

Crossrefs

Cf. A001353, A357733 (sides of the hexagons).

Programs

  • Mathematica
    LinearRecurrence[{0, 15, 0, -15, 0, 1}, {2, 3, 44, 45, 626, 627}, 30] (* Paolo Xausa, Oct 03 2024 *)

Formula

a(2n-1) = 3*y(2n-1) - 1, a(2n) = 3*y(2n-1) from the nontrivial solutions of the equation x^2 - 3y^2 = 1.
Here y(n) = A001353(n). - Andrey Zabolotskiy, Oct 16 2022
From Chai Wah Wu, Mar 13 2023: (Start)
a(n) = 15*a(n-2) - 15*a(n-4) + a(n-6) for n > 6.
G.f.: x*(-2-3*x-14*x^2+4*x^4+3*x^5) / ( (x-1)*(1+x)*(x^2-4*x+1)*(x^2+4*x+1) ). (End)

Extensions

Edited by Peter Munn, Jan 31 2025, incorporating insight from Andrey Zabolotskiy into the name.