A111651 n appears 3n times.
1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 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, 6, 6, 6, 6, 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, 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, 8, 8, 8, 8, 8
Offset: 1
Links
- Kevin Ryde, Table of n, a(n) for n = 1..10000
- Michael Somos, Introduction to Ramanujan theta functions
- Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
Programs
-
Mathematica
Table[PadRight[{},3n,n],{n,10}]//Flatten (* Harvey P. Dale, Sep 15 2021 *)
-
PARI
{a(n)=if(n<1, 0, polcoeff( x/(1-x)*prod(k=1, n\3, (1-x^(3*k))^(-1)^k, 1+O(x^n)), n))} /* Michael Somos, Aug 31 2006 */
-
PARI
a(n) = sqrtint(24*n) \/ 6; \\ Kevin Ryde, Aug 31 2024
-
Python
from math import isqrt def A111651(n): return isqrt((n<<3)//3)+1>>1 # Chai Wah Wu, Oct 05 2024
Formula
Expansion of (q/(1-q))psi(q^3) in powers of q where psi() is a Ramanujan theta function. - Michael Somos, Aug 31 2006
G.f.: x/(1-x)*Product_{k>0} (1-x^(3k))^((-1)^k).
a(n) = round(sqrt((2/3)*n)) = A002024(ceiling(n/3)). - Kevin Ryde, Aug 31 2024
Comments