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!)
A158972 a(n) is the smallest number m such that m n's - 1 is prime and zero if there is no such m. 1
0, 4, 1, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 2, 0, 1, 0, 0, 0, 3, 0, 1, 0, 1, 0, 2, 0, 0, 0, 1, 0, 3270, 0, 1, 0, 1, 0, 0, 0, 1, 0, 3, 0, 957, 0, 1, 0, 0, 0, 2, 0, 1, 0, 1, 0, 5853, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 2, 0, 1, 0, 783, 0, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
I. If m=1 or m is an odd number greater than 3 then a(m)=0. II. If m is greater
than 6 and mod(m,10)=6 then a(m)=0. III. If n-1 is prime the a(n)=1.
a(64) is greater than 4000.
LINKS
EXAMPLE
2-1, 22-1 & 222-1 aren't prime and 2222-1 is prime so a(2)=4. There is no m
such that m 16's -1 is prime because 5 divides all such numbers, so a(16)=0.
MATHEMATICA
f[n_, m_]:=(v={}; Do[v=Join[v, IntegerDigits[n]], {k, m}]; FromDigits[v]);
a[n_]:=(If[n!=3&&n!=6&&(Mod[n, 10]==6||Mod[n, 2]==1), 0, For[m=1, !PrimeQ[f[n, m]
-1], m++ ]; m]); Do[Print[a[n]], {n, 39}]
CROSSREFS
Cf. A158971.
Sequence in context: A299354 A117414 A085639 * A278987 A135302 A364026
KEYWORD
nonn,base
AUTHOR
Farideh Firoozbakht, Apr 02 2009
EXTENSIONS
a(64)-a(85) from Giovanni Resta, Apr 17 2017
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 11:14 EDT 2024. Contains 371791 sequences. (Running on oeis4.)