login
A073188
n appears 1+[n/3] times.
1
0, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19
OFFSET
0,3
COMMENTS
The PARI functions t1, t2 can be used to read a triangular array T(n,k) (n >= 0, 0 <= k <= floor(n/3)) by rows from left to right: n -> T(t1(n), t2(n)).
a(A001840(k) + j) = A001840(k), 0<=j < A008620(k). - Reinhard Zumkeller, Aug 01 2002
FORMULA
a(n) = floor(sqrt(6n+6)-3/2).
a(0)=0, then for n>=1 a(n) = 1+a(n-1-floor(a(n-1)/3)). - Benoit Cloitre, May 08 2017
From Natalia L. Skirrow, May 13 2025: (Start)
G.f.: (f(x,x^2) + psi(x^3)-2) / (1-x), where f is Ramanujan's bivariate theta function and psi(x)=f(x,x^3), where f(x,x^2) is the unsigned analogue of Euler's pentagonal number theorem (see A010815).
G.f.: (Sum_{n>=1} x^(n*(3*n-1)/2) * (1+x^n+x^(2*n))) / (1-x).
G.f.: x * (1+3*x^2*y-4*x^3*y) / ((1-x) * (1-x^3*y))^2 (as an array). (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2+sqrt(3))/(2*sqrt(3)) + (3-sqrt(3))*Pi/18. - Amiram Eldar, May 28 2025
MATHEMATICA
Flatten[Table[c=1+Floor[n/3]; Table[n, {c}], {n, 0, 20}]] (* Harvey P. Dale, Nov 01 2013 *)
PROG
(PARI) a(n)=floor(sqrt(6*n+6)-3/2)
(PARI) t1(n)=floor(sqrt(6*n+6)-3/2) /* A073188 */
(PARI) t2(n)=(n-3*binomial(1+t1(n)\3, 2))%(t1(n)\3+1) /* A073189 */
(PARI) a(n)=if(n<1, 0, a(n-a(n-1)\3-1)+1) \\ Benoit Cloitre, May 08 2017
(Magma) [Floor(Sqrt(6*n+6)-3/2): n in [0..50]]; // G. C. Greubel, May 29 2018
(Python) A073188=lambda n: isqrt(24*(n+1))-3>>1 # Natalia L. Skirrow, May 13 2025
CROSSREFS
Cf. A073189.
Sequence in context: A303601 A031247 A062575 * A269225 A217713 A047740
KEYWORD
nonn
AUTHOR
Michael Somos, Jul 19 2002
STATUS
approved