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.

A259361 n occurs 2n+2 times.

This page as a plain text file.
%I A259361 #24 Nov 07 2024 17:20:56
%S A259361 0,0,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,5,5,5,5,
%T A259361 5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,
%U A259361 7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
%N A259361 n occurs 2n+2 times.
%C A259361 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) = floor(obrt(n)).
%C A259361 a(n) gives (from the preceding comment) also the maximal number of parts of partitions of n with no part 1 and difference of parts at least two. See A003106, with the combinatorial interpretation of the sum of the Rogers-Ramanujan identity. - _Wolfdieter Lang_, Oct 29 2016
%H A259361 Reinhard Zumkeller, <a href="/A259361/b259361.txt">Table of n, a(n) for n = 0..10000</a>
%F A259361 a(n) = A000194(n+1)-1.
%F A259361 a(n) = floor((-1 + sqrt(1+4*n))/2). See the first comment above. - _Wolfdieter Lang_, Oct 29 2016
%t A259361 Flatten[Table[PadLeft[{}, 2n + 2, n], {n, 0, 8}]] (* _Alonso del Arte_, Jun 30 2015 *)
%t A259361 Table[Floor[(-1 + Sqrt[1 + 4 n])/2], {n, 0, 120}] (* _Michael De Vlieger_, Oct 31 2016 *)
%o A259361 (Haskell)
%o A259361 a259361 = floor . subtract (1 / 2) . sqrt . (+ 1 / 4) . fromIntegral
%o A259361 a259361_list = concat xss where
%o A259361    xss = iterate (\(xs@(x:_)) -> map (+ 1) (x : x : xs)) [0, 0]
%o A259361 -- _Reinhard Zumkeller_, Jul 09 2015
%o A259361 (Magma) [Floor((-1+Sqrt(1+4*n))/2): n in [0..85]]; // _Vincenzo Librandi_, Oct 30 2016
%o A259361 (Python)
%o A259361 from math import isqrt
%o A259361 def A259361(n): return (m:=isqrt(n-1)-1)+(n-1>m*(m+3)) if n else 0 # _Chai Wah Wu_, Nov 07 2024
%Y A259361 Cf. A000194, A002378.
%Y A259361 Cf. A003056.
%K A259361 nonn,easy
%O A259361 0,7
%A A259361 _Franklin T. Adams-Watters_, Jun 24 2015