%I #17 May 26 2023 15:27:33
%S 0,0,1,1,1,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,
%T 5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,
%U 7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9
%N For k = 0, 1, 2, 3, ... write k prime(k+1) times.
%C a(n) = k is the largest k with sum of primes A007504(k) <= n. - _Kevin Ryde_, Apr 19 2022
%D J.-P. Delahaye, Des suites fractales d’entiers, Pour la Science, No. 531 January 2022. Sequence g) p. 82.
%F a(n) = A083375(n+1) - 1. - _Peter Munn_, May 26 2023
%p a:=[];
%p for n from 0 to 10 do a:=[op(a), seq(n,i=1..ithprime(n+1))]; od:
%p a; # _N. J. A. Sloane_, Dec 18 2021
%o (Python)
%o from itertools import count, islice, chain
%o from sympy import prime
%o def A350174gen(): return chain.from_iterable([k]*prime(k+1) for k in count(0))
%o A350174_list = list(islice(A350174gen(),50)) # _Chai Wah Wu_, Dec 19 2021
%Y Cf. A000040, A007504.
%Y Essentially the same as A083375.
%K nonn,easy
%O 0,6
%A _Michel Marcus_, Dec 18 2021