|
|
A175529
|
|
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.
|
|
0
|
|
|
1, 2, 27, 252, 508, 1037, 2126, 4335, 8691, 17527, 35216, 70560, 141316, 282692, 565716, 1132725, 2266950, 4534986, 9071886, 18144030, 36291630, 72592255, 145199696, 290402196, 580831960, 1161690161, 2323409217, 4646842021, 9293718245, 18587449461, 37174954357, 74350264838
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
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.
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.
There are variants of this sequence:
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.
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.
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).
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).
|
|
LINKS
|
|
|
EXAMPLE
|
a(0)=1, s=1, a(1)=2, s=25, a(2)=27, s=225, a(3)=252, s=256, a(4)=508, etc.
|
|
PROG
|
(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);
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|