cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A290845 a(1) = 1; a(n) = Sum_{k=1..n} a(ceiling((n-1)/k)).

This page as a plain text file.
%I A290845 #10 Apr 29 2025 20:30:55
%S A290845 1,2,4,8,14,24,36,56,78,110,148,200,254,334,416,522,644,798,954,1162,
%T A290845 1372,1640,1934,2284,2636,3090,3556,4106,4694,5394,6096,6972,7850,
%U A290845 8882,9972,11220,12500,14048,15598,17360,19208,21346,23486,26016,28548,31436,34478,37874,41272,45246
%N A290845 a(1) = 1; a(n) = Sum_{k=1..n} a(ceiling((n-1)/k)).
%F A290845 a(n) = 2*A003318(n-1) for n > 1.
%e A290845 a(1) = 1;
%e A290845 a(2) = a(ceiling(1/1)) + a(ceiling(1/2)) = a(1) + a(1) = 2;
%e A290845 a(3) = a(ceiling(2/1)) + a(ceiling(2/2)) + a(ceiling(2/3)) = a(2) + a(1) + a(1) = 4, etc.
%t A290845 a[1] = 1; a[n_] := a[n] = Sum[a[Ceiling[(n - 1)/k]], {k, 1, n}]; Table[a[n], {n, 50}]
%o A290845 (Python)
%o A290845 from functools import lru_cache
%o A290845 @lru_cache(maxsize=None)
%o A290845 def A290845(n):
%o A290845     if n == 1:
%o A290845         return 1
%o A290845     c, j, k1 = n, 1, n-2
%o A290845     while k1 > 1:
%o A290845         j2 = (n-2)//k1 + 1
%o A290845         c += (j2-j)*A290845(k1+1)>>1
%o A290845         j, k1 = j2, (n-2)//j2
%o A290845     return c-j<<1 # _Chai Wah Wu_, Apr 29 2025
%Y A290845 Cf. A003318, A025523, A068336 (first differences), A078346.
%K A290845 nonn
%O A290845 1,2
%A A290845 _Ilya Gutkovskiy_, Aug 12 2017