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.

A153816 a(n) = Sum_{i=1..(10^n-1)/9} floor(((10^n-1)/9)/i).

This page as a plain text file.
%I A153816 #36 Oct 23 2023 17:25:48
%S A153816 1,29,542,7967,105225,1308095,15639310,181976675,2075608136,
%T A153816 23314508721,258729364359,2843136431305,30989792180446,
%U A153816 335482200606705,3610664794156597,38665075822637767,412235037037411453,4378193158484415385,46340359465948601163
%N A153816 a(n) = Sum_{i=1..(10^n-1)/9} floor(((10^n-1)/9)/i).
%C A153816 Generalized subsequences of A006218(n) are a(n) = A006218(T*A002275(n)), where T >= 1, a(n) = Sum_{i=1...n} floor(T*(10^n - 1)/9*i). For T=9 we have A095256, for T=1 this sequence. The motivation for such sequences is to count the elements of length n in a multiplication matrix m*m in base (T+1). In base 10 this gives T=9 and the number of elements of the multiplication matrix m*m of the length n=1,2,3,... digits is given by the sequence b(n) = a(n) - a(n-1), n >= 2, a(1)=23.
%H A153816 Chai Wah Wu, <a href="/A153816/b153816.txt">Table of n, a(n) for n = 1..26</a>
%F A153816 a(n) = A006218(A002275(n)).
%t A153816 A153816[n_] := Sum[Floor[((10^n - 1)/9)/i], {i, (10^n - 1)/9}]; Array[A153816, 7] (* _JungHwan Min_, Feb 05 2017 *)
%o A153816 (PARI) a(n) = sum(i=1, (10^n-1)/9, ((10^n-1)/9)\i); \\ _Michel Marcus_, Jun 08 2018
%o A153816 (Python)
%o A153816 def a(n): t = (10**n-1)//9; return sum(t//i for i in range(1, t+1))
%o A153816 print([a(n) for n in range(1, 10)]) # _Michael S. Branicky_, Jan 29 2021
%o A153816 (Python)
%o A153816 from math import isqrt
%o A153816 def A153816(n): return -(s:=isqrt(m:=(10**n-1)//9))**2+(sum(m//k for k in range(1,s+1))<<1) # _Chai Wah Wu_, Oct 23 2023
%Y A153816 Cf. A000005, A095256, A006218, A002275.
%K A153816 nice,nonn
%O A153816 1,2
%A A153816 _Ctibor O. Zizka_, Jan 02 2009
%E A153816 Formula corrected by _Giovanni Resta_, Feb 05 2009
%E A153816 a(9)-a(17) from _Donovan Johnson_, Sep 06 2010
%E A153816 a(18)-a(19) from _Hiroaki Yamanouchi_, Jul 06 2014