A267032
Difference between smallest integer square >= 10^(2*n+1) and 10^(2*n+1).
Original entry on oeis.org
6, 24, 489, 4569, 14129, 147984, 2149284, 25191729, 621806289, 5259630921, 19998666404, 102500044289, 3925449108561, 13071591635856, 42248099518244, 4224809951824400, 43007675962234436, 506034404021388356, 6997839444766224, 699783944476622400
Offset: 0
a(0) = 6 = 4^2 - 10; a(1) = 24 = 32^2 - 1000.
-
f:= proc(n) local s;
s:= isqrt(10^(2*n+1));
if s^2 < 10^(2*n+1) then s:= s+1 fi;
s^2 - 10^(2*n+1)
end proc:
seq(f(n),n=0..40); # Robert Israel, Jan 17 2016
-
dsis[n_]:=Module[{c=10^(2n+1)},(Floor[Sqrt[c]]+1)^2-c]; Array[dsis,20,0] (* Harvey P. Dale, Apr 27 2019 *)
-
from math import isqrt
def A267032(n): return (isqrt(m:=10**((n<<1)+1))+1)**2-m # Chai Wah Wu, Apr 27 2023
A287016
a(n) = smallest number k such that A071904(n) + k^2 is a perfect square.
Original entry on oeis.org
0, 1, 2, 0, 3, 4, 1, 5, 2, 0, 7, 3, 8, 1, 4, 10, 5, 2, 0, 6, 13, 3, 14, 7, 1, 4, 17, 9, 2, 5, 0, 19, 10, 20, 6, 3, 22, 1, 12, 7, 4, 13, 25, 8, 2, 0, 5, 9, 28, 29, 16, 3, 6, 1, 32, 11, 18, 7, 4, 34, 19, 12, 35, 2, 0, 5, 21, 38, 9, 14, 3, 40, 6, 1, 15, 10, 24
Offset: 1
The third odd composite number is A071904(3) = 21. and 21+2^2 = 25 = 5^2, so a(3) = 2.
-
q[n_] := SelectFirst[Range[0, (n-1)/2], IntegerQ@ Sqrt[#^2 + n] &]; q /@ Select[Range[1, 300, 2], CompositeQ] (* Giovanni Resta, May 18 2017 *)
-
from sympy import primepi, divisors
from sympy.ntheory.primetest import is_square
def A287016(n):
if n == 1: return 0
m, k = n, primepi(n) + n + (n>>1)
while m != k:
m, k = k, primepi(k) + n + (k>>1)
return 0 if is_square(int(m)) else -(d:=divisors(m))[l:=(len(d)>>1)-1]+d[l+1]>>1 # Chai Wah Wu, Aug 02 2024
A333884
Difference between smallest cube > n and n.
Original entry on oeis.org
1, 7, 6, 5, 4, 3, 2, 1, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45
Offset: 0
A343037
Triangle T(n,k), n >= 2, 1 <= k <= n-1, read by rows, where T(n,k) is the difference between smallest square >= binomial(n,k) and binomial(n,k).
Original entry on oeis.org
2, 1, 1, 0, 3, 0, 4, 6, 6, 4, 3, 1, 5, 1, 3, 2, 4, 1, 1, 4, 2, 1, 8, 8, 11, 8, 8, 1, 0, 0, 16, 18, 18, 16, 0, 0, 6, 4, 1, 15, 4, 15, 1, 4, 6, 5, 9, 4, 31, 22, 22, 31, 4, 9, 5, 4, 15, 5, 34, 49, 37, 49, 34, 5, 15, 4, 3, 3, 3, 14, 9, 48, 48, 9, 14, 3, 3, 3, 2, 9, 36, 23, 23, 22, 49, 22, 23, 23, 36, 9, 2
Offset: 2
binomial(50,3) = binomial(50,47) = 140^2. So T(50,3) = T(50,47) = 0.
Triangle begins:
2;
1, 1;
0, 3, 0;
4, 6, 6, 4;
3, 1, 5, 1, 3;
2, 4, 1, 1, 4, 2;
1, 8, 8, 11, 8, 8, 1;
0, 0, 16, 18, 18, 16, 0, 0;
6, 4, 1, 15, 4, 15, 1, 4, 6;
5, 9, 4, 31, 22, 22, 31, 4, 9, 5;
4, 15, 5, 34, 49, 37, 49, 34, 5, 15, 4;
3, 3, 3, 14, 9, 48, 48, 9, 14, 3, 3, 3;
2, 9, 36, 23, 23, 22, 49, 22, 23, 23, 36, 9, 2;
1, 16, 29, 4, 22, 36, 126, 126, 36, 22, 4, 29, 16, 1;
0, 1, 16, 29, 121, 92, 9, 126, 9, 92, 121, 29, 16, 1, 0;
-
diff[n_] := Ceiling[Sqrt[n]]^2 - n; T[n_, k_] := diff @ Binomial[n, k]; Table[T[n, k], {n, 2, 14}, {k, 1, n - 1}] // Flatten (* Amiram Eldar, Apr 03 2021 *)
-
T(n, k) = my(m=binomial(n, k)); if(issquare(m), 0, (sqrtint(m)+1)^2-m);
A070928
Smallest integer >= 0 of the form x^4 - n^3.
Original entry on oeis.org
0, 8, 54, 17, 131, 40, 282, 113, 567, 296, 1070, 673, 204, 1352, 721, 0, 1648, 729, 3141, 2000, 739, 3993, 2474, 817, 5111, 3160, 1053, 6609, 4172, 1561, 8625, 5648, 2479, 11321, 7750, 3969, 14883, 10664, 6217, 1536, 14600, 9433, 4014, 19792
Offset: 1
-
si[n_]:=Module[{k=Ceiling[Surd[n^3,4]]},While[!Integer[k^4-n^3],k++];k^4-n^3]; Array[si,50] (* Harvey P. Dale, Jan 03 2021 *)
-
for(n=1,100,print1(ceil(n^(3/4))^4-n^3,","))
A070930
Smallest integer >= 0 of the form x^3 - n^4.
Original entry on oeis.org
0, 11, 44, 87, 104, 35, 343, 0, 298, 648, 984, 1216, 1230, 888, 28, 3385, 1663, 5616, 2330, 6375, 631, 4072, 7655, 11224, 14599, 17576, 0, 21400, 21719, 20584, 17671, 12632, 5095, 31295, 20250, 5543, 32463, 12016, 39196, 11353, 37527, 440, 24150
Offset: 1
-
Array[Ceiling[#^(4/3)]^3-#^4&,50] (* Harvey P. Dale, Dec 24 2015 *)
-
for(n=1,100,print1(ceil(n^(4/3))^3-n^4,","))
Comments