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!)
A158971 a(n) is the smallest number m such that m n's + 1 is prime and zero if there is no such m. 1
1, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 3, 0, 1, 0, 0, 0, 3, 0, 1, 0, 1, 0, 3, 0, 0, 0, 1, 0, 3, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1950, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 1, 0, 2, 0, 0, 0, 1, 0, 2, 0, 1, 0, 1, 0, 0, 0, 3, 0, 1, 0, 2, 0, 1, 0, 0, 0, 87, 0, 1, 0, 2, 0, 2, 0, 0, 0, 1, 0, 5, 0, 1, 0, 1, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,8
COMMENTS
I. If n is an odd number greater than 1 then a(n)=0. II. If n is greater
than 4 and mod(m,10)=4 then a(n)=0. III. If n+1 is prime the a(n)=1.
LINKS
EXAMPLE
20+1 & 2020+1 aren't prime but 202020+1 is prime so a(20)=3. If n>4 and
mod(n,10)=4 then there is no number m such that m n's + 1 is prime because
5 divides all such numbers so a(n)=0.
MATHEMATICA
f[n_, m_]:=(v={}; Do[v=Join[v, IntegerDigits[n]], {k, m}]; FromDigits[v]);
a[n_]:=(If[n!=1&&n!=4&&(Mod[n, 10]==4||Mod[n, 2]==1), 0, For[m=1, !PrimeQ[f[n, m]
+1], m++ ]; m]); Do[Print[a[n]], {n, 104}]
CROSSREFS
Cf. A158972.
Sequence in context: A116857 A369934 A322338 * A121467 A366073 A362412
KEYWORD
nonn
AUTHOR
Farideh Firoozbakht, Apr 02 2009
STATUS
approved

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 19 09:23 EDT 2024. Contains 371782 sequences. (Running on oeis4.)