login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Smallest multiple of n such that every partial sum is a prime, or 0 if no such number exists.
2

%I #6 Dec 10 2024 20:11:46

%S 2,0,3,8,10,6,14,16,54,50,66,12,52,14,30,16,68,18,304,80,84,22,92,48,

%T 250,104,108,28,174,90,558,96,66,170,490,144,296,76,78,80,574,42,258,

%U 308,360,138,94,192,686,150,102,52,318,378,110,280,228,116,708,120,976

%N Smallest multiple of n such that every partial sum is a prime, or 0 if no such number exists.

%C 0 occurs only once as a(2).

%H Andrew Howroyd, <a href="/A074104/b074104.txt">Table of n, a(n) for n = 1..10000</a>

%o (PARI) lista(n)={my(a=vector(n), s=2); a[1]=s; for(n=3, n, my(m=n); while(!isprime(s+m), m+=n); a[n]=m; s+=m); a} \\ _Andrew Howroyd_, Dec 10 2024

%Y Cf. A084665.

%K nonn

%O 1,1

%A _Amarnath Murthy_, Aug 22 2002