%I #20 Mar 16 2022 10:34:39
%S 1,2,27,252,508,1037,2126,4335,8691,17527,35216,70560,141316,282692,
%T 565716,1132725,2266950,4534986,9071886,18144030,36291630,72592255,
%U 145199696,290402196,580831960,1161690161,2323409217,4646842021,9293718245,18587449461,37174954357,74350264838
%N a(n) = a(n-1) + s, where s is the least square >= a(n-1) and the first digit of s equals the first digit of a(n-1). a(0)=1.
%C The fitting formula for n >= 3 is a(n) = 252*2^(n-3) + K, where K = 0, 4, 29, 110, 303, 627, 1399, 2960, 6048, 12292, 24644, 49620, 100533, ... for n >= 3.
%C It appears that the distances between square roots of the squares s in {a(n)} are irregular; e.g., a(6) = 1 + 1^2 + 5^2 + 15^2 + 16^2 + 23^2 + 33^2.
%C There are variants of this sequence:
%C i) If s is the least positive integer >= a(n-1) and the first digit of s = first digit of a(n-1) then for a(0)=1 we have a(n) = 2^n.
%C ii) If s is the least even number >= a(n-1) and the first digit of s = first digit of a(n-1) then for a(0)=11 we have a(n) = 12*2^n - 1.
%C iii) If s is the least odd number >= a(n-1) and the first digit of s = first digit of a(n-1) then for a(0)=23 we have a(n) = 23*2^n + floor(2^n/3).
%C iv) I did not find simple formulas for sequences where s is the least Fibonacci, triangular, or factorial number >= a(n-1) and the first digit of s = first digit of a(n-1).
%e a(0)=1, s=1, a(1)=2, s=25, a(2)=27, s=225, a(3)=252, s=256, a(4)=508, etc.
%o (PARI) f(n) = if (issquare(n), n, my(d=digits(n)[1], k=sqrtint(n)+1); while(digits(k^2)[1] != d, k++); k^2);
%o lista(nn) = my(va = vector(nn)); va[1] = 1; for (n=2, nn, va[n] = va[n-1] + f(va[n-1]);); va; \\ _Michel Marcus_, Mar 15 2022
%K nonn,base
%O 0,2
%A _Ctibor O. Zizka_, Dec 03 2010
%E More terms from _Michel Marcus_, Mar 15 2022
|