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

A322666 a(n) is the smallest positive integer k such that there does not exist an m such that floor(m^2/10^n) = k.

Original entry on oeis.org

5, 35, 282, 2600, 25317, 251000, 2503163, 25010000, 250031623, 2500100000, 25000316228, 250001000000, 2500003162278, 25000010000000, 250000031622777, 2500000100000000, 25000000316227767, 250000001000000000, 2500000003162277661, 25000000010000000000
Offset: 1

Views

Author

Jianing Song, Dec 22 2018

Keywords

Comments

For n >= 2, note that when k < 5*10^(n-1) we have (k + 1)^2 - k^2 = 2*k + 1 < 10^n, so there exists m such that floor(m^2/10^n) = 0, 1, 2, ..., 25*10^(n-2). For 0 <= t < sqrt(10^n), floor((5*10^(n-1) + t)^2/10^n) = 25*10^(n-2) + t; for t = ceiling(sqrt(10^n)), floor((5*10^(n-1) + t)^2/10^n) = 25*10^(n-2) + t + 1. So the number 25*10^(n-2) + ceiling(10^(n/2)) is skipped over. Take n = 3 as an example. When k < 500, (k + 1)^2 - k^2 < 1000, so there exists m such that floor(m^2/1000) = 0, 1, 2, ..., 250. Since 31^2 = 961 < 1000, 32^2 = 1024 > 1000, (500 + t)^2 is successively 251001, 252004, ..., 281961, 283024, so a(3) = 282.
The sum of digits for Sum_{i=1..n} a(2*n) is 8*n.

Examples

			floor(m^2/10) = 0, 0, 0, 0, 1, 2, 3, 4, 6 for m = 0..8, so a(1) = 5.
floor(m^2/100) = 0, ..., 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36 for m = 0..60, so a(2) = 35.
		

Crossrefs

Programs

  • PARI
    a(n) = if(n==1, 5, 25*10^(n-2) + ceil(10^(n/2)))

Formula

a(n) = 25*10^(n-2) + ceiling(10^(n/2)) for n >= 2.

A322667 a(n) is the smallest positive integer k such that floor((k + 1)^2/10^n) - floor(k^2/10^n) = 2.

Original entry on oeis.org

7, 59, 531, 5099, 50316, 500999, 5003162, 50009999, 500031622, 5000099999, 50000316227, 500000999999, 5000003162277, 50000009999999, 500000031622776, 5000000099999999, 50000000316227766, 500000000999999999, 5000000003162277660, 50000000009999999999
Offset: 1

Views

Author

Jianing Song, Dec 22 2018

Keywords

Comments

For n >= 2, note that when k < 5*10^(n-1) we have (k + 1)^2 - k^2 = 2*k + 1 < 10^n, so a(n) >= 5*10^(n-1). For 0 <= t < sqrt(10^n), floor((5*10^(n-1) + t)^2/10^n) = 25*10^(n-2) + t; for t = ceiling(sqrt(10^n)), floor((5*10^(n-1) + t)^2/10^n) = 25*10^(n-2) + t + 1. Take n = 3 as an example. When k < 500, (k + 1)^2 - k^2 < 1000, so a(3) >= 500. Since 31^2 = 961 < 1000, 32^2 = 1024 > 1000, (500 + t)^2 is successively 251001, 252004, ..., 281961, 283024, so a(3) = 500 + 31 = 531.

Examples

			floor(7^2/10) = 4, floor(8^2/10) = 6, and 7 is the smallest k such that floor((k + 1)^2/10) - floor(k^2/10) = 2, so a(1) = 7.
floor(59^2/10) = 34, floor(60^2/10) = 36, and 59 is the smallest k such that floor((k + 1)^2/100) - floor(k^2/100) = 2, so a(2) = 59.
		

Crossrefs

Programs

  • PARI
    a(n) = if(n==1, 7, 5*10^(n-1) + ceil(10^(n/2)) - 1)

Formula

a(n) = 5*10^(n-1) + ceiling(10^(n/2)) - 1 for n >= 2.
Showing 1-2 of 2 results.