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!)
A202338 Smallest Fibonacci number which when appended to n produces a prime number. 1

%I #14 Feb 28 2020 18:03:51

%S 1,3,1,1,3,1,1,3,377,1,3,13,1,89,1,3,3,1,1,89,1,3,3,1,1,3,1,1,3,89,1,

%T 21,1,13,3,13,3,3,89,1,233,1,1,3,13,1,21,13,1,3,13,1,233,1,21,3,1,13,

%U 3,1,3,21,1,1,3,1,3,3,1,1,21,13,3,3,1,1,3,233

%N Smallest Fibonacci number which when appended to n produces a prime number.

%H Michel Lagneau, <a href="/A202338/a202338.txt">Table of n, a(n) for n = 1..5000</a>

%e a(9) = 377 because 9 concatenated with 377 gives the prime 9377.

%p with(combinat,fibonacci):for n from 1 to 80 do: i:=0:for m from 1 to 2000 while(i=0) do:p:=fibonacci(m): nn:=length(p): x:=n*10^nn+p: if type(x,prime)=true then i:=1: printf(`%d, `,p):else fi:od:od:

%t f[n_]:=Block[{p=1,a=IntegerDigits[n]},While[!PrimeQ[FromDigits[Join[a,IntegerDigits[Fibonacci[p]]]]],p++];Fibonacci[p]];Table[f[n],{n,92}]

%t With[{fibs=Fibonacci[Range[20]],nn=80},Table[SelectFirst[fibs,PrimeQ[ n*10^ IntegerLength[ #]+ #]&],{n,nn}]] (* _Harvey P. Dale_, Feb 28 2020 *)

%Y Cf. A000045.

%K nonn,base

%O 1,2

%A _Michel Lagneau_, Dec 17 2011

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 April 25 06:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)