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.
%I A249808 #27 Mar 04 2020 20:18:59 %S A249808 0,1,0,1,1,0,2,1,0,0,2,1,1,0,0,3,1,1,0,0,0,3,1,1,1,0,0,0,4,1,1,1,0,0, %T A249808 0,0,4,2,1,1,0,0,0,0,0,5,2,1,1,0,0,0,0,0,0,5,2,1,1,1,0,0,0,0,0,0,6,2, %U A249808 1,1,1,0,0,0,0,0,0,0,6,2,1,1,1,1,0,0,0,0,0,0,0,7,2,1,1,1,1,0,0,0,0,0,0,0,0,7,3,1,1,1,1,0,0,0,0,0,0,0,0,0 %N A249808 Triangular table read by rows, a lower right triangular region of square array A(n,k) is the number of times prime p_k has occurred as the smallest prime factor of numbers 1..n. %C A249808 Table is read by taking n terms from the beginning of row n: A(1,1), A(2,1), A(2,2), A(3,1), A(3,2), A(3,3), ... %C A249808 See also A249809 for a version with extra zeros removed. %H A249808 Antti Karttunen, <a href="/A249808/b249808.txt">Table of n, a(n) for n = 1..10440; the first 144 rows of triangular table</a> %F A249808 If row n = 1, A(n,k) = 0, otherwise A(n,k) = A(n-1,k) + [A055396(n) = k], where the subexpression with the Iverson bracket is 1 if the index of the smallest prime dividing n is equal to k, and 0 otherwise. This is a formula for a full square array containing mostly zeros. The terms of this sequence are those collected from the lower right triangle of that square array. %F A249808 For n > 1, A078898(n) = A(n, A055396(n)). %e A249808 The first eleven rows of this triangular table: %e A249808 0; %e A249808 1, 0; %e A249808 1, 1, 0; %e A249808 2, 1, 0, 0; %e A249808 2, 1, 1, 0, 0; %e A249808 3, 1, 1, 0, 0, 0; %e A249808 3, 1, 1, 1, 0, 0, 0; %e A249808 4, 1, 1, 1, 0, 0, 0, 0; %e A249808 4, 2, 1, 1, 0, 0, 0, 0, 0; %e A249808 5, 2, 1, 1, 0, 0, 0, 0, 0, 0; %e A249808 5, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0; %e A249808 ... %t A249808 FoldList[Append[MapAt[# + 1 &, #1, PrimePi@ FactorInteger[#2][[1, 1]]], 0] &, {0}, Range[2, 15]] // Flatten (* _Michael De Vlieger_, Nov 24 2017 *) %o A249808 (Scheme) %o A249808 (define (A249808 n) (A249808bi (A002024 n) (A002260 n))) %o A249808 (define (A249808bi row col) (if (= 1 row) 0 (+ (A249808bi (- row 1) col) (if (= (A055396 row) col) 1 0)))) %Y A249808 A249809 is a more compact version. %Y A249808 A004526 gives the left edge, A001477 the row sums. %Y A249808 Cf. A000040, A020639, A055396, A078898, A002024, A002260. %K A249808 nonn,tabl %O A249808 1,7 %A A249808 _Antti Karttunen_, Nov 06 2014