login
A078180
a(n) = smallest integer that can't be written as p*a(i)+1, for any prime p and 0<i<n, where a(1)=1 and a(n) > a(n-1).
1
1, 2, 9, 10, 13, 16, 17, 22, 25, 26, 29, 34, 36, 37, 41, 43, 50, 55, 56, 57, 58, 61, 65, 70, 77, 78, 82, 85, 89, 91, 93, 94, 96, 97, 99, 105, 106, 116, 121, 122, 125, 127, 129, 133, 134, 136, 137, 139, 142, 145, 148, 149, 153, 156, 160, 161, 162, 163, 173
OFFSET
1,2
COMMENTS
a(n) seems to be asymptotic to c*n where 2.5<c<3.
LINKS
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
Sequence in context: A031443 A344145 A051017 * A058890 A369205 A306998
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