A338271 a(n) is the number of compositions of n, b_1 + ... + b_t = n such that sqrt(b_1 + sqrt(b_2 + ... + sqrt(b_t)...)) is an integer.
1, 0, 0, 2, 0, 2, 0, 2, 2, 4, 2, 6, 2, 8, 4, 14, 6, 20, 8, 28, 14, 44, 20, 66, 30, 96, 46, 146, 70, 220, 102, 326, 154, 490, 232, 740, 346, 1102, 520, 1652, 782, 2484, 1166, 3716, 1750, 5568, 2628, 8358, 3936, 12518, 5900, 18760, 8848, 28138, 13256, 42170
Offset: 1
Keywords
Examples
(Let s(k) = sqrt(k) for brevity.) For n = 14, the a(14) = 8 valid compositions are: 14 = 2+2+2+2+2+3+1 and 2 = s(2+s(2+s(2+s(2+s(2+s(3+s(1))))))) 14 = 1+7+2+3+1 and 2 = s(1+s(7+s(2+s(3+s(1))))) 14 = 2+1+7+3+1 and 2 = s(2+s(1+s(7+s(3+s(1))))) 14 = 2+2+1+8+1 and 2 = s(2+s(2+s(1+s(8+s(1))))) 14 = 2+2+2+2+2+4 and 2 = s(2+s(2+s(2+s(2+s(2+s(4)))))) 14 = 1+7+2+4 and 2 = s(1+s(7+s(2+s(4)))) 14 = 2+1+7+4 and 2 = s(2+s(1+s(7+s(4)))) 14 = 2+2+1+9 and 2 = s(2+s(2+s(1+s(9))))
Links
- Peter Kagey, Table of n, a(n) for n = 1..500
- Code Golf Stack Exchange, The square root of the square root of the square root of the...
Comments