login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I

%S 1,2,9,10,13,16,17,22,25,26,29,34,36,37,41,43,50,55,56,57,58,61,65,70,

%T 77,78,82,85,89,91,93,94,96,97,99,105,106,116,121,122,125,127,129,133,

%U 134,136,137,139,142,145,148,149,153,156,160,161,162,163,173

%N 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).

%C a(n) seems to be asymptotic to c*n where 2.5<c<3.

%H Reinhard Zumkeller, <a href="/A078180/b078180.txt">Table of n, a(n) for n = 1..10000</a>

%t 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 *)

%o (Haskell)

%o a078180 n = a078180_list !! (n-1)

%o a078180_list = 1 : f 1 1 where

%o f x k = y : f y (k+1) where

%o y = head [z | z <- [x+1..], all (q z) $ take k a078180_list]

%o q u v = m > 0 || a010051 u' == 0 where (u',m) = divMod (u-1) v

%o -- _Reinhard Zumkeller_, Jan 09 2012

%K nice,nonn

%O 1,2

%A _Benoit Cloitre_ and _Paul D. Hanna_, Nov 20 2002

%E 80 = 79*1+1 removed by Jean-Fran├žois Alcover, Jan 11 2012

%E 90 = 89*1+1 replaced by missing 89 by _Reinhard Zumkeller_, Jan 11 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 28 07:30 EDT 2022. Contains 354112 sequences. (Running on oeis4.)