login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(0) = 1, a(n) for n > 0 is the smallest number > a(n-1) such that a(n)-a(k) is nonprime for 0 <= k < n.
3

%I #17 Jan 28 2023 12:09:43

%S 1,2,10,11,26,35,36,50,56,86,92,101,116,122,126,134,146,156,170,176,

%T 188,196,206,218,236,248,254,260,266,290,296,302,310,311,320,326,336,

%U 344,356,362,376,386,392,396,404,416,426,446,452,470,476,482,486,494

%N a(0) = 1, a(n) for n > 0 is the smallest number > a(n-1) such that a(n)-a(k) is nonprime for 0 <= k < n.

%C a(0) = 1, a(3) = 11, a(5) = 35, a(11) = 101 and a(33) = 311 are the only odd elements <= 10^6 and probably the only ones. If so, then for n >= 34, a(n) is the smallest even k >= a(n-1)+4 for which none of k-1, k-11, k-35, k-101 or k-311 is prime. - _David W. Wilson_, Dec 14 2006

%H D. W. Wilson, <a href="/A072545/b072545.txt">Table of n, a(n) for n = 0..10000</a>

%e 26 is the smallest number > 11 which differs from 1, 2, 10, 11 by a nonprime (25, 24, 16, 15), so 26 is the next term after 11.

%o (PARI) print1(a=1,","); v=[1]; n=1; while(n<55,a++; k=1; while(k<=n&&!isprime(a-v[k]), k++); if(k>n,n++; v=concat(v,a); print1(a,",")))

%Y Cf. A025043, A025044, A068638, A084834, A254337.

%K nonn

%O 0,2

%A _Amarnath Murthy_, Aug 04 2002

%E Edited and extended by _Klaus Brockhaus_, Aug 09 2002