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.

A357030 a(n) is the number of integers in 0..n having nonincreasing digits.

This page as a plain text file.
%I A357030 #56 Mar 04 2024 08:51:20
%S A357030 1,2,3,4,5,6,7,8,9,10,11,12,12,12,12,12,12,12,12,12,13,14,15,15,15,15,
%T A357030 15,15,15,15,16,17,18,19,19,19,19,19,19,19,20,21,22,23,24,24,24,24,24,
%U A357030 24,25,26,27,28,29,30,30,30,30,30,31,32,33,34,35,36,37,37,37,37,38,39,40
%N A357030 a(n) is the number of integers in 0..n having nonincreasing digits.
%e A357030 a(20) = 13 because there are 13 numbers in 0..20 whose digits are in nonincreasing order: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20.
%p A357030 a:= proc(n) option remember; `if`(n<0, 0, a(n-1)+`if`(
%p A357030      (l-> is(l=sort(l)))(convert(n, base, 10)), 1, 0))
%p A357030     end:
%p A357030 seq(a(n), n=0..72);  # _Alois P. Heinz_, Sep 12 2022
%t A357030 Accumulate @ Table[If[GreaterEqual @@ IntegerDigits[n], 1, 0], {n, 0, 72}] (* _Amiram Eldar_, Sep 10 2022 *)
%o A357030 (PARI) a(n) = sum(k=0, n, my(d=digits(k)); d == vecsort(d,,4)); \\ _Michel Marcus_, Sep 10 2022
%Y A357030 Cf. A009996.
%K A357030 nonn,base
%O A357030 0,2
%A A357030 _Osman Mustafa Quddusi_, Sep 09 2022