OFFSET
1,2
COMMENTS
a(n) seems to be asymptotic to c*n where 2.5<c<3.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
MATHEMATICA
canBeWritten[an_, n_, ai_] := Resolve[ Exists[ p, Reduce[ an == p*ai + 1, p, Primes]]]; canBeWritten[an_, n_] := Or @@ (canBeWritten[an, n, #] & ) /@ Table[a[i], {i, 1, n-1}]; a[1] = 1; a[n_] := a[n] = (an = a[n-1]+1; While[ canBeWritten[an, n], an++]; an); Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Jan 11 2012 *)
PROG
(Haskell)
a078180 n = a078180_list !! (n-1)
a078180_list = 1 : f 1 1 where
f x k = y : f y (k+1) where
y = head [z | z <- [x+1..], all (q z) $ take k a078180_list]
q u v = m > 0 || a010051 u' == 0 where (u', m) = divMod (u-1) v
-- Reinhard Zumkeller, Jan 09 2012
CROSSREFS
KEYWORD
nice,nonn
AUTHOR
Benoit Cloitre and Paul D. Hanna, Nov 20 2002
EXTENSIONS
80 = 79*1+1 removed by Jean-François Alcover, Jan 11 2012
90 = 89*1+1 replaced by missing 89 by Reinhard Zumkeller, Jan 11 2012
STATUS
approved