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-10 of 51 results. Next

A193050 G.f. A(x) satisfies: 1 = Sum_{n>=0} x^n*A(-x)^A003059(n+1), where A003059 is defined by "n appears 2n-1 times.".

Original entry on oeis.org

1, 1, 1, 2, 4, 8, 17, 38, 87, 204, 489, 1191, 2938, 7328, 18448, 46809, 119583, 307324, 793965, 2060770, 5371156, 14051901, 36887289, 97131351, 256488187, 679046184, 1802047427, 4792800096, 12773166908, 34106055493, 91228795961, 244427136822, 655900969465
Offset: 0

Views

Author

Paul D. Hanna, Jul 14 2011

Keywords

Comments

Compare the g.f. to a g.f. C(x) of the Catalan numbers: 1 = Sum_{n>=0} x^n*C(-x)^(2*n+1).

Examples

			G.f.: A(x) = 1 + x + x^2 + 2*x^3 + 4*x^4 + 8*x^5 + 17*x^6 + 38*x^7 +...
The g.f. satisfies:
1 = A(-x) + x*A(-x)^2 + x^2*A(-x)^2 + x^3*A(-x)^2 + x^4*A(-x)^3 + x^5*A(-x)^3 + x^6*A(-x)^3 + x^7*A(-x)^3 + x^8*A(-x)^3 + x^9*A(-x)^4 +...+ x^n*A(-x)^A003059(n+1) +...
where A003059 begins: [1, 2,2,2, 3,3,3,3,3, 4,4,4,4,4,4,4, 5,...].
The g.f. also satisfies:
1-x = (1-x)*A(-x) + x*(1-x^3)*A(-x)^2 + x^4*(1-x^5)*A(-x)^3 + x^9*(1-x^7)*A(-x)^4 + x^16*(1-x^9)*A(-x)^5 +...
		

Crossrefs

Programs

  • PARI
    {a(n)=local(A=[1]); for(i=1, n, A=concat(A, 0); A[#A]=polcoeff(sum(m=1, #A, (-x)^m*Ser(A)^(1+sqrtint(m-1)) ), #A)); if(n<0, 0, A[n+1])}

Formula

G.f. satisfies: 1-x = Sum_{n>=1} x^(n^2) * (1 - x^(2*n-1)) * A(-x)^n.

A257217 A257213 - A003059, where A257213(n) = min{d>0 | floor(n/d) = floor(n/(d+1))}, A003059(n) = ceiling(sqrt(n)).

Original entry on oeis.org

1, 1, 1, 0, 1, 0, 1, 1, 0, 2, 0, 0, 1, 1, 1, 0, 2, 1, 0, 0, 2, 1, 1, 1, 0, 2, 1, 1, 0, 0, 2, 2, 1, 1, 1, 0, 2, 1, 1, 1, 0, 0, 2, 2, 2, 1, 1, 1, 0, 3, 1, 1, 1, 1, 0, 0, 2, 2, 2, 2, 1, 1, 1, 0, 3, 2, 1, 1, 1, 1, 0, 0, 2, 2, 2, 2, 2, 1, 1, 1, 0, 3, 2, 2, 1, 1
Offset: 0

Views

Author

M. F. Hasler, Apr 18 2015

Keywords

Comments

One has a(n) <= a(n-1) except for n = k^2. The positive jumps occur exactly at the squares, cf. formula.

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{d, k}, Reap@ For[k = 0, k <= n, k++, d = 1; While[Floor[k/d] != Floor[k/(d + 1)], d++]; Sow[d - Ceiling[Sqrt@ k]]] // Flatten // Rest]; f@ 85 (* Michael De Vlieger, Apr 18 2015 *)
  • PARI
    A257217(n)=A257213(n)-A003059(n)

Formula

a(k^2-1) = 0 for k > 1. Proof: For n = k^2-1 = (k-1)(k+1), floor(n/k) = k-1 = n/(k+1) but n/(k-1) = k+1, thus A257213(n) = k = ceiling(sqrt(n)).
A257213(n) >= floor(sqrt(n))+1 = A257213(n+1) >= A257213(n) = ceiling(sqrt(n)), with strict inequality (in the second relation) when n is a square. Therefore a(n) >= 1 for all n = k^2.
a(k^2) >= d when k > d(d-1). Proof: This follows from k^2/(k+d) = k-d+d^2/(k+d), which shows that a(k) >= d when k > d(d-1).

A327724 Product of A003059 and A071797.

Original entry on oeis.org

1, 2, 4, 6, 3, 6, 9, 12, 15, 4, 8, 12, 16, 20, 24, 28, 5, 10, 15, 20, 25, 30, 35, 40, 45, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 9, 18, 27, 36, 45, 54
Offset: 1

Views

Author

Todor Szimeonov, Sep 23 2019

Keywords

Crossrefs

Programs

  • PARI
    a(n) = {(1+sqrtint(n-1))*(n-sqrtint(n-1)^2)} \\ Andrew Howroyd, Sep 23 2019

A000194 n appears 2n times, for n >= 1; also nearest integer to square root of n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Define the oblong root obrt(x) to be the (larger) solution of y * (y+1) = x; i.e., obrt(x) = sqrt(x+1/4) - 1/2. So obrt(x) is an integer iff x is an oblong number (A002378). Then a(n) = ceiling(obrt(n)). - Franklin T. Adams-Watters, Jun 24 2015
From Wolfdieter Lang, Mar 12 2019: (Start)
The general Pell equation is related to the non-reduced form F(n) = Xvec^T A(n) Xvec = x^2 - D(n)*y^2 with D(n) = A000037(n) (D not a square), Xvec = (x,y)^T (T for transposed) and A(n) = matrix[[1,0], [0,-D(n)]]. The discriminant of F(n) = [1, 0, -D(n)] is 4*D(n).
The first reduced form appears after two applications of an equivalence transformation A' = R^T A R obtained with R = R(t) = matrix([0, -1], [1, t]), namely first with t = 0, leading to the still not reduced form [-D, 0, 1], and then with t = ceiling(f(4*D(n))/2 - 1), where f(4*D(n)) = ceiling(2*sqrt(D(n))). This can be shown to be a(n), which is also D(n) - n, for n >= 1 (see a formula below).
This leads to the reduced form FR(n) = [1, 2*a(n), -(D(n) - a(n)^2)] = [1, 2*a(n), -(n - a(n)*(a(n) - 1))]. Example: n = 5, a(5) = 2: D(5) = 7 and FR(5) = [1, 4, -3]. (End)

Examples

			G.f. = x + x^2 + 2*x^3 + 2*x^4 + 2*x^5 + 2*x^6 + 3*x^7 + 3*x^8 + 3*x^9 + 3*x^10 + ...
		

References

  • Titu Andreescu, Dorin Andrica, and Zuming Feng, 104 Number Theory Problems, Birkhäuser, 2006, 59-60.
  • B. C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, see p. 78, Entry 24.

Crossrefs

Partial sums of A005369.
Cf. A000196 (floor(sqrt(n))), A003059 (ceiling(sqrt(n))).

Programs

  • Haskell
    a000194 n = a000194_list !! (n-1)
    a000194_list = concat $ zipWith ($) (map replicate [2,4..]) [1..]
    -- Reinhard Zumkeller, Mar 18 2011
    
  • Maple
    Digits := 100; f := n->round(evalf(sqrt(n))); [ seq(f(n), n=0..100) ];
    # More efficient:
    a := n -> isqrt(n): seq(a(n), n=0..98); # Peter Luschny, Mar 13 2019
  • Mathematica
    A000194[n_] := Floor[(1 + Sqrt[4 n - 3])/2]; (* Enrique Pérez Herrero, Apr 14 2010 *)
    Flatten[Table[PadRight[{}, 2 n, n], {n, 10}]] (* Harvey P. Dale, Nov 16 2011 *)
    CoefficientList[Series[x QPochhammer[-x^2, x^4] QPochhammer[x^8, x^8]/(1 - x), {x, 0, 50}], x] (* Eric W. Weisstein, Jan 10 2024 *)
  • PARI
    {a(n) = ceil( sqrtint(4*n) / 2)}; /* Michael Somos, Feb 11 2004 */
    
  • PARI
    a(n)=(sqrtint(4*n) + 1)\2 \\ Charles R Greathouse IV, Jun 08 2020
    
  • PARI
    apply( {A000194(n)=sqrtint(4*n)\/2}, [0..99]) \\ M. F. Hasler, Jun 22 2024
    
  • Python
    from math import isqrt
    def A000194(n): return (m:=isqrt(n))+int(n-m*(m+1)>=1) # Chai Wah Wu, Jul 30 2022

Formula

a(n) = A000037(n) - n.
G.f.: x * f(x^2, x^6)/(1-x) where f(,) is Ramanujan's two-variable theta function. - Michael Somos, May 31 2000
a(n) = a(n - 2*a(n - a(n-1))) + 1. - Benoit Cloitre, Oct 27 2002
a(n+1) = a(n) + A005369(n).
a(n) = floor((1/2)*(1 + sqrt(4*n - 3))). - Zak Seidov, Jan 18 2006
a(n) = A000037(n) - n. - Jaroslav Krizek, Jun 14 2009
a(n) = floor(A027434(n)/2). - Gregory R. Bryant, Apr 17 2013
From Mikael Aaltonen, Jan 17 2015: (Start)
a(n) = floor(sqrt(n) + 1/2).
a(n) = sqrt(A053187(n)). (End)
a(0) = 0, and a(n) = k for k from the closed interval [k^2 - k + 1, k*(k+1)] = [A002061(k), A002378(k)], for k >= 1. See A053187. - Wolfdieter Lang, Mar 12 2019
a(n) = floor(2*sqrt(n)) - floor(sqrt(n)). - Ridouane Oudra, Jun 08 2020
Sum_{n>=1} 1/a(n)^s = 2*zeta(s-1), for s > 2 (Borwein, 1994). - Amiram Eldar, Oct 31 2020

Extensions

Additional comments from Michael Somos, May 31 2000
Edited by M. F. Hasler, Mar 01 2014
Initial 0 added by N. J. A. Sloane, Nov 13 2017

A115720 Triangle T(n,k) is the number of partitions of n with Durfee square k.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 3, 0, 4, 1, 0, 5, 2, 0, 6, 5, 0, 7, 8, 0, 8, 14, 0, 9, 20, 1, 0, 10, 30, 2, 0, 11, 40, 5, 0, 12, 55, 10, 0, 13, 70, 18, 0, 14, 91, 30, 0, 15, 112, 49, 0, 16, 140, 74, 1, 0, 17, 168, 110, 2, 0, 18, 204, 158, 5, 0, 19, 240, 221, 10, 0, 20, 285, 302, 20, 0, 21, 330, 407
Offset: 0

Views

Author

Keywords

Comments

T(n,k) is number of partitions of n-k^2 into parts of 2 kinds with at most k of each kind.

Examples

			Triangle starts:
  1;
  0,  1;
  0,  2;
  0,  3;
  0,  4,  1;
  0,  5,  2;
  0,  6,  5;
  0,  7,  8;
  0,  8, 14;
  0,  9, 20,  1;
  0, 10, 30,  2;
From _Gus Wiseman_, Apr 12 2019: (Start)
Row n = 9 counts the following partitions:
  (9)          (54)       (333)
  (81)         (63)
  (711)        (72)
  (6111)       (432)
  (51111)      (441)
  (411111)     (522)
  (3111111)    (531)
  (21111111)   (621)
  (111111111)  (3222)
               (3321)
               (4221)
               (4311)
               (5211)
               (22221)
               (32211)
               (33111)
               (42111)
               (222111)
               (321111)
               (2211111)
(End)
		

Crossrefs

For a version without zeros see A115994. Row lengths are A003059. Row sums are A000041. Column k = 2 is A006918. Column k = 3 is A117485.
Related triangles are A096771, A325188, A325189, A325192, with Heinz-encoded versions A263297, A325169, A065770, A325178.

Programs

  • Maple
    b:= proc(n, i) option remember;
          `if`(n=0, 1, `if`(i<1, 0, b(n, i-1)+`if`(i>n, 0, b(n-i, i))))
        end:
    T:= (n, k)-> add(b(m, k)*b(n-k^2-m, k), m=0..n-k^2):
    seq(seq(T(n, k), k=0..floor(sqrt(n))), n=0..30); # Alois P. Heinz, Apr 09 2012
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + If[i>n, 0, b[n-i, i]]]]; T[n_, k_] := Sum[b[m, k]*b[n-k^2-m, k], {m, 0, n-k^2}]; Table[ T[n, k], {n, 0, 30}, {k, 0, Sqrt[n]}] // Flatten (* Jean-François Alcover, Dec 03 2015, after Alois P. Heinz *)
    durf[ptn_]:=Length[Select[Range[Length[ptn]],ptn[[#]]>=#&]];
    Table[Length[Select[IntegerPartitions[n],durf[#]==k&]],{n,0,10},{k,0,Sqrt[n]}] (* Gus Wiseman, Apr 12 2019 *)

Formula

T(n,k) = Sum_{i=0..n-k^2} P*(i,k)*P*(n-k^2-i), where P*(n,k) = P(n+k,k) is the number of partitions of n objects into at most k parts.

A004737 Concatenation of sequences (1,2,...,n-1,n,n-1,...,1) for n >= 1.

Original entry on oeis.org

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

Views

Author

R. Muller

Keywords

Comments

The following sequences all have the same parity: A004737, A006590, A027052, A071028, A071797, A078358, A078446. - Jeremy Gardiner, Mar 16 2003
The ordinal transform of a sequence b_0, b_1, b_2, ... is the sequence a_0, a_1, a_2, ... where a_n is the number of times b_n has occurred in {b_0 ... b_n}.
From Artur Jasinski, Mar 07 2010: (Start)
This sequence is the even subset of A003983 for odd p=2,4,6,8,....
For the odd subset of A003983 see A004739. (End)
From Gary W. Adamson, Mar 30 2010: (Start)
Given the triangle rows: (1; 1,2,1; 1,2,3,2,1; ...) as polcoeff with offset 0:
q = (1 + 2x + x^2), r = (1 + 2x + 3x^2 + 2x^3 +x^4), etc.; then
(1 + 2x + 3x^2 + ...) = q(x) * q(x^2) * q(x^4) * q(x^8) * ...
..................... = r(x) * r(x^3) * r(x^9) * r(x^27) * ...
..................... = s(x) * s(x^4) * s(x^16)* s(x^64) * ...
... (End)
From L. Edson Jeffery, Jan 13 2012: (Start)
Let U_1(t)=1, U_2(t)=2*t, and U_r(t)=2*t*U_(r-1)(t)-U(r-2)(t), r>2, be Chebyshev polynomials of the second kind. For q>1 an integer, let N=2*q and x_k=cos((2*k-1)*Pi/N), and define the ordered column vectors V_k=[U_k(x_1), U_k(x_2), ..., U_k(x_q)]^T, k=1,...,q, where A^T denotes the transpose of matrix A. Let E_N=[V_1, V_2, ..., V_q] be the q X q matrix formed from the ordered components of the V_k. E_N contains the joint spectra of the Danzer basis (see [Jeffery]) associated with N. Let M_N=(1/q)*[E_N]^T*E_N. For the trivial case q=1, let M_2=[1]. CONJECTURE: E_N and M_N are always integral and symmetric, with M_N having diagonal entries {1,2,...} beginning at entries 1,j (j odd) in the first row and i,1 (i odd) in the first column and with zeros elsewhere. If N is allowed to increase without bound, and assuming the conjecture is true, then triangle A004737 emerges in its entirety from the successive antidiagonals containing those entries [M_N]_(i,j) such that i+j=2*v, for each v in {1,2,...,floor((q+1)/2)}. For example, for N=18 and q=9 (omitting the zeros for clarity),
M_18=[
(1 1 1 1 1);
( 2 2 2 2 );
(1 3 3 3 3);
( 2 4 4 4 );
(1 3 5 5 5);
( 2 4 6 6 );
(1 3 5 7 7);
( 2 4 6 8 );
(1 3 5 7 9)],
from which the first five rows of the sequence can be read off in succession. (End)
T(n,k) = min(n,k). The order of the list T(n,k) is by sides of squares from T(1,n) to T(n,n), then from T(n,n) to T(n,1). - Boris Putievskiy, Jan 13 2013
Expanded form of T(2,k) k=0,1,...,2m for ascending m-nomial triangles. - Bob Selcoe, Feb 07 2014
Terms in the first nine rows of the triangle can be duplicated by performing (111...)^2 with <= nine ones. By way of example, (11111)^2 = 123454321. - Gary W. Adamson, Mar 27 2015

Examples

			From _Boris Putievskiy_, Jan 13 2013: (Start)
The start of the sequence as a table:
  1 1 1 1 1 1 ...
  1 2 2 2 2 2 ...
  1 2 3 3 3 3 ...
  1 2 3 4 4 4 ...
  1 2 3 4 5 5 ...
  1 2 3 4 5 6 ...
  ...
The start of the sequence as an irregular triangle array read by rows:
  1;
  1,2,1;
  1,2,3,2,1;
  1,2,3,4,3,2,1;
  1,2,3,4,5,4,3,2,1;
  1,2,3,4,5,6,5,4,3,2,1;
  ...
Row number k contains 2*k-1 numbers: 1,2,...,k-1,k,k-1,...,1. (End)
The sequence of fractions A196199/A004737 = 0/1, -1/1, 0/2, 1/1, -2/1, -1/2, 0/3, 1/2, 2/1, -3/1, -2/2, -1/3, 0/4, 1/3, 2/2, 3/1, -4/4. -3/2, ... contains every rational number (infinitely often) [Laczkovich]. - _N. J. A. Sloane_, Oct 09 2013
		

References

  • Miklós Laczkovich, Conjecture and Proof, TypoTex, Budapest, 1998. See Chapter 10.
  • F. Smarandache, "Numerical Sequences", University of Craiova, 1975.

Crossrefs

Cf. A242357, A000290 (row sums).

Programs

  • Haskell
    import Data.List (inits)
    a004737 n = a004737_list !! (n-1)
    a004737_list = concatMap f $ tail $ inits [1..]
       where f xs = xs ++ tail (reverse xs)
    -- Reinhard Zumkeller, May 11 2014, Mar 26 2011
    
  • Mathematica
    Table[Min[n - #^2, (# + 1)^2 - n + 1] &@ Floor[Sqrt[n - 1]], {n, 105}] (* or *)
    Table[Floor@ # - Abs[n - Floor[#]^2 - Floor@ # - 1] + 1 &@ Sqrt[n - 1], {n, 105}] (* Michael De Vlieger, Oct 21 2016 *)
    Table[Join[Range[n],Range[n-1,1,-1]],{n,20}]//Flatten (* Harvey P. Dale, Dec 27 2019 *)
  • PARI
    a(n) = n--;my(m=sqrtint(n));m+1-abs(n-m^2-m) \\ David A. Corneth, Oct 18 2016

Formula

a(A002061(n)) = n; a(A000290(n)) = a(A002522(n)) = 1. - Reinhard Zumkeller, Mar 10 2006
a(n) = if n<3 then 1 else (if a(n-1)=1 then 1 + 0^(a(n-2)-1) else a(n-1) - 0^X + (a(n-1)-a(n-2))*(1 - 0^X)), where X = A003059(n-1)-a(n-1). - Reinhard Zumkeller, Mar 10 2006
Let b(n) = floor(sqrt(n-1)). Then a(n) = min(n - b(n)^2, (b(n)+1)^2 - n + 1). - Franklin T. Adams-Watters, Jun 09 2006
Ordinal transform of A004741. - Franklin T. Adams-Watters, Aug 28 2006
If the sequence is read as a triangular array, beginning [1]; [1,2,1]; [1,2,3,2,1]; ..., then the o.g.f. is (1+qx)/((1-x)(1-qx)(1-q^2x)) = 1 + x(1 + 2q + q^2) + x^2(1 + 2q + 3q^2 + 2q^3 +q^4) + .... The row polynomials for this triangle are (1 + q + ... + q^n)^2 =[n,2]A008967).%20-%20_Peter%20Bala">q + q[n-1,2]_q, where [n,2]_q are Gaussian polynomials (see A008967). - _Peter Bala, Sep 23 2007
a(n) = floor(sqrt(n-1)) - |n - floor(sqrt(n-1))^2 - floor(sqrt(n-1)) - 1| + 1. - Boris Putievskiy, Jan 13 2013
Read as a triangular array, then T(n,k) = n - |n-k-1|; T(n,0) = 1; T(n,n-1) = n. - Juan Pablo Herrera P., Oct 17 2016

Extensions

More terms from Patrick De Geest, Jun 15 1998

A087811 Numbers k such that ceiling(sqrt(k)) divides k.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 16 2003

Keywords

Comments

Essentially the same as the quarter-squares A002620.
Nonsquare terms of this sequence are given by A002378. - Max Alekseyev, Nov 27 2006
This also gives the number of ways to make change for "c" cents using only pennies, nickels and dimes. You must first set n=floor(c/5), to account for the 5-repetitive nature of the task. - Adam Sasson, Feb 09 2011
These are the segment boundaries of Oppermann's conjecture (1882): n^2-n < p < n^2 < p < n^2+n. - Fred Daniel Kline, Apr 07 2011
a(n) is the number of triples (w,x,y) having all terms in {0..n} and w=2*x+y. - Clark Kimberling, Jun 04 2012
a(n+1) is also the number of points with integer coordinates inside a rectangle isosceles triangle with hypotenuse [0,n] (see A115065 for an equilateral triangle). - Michel Marcus, Aug 05 2013
a(n) = degree of generating polynomials of Galois numbers in (n+1)-dimensional vector space, defined as total number of subspaces in (n+1) space over GF(n) (see Mathematica procedure), when n is a power of a prime. - Artur Jasinski, Aug 31 2016, corrected by Robert Israel, Sep 23 2016
Also number of pairs (x,y) with 0 < x <= y <= n, x + y > n. - Ralf Steiner, Jan 05 2020

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

A134914 a(n) = ceiling(n^(1/3)).

Original entry on oeis.org

1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
Offset: 1

Views

Author

Mohammad K. Azarian, Nov 17 2007

Keywords

Crossrefs

Programs

A055228 a(n) = ceiling(sqrt(n!)).

Original entry on oeis.org

1, 1, 2, 3, 5, 11, 27, 71, 201, 603, 1905, 6318, 21887, 78912, 295260, 1143536, 4574144, 18859678, 80014835, 348776577, 1559776269, 7147792819, 33526120083, 160785623546, 787685471323, 3938427356615, 20082117944246, 104349745809074, 552166953567229
Offset: 0

Views

Author

Henry Bottomley, Jun 21 2000

Keywords

Comments

For n>0, a(n) is the least m>0 such that n! <= m^2. - Clark Kimberling, Jul 18 2012

Crossrefs

Programs

Formula

a(n) = A003059(A000142(n)). - Jonathan Vos Post, Apr 29 2007

Extensions

A comment stating that one of the terms was wrong has been deleted - the terms are correct. - T. D. Noe, Apr 22 2009
More terms from Wesley Ivan Hurt, May 06 2014

A277961 Numbers n such that 4 is the largest decimal digit of n^2.

Original entry on oeis.org

2, 12, 18, 20, 21, 32, 38, 48, 49, 102, 120, 152, 179, 180, 182, 200, 201, 210, 318, 320, 321, 332, 338, 348, 362, 380, 451, 452, 462, 480, 482, 490, 548, 549, 649, 1002, 1012, 1020, 1021, 1049, 1102, 1111, 1188, 1200, 1201, 1429, 1488, 1498, 1518, 1520
Offset: 1

Views

Author

Colin Barker, Nov 06 2016

Keywords

Comments

The actual squares are listed in A277948. - M. F. Hasler, Nov 12 2017
Includes 2*10^n+10^m for all n <> m. - Robert Israel, Nov 13 2017
For any term of q digits, the first m digits don't exceed (2 * 10^m - 2) / 3 = 666..66 (m 6's) for 1 <= m <= q. - David A. Corneth, Nov 13 2017
A term a(n) is in the sequence if and only if a(n)*10^k is in the sequence, for all k >= 0. If a(n) = (x*10^k + y)*10^m with 2xy < 10^k, then (y*10^k+x)*10^m' is also in the sequence, for all m'. - M. F. Hasler, Nov 13 2017

Crossrefs

Programs

  • Maple
    select(n -> max(convert(n^2,base,10))=4, [$1..10000]); # Robert Israel, Nov 13 2017
  • PARI
    L=List(); for(n=1, 10000, if(vecmax(digits(n^2))==4, listput(L, n))); Vec(L)

Formula

a(n) = sqrt(A277948(n)), where sqrt = A000196 or A000194 or A003059. - M. F. Hasler, Nov 12 2017
Showing 1-10 of 51 results. Next