A322667 a(n) is the smallest positive integer k such that floor((k + 1)^2/10^n) - floor(k^2/10^n) = 2.
7, 59, 531, 5099, 50316, 500999, 5003162, 50009999, 500031622, 5000099999, 50000316227, 500000999999, 5000003162277, 50000009999999, 500000031622776, 5000000099999999, 50000000316227766, 500000000999999999, 5000000003162277660, 50000000009999999999
Offset: 1
Keywords
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.
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.
Comments