A087811 Numbers k such that ceiling(sqrt(k)) divides k.
1, 2, 4, 6, 9, 12, 16, 20, 25, 30, 36, 42, 49, 56, 64, 72, 81, 90, 100, 110, 121, 132, 144, 156, 169, 182, 196, 210, 225, 240, 256, 272, 289, 306, 324, 342, 361, 380, 400, 420, 441, 462, 484, 506, 529, 552, 576, 600, 625, 650, 676, 702, 729, 756, 784, 812, 841
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..300
- Ya-Ping Lu, Illustration of the Terms in A087811 on the Square Spiral
- Wikipedia, Oppermann's conjecture.
- Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
Crossrefs
Programs
-
Haskell
a087811 n = (n + n `mod` 2) * (n + 2 - n `mod` 2) `div` 4 -- Reinhard Zumkeller, Oct 27 2012
-
Magma
[ n: n in [1..841] | n mod Ceiling(Sqrt(n)) eq 0 ]; // Bruno Berselli, Feb 09 2011
-
Maple
f:= gfun:-rectoproc({a(n)=n+a(n-2),a(1)=1,a(2)=2},a(n),remember): map(f, [$1..100]); # Robert Israel, Aug 31 2016
-
Mathematica
a[1] := 1; a[2] := 2; a[n_] := n + a[n - 2]; Table[a[n], {n, 57}] (* Alonso del Arte *) GaloisNumber[n_, q_] := Sum[QBinomial[n, m, q], {m, 0, n}]; aa = {}; Do[ sub = Table[GaloisNumber[m, n], {n, 0, 200}]; pp = InterpolatingPolynomial[sub, x]; pol = pp /. x -> n + 1; coef = CoefficientList[pol, n]; AppendTo[aa, Length[coef] - 1], {m, 2, 25}]; aa (* Artur Jasinski, Aug 31 2016 *) Select[Range[900],Divisible[#,Ceiling[Sqrt[#]]]&] (* or *) LinearRecurrence[ {2,0,-2,1},{1,2,4,6},60] (* Harvey P. Dale, Nov 06 2016 *)
-
PARI
a(n)=(n+n%2)*(n+2-n%2)/4 \\ Charles R Greathouse IV, Apr 03 2012
-
PARI
j=0;for(k=1,850,s=sqrtint(4*k+1);if(s>j,j=s;print1(k,", "))) \\ Hugo Pfoertner, Sep 17 2018
-
Python
def A087811(n): return n*(n+2)+(n&1)>>2 # Chai Wah Wu, Jul 27 2022
Formula
a(n) = (n + n mod 2)*(n + 2 - n mod 2)/4.
Numbers of the form m^2 or m^2 - m. - Don Reble, Oct 17 2003
a(1) = 1, a(2) = 2, a(n) = n + a(n - 2). - Alonso del Arte, Jun 18 2005
From Bruno Berselli, Feb 09 2011: (Start)
G.f.: x/((1+x)*(1-x)^3).
a(n) = (2*n*(n+2)-(-1)^n+1)/8. (End)
G.f.: G(0)/(2*(1-x^2)*(1-x)), where G(k) = 1 + 1/(1 - x*(2*k+1)/(x*(2*k+2) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 25 2013
a(n) = (C(n+2,2) - floor((n+2)/2))/2. - Mircea Merca, Nov 23 2013
a(n) = ((-1)^n*(-1 + (-1)^n*(1 + 2*n*(2 + n))))/8. - Fred Daniel Kline, Jan 06 2015
a(n) = Product_{k=1...n-1} (1 + 2 / (k + k mod 2)), n >= 1. - Fred Daniel Kline, Oct 30 2016
E.g.f.: (1/4)*(x*(3 + x)*cosh(x) + (1 + 3*x + x^2)*sinh(x)). - Stefano Spezia, Jan 05 2020
a(n) = (n*(n+2)+(n mod 2))/4. - Chai Wah Wu, Jul 27 2022
Sum_{n>=1} 1/a(n) = Pi^2/6 + 1. - Amiram Eldar, Sep 17 2022
a(n) = A024206(n) + 1. - Ya-Ping Lu, Dec 29 2023
Comments