%I #19 Feb 14 2021 08:05:02
%S 13,17,20,23,24,34,40,82,126,200,612,1154,1692,2434,2806,3060,3142,
%T 4052,4460,4596,5020,5908,6424,7304,7596,8030,8040,9044,11398,12254,
%U 12914,13412,13716,16006,16800,18560,22438,23140,24424,24746,25706,28318,29272,30580
%N Numbers m such that there exists a j for which m = Sum_{k=1..j} (m mod k), where k runs through the largest j primes less than m.
%H Paolo P. Lava, <a href="/A274422/b274422.txt">Table of n, a(n) for n = 1..250</a>
%H Paolo P. Lava, <a href="/A274422/a274422.txt">First 200 terms with the number of primes j</a>
%e 13 mod 11 + 13 mod 7 + 13 mod 5 + 13 mod 3 + 13 mod 2 = 2 + 6 + 3 + 1 + 1 = 13;
%e 40 mod 37 + 40 mod 31 + 40 mod 29 + 40 mod 23 = 3 + 9 + 11 + 17 = 40.
%p P:=proc(q) local a,b,k,n; for n from 3 to q do a:=0; b:=prevprime(n);
%p while n>a do a:=a+(n mod b); if b>2 then b:=prevprime(b); else break; fi; od;
%p if n=a then print(n); fi; od; end: P(10^9);
%Y Cf. A000040, A024934, A274423, A274424.
%K nonn,easy
%O 1,1
%A _Paolo P. Lava_, Jun 21 2016