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-3 of 3 results.

A343739 a(n) is the last digit to appear in sqrt(n) (or -1 if n is a square).

Original entry on oeis.org

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

Views

Author

Jon E. Schoenfield, Jul 05 2021

Keywords

Comments

For the digit position in sqrt(n) at which the digit a(n) first appears, see A343740.

Examples

			a(2)=8 because 8 is the last digit to appear in sqrt(2) = 1.414213562373095048...;
a(24)=0 because 0 is the last digit to appear in sqrt(24) = 4.898979485566356196394568149411782783931894961313340...
		

Crossrefs

Programs

  • Mathematica
    Table[If[IntegerQ@ Sqrt@ n, -1, Function[s, FirstPosition[#, Max@ #][[1]] - 1 &@ Array[FirstPosition[s, #][[1]] &, 10, 0]]@ RealDigits[Sqrt[n], 10, 120][[1]]], {n, 84}] (* Michael De Vlieger, Jul 06 2021 *)

Formula

a(100^q*n) = a(n), q > 0. - Bernard Schott, Jul 24 2021

A343740 a(n) is the digit position of the first appearance of the last digit to appear in sqrt(n) (or -1 if n is a square).

Original entry on oeis.org

-1, 19, 23, -1, 37, 39, 45, 36, -1, 27, 17, 25, 15, 36, 19, -1, 20, 36, 25, 37, 28, 13, 27, 52, -1, 39, 17, 38, 27, 26, 17, 23, 24, 37, 19, -1, 25, 26, 26, 41, 58, 57, 25, 12, 25, 22, 24, 19, -1, 33, 48, 23, 41, 49, 23, 32, 32, 23, 30, 19, 17, 31, 27, -1, 24
Offset: 1

Views

Author

Jon E. Schoenfield, Jul 05 2021

Keywords

Comments

A343739(n) is the last digit to appear in the decimal expansion of sqrt(n) (or -1 if n is a square), so a(n) is the digit position of the first appearance of the digit A343739(n) in sqrt(n).
(The first digit of sqrt(n) is counted as digit position 1; the decimal point is disregarded.)

Examples

			a(2)=19 because A343739(2)=8 and the first appearance of an 8 in sqrt(2) = 1.414213562373095048... is at the 19th digit;
a(24)=52 because A343739(24)=0 and the first appearance of a 0 in sqrt(24) = 4.898979485566356196394568149411782783931894961313340... is at the 52nd digit.
		

Crossrefs

Programs

  • Mathematica
    Table[If[IntegerQ@ Sqrt@ n, -1, Function[s, Max@ Array[FirstPosition[s, #][[1]] &, 10, 0]]@ RealDigits[Sqrt[n], 10, 120][[1]]], {n, 65}] (* Michael De Vlieger, Jul 06 2021 *)

Formula

a(100^q*n) = a(n), q > 0. - Bernard Schott, Jul 29 2021

A343741 Record high values in A343740.

Original entry on oeis.org

19, 23, 37, 39, 45, 52, 58, 69, 110, 118, 132, 133, 136, 139, 143, 152, 158, 164, 169, 173, 174, 187, 195, 204, 215, 217
Offset: 1

Views

Author

Jon E. Schoenfield, Jul 05 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Rest@ Union@ FoldList[Max, Table[If[IntegerQ@ Sqrt@ n, -1, Function[s, Max@ Array[FirstPosition[s, #][[1]] &, 10, 0]]@ RealDigits[Sqrt[n], 10, 300][[1]]], {n, 10^5}]] (* Michael De Vlieger, Jul 06 2021 *)

Extensions

a(24)-a(26) from Chai Wah Wu, Jul 06 2021
Showing 1-3 of 3 results.