login
This site is supported by donations to The OEIS Foundation.

 

Logo

Many excellent designs for a new banner were submitted. We will use the best of them in rotation.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A181373 Least m>0 such that prime(n) divides S(m)=A007908(m)=123...m and all numbers obtained by cyclic permutations of its digits; 0 if no such m exists. 2
0, 2, 0, 100, 106, 120, 196, 102, 542, 400, 181, 21, 216, 372 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

The first three primes 2, 3 and 5 are particular cases, cf. examples. It happens that all other primes < 47 are in A180346 (and therefore have a(n)<1000). P=37 is the only one among them with a(n) < 100 (but m=123 is another possibility for this prime).

LINKS

Table of n, a(n) for n=1..14.

FORMULA

A007908( A181373(n) ) = 0 (mod A000040(n)).

EXAMPLE

For prime(1)=2, no such m can exist (consider e.g. the initial 1 is permuted to the end), therefore a(1)=0.

For prime(2)=3, we have S(2)=12 and the permutation 21 both divisible by 3, thus a(2)=2. (There are many m for which the divisibility property is satisfied; it is equivalent to 1+...+m=0 (mod 3), or equivalently the sum of all these digits is divisible by 3. Therefore, the permutations do not need to be checked.)

For prime(3)=5, similar to prime(1)=2, no such m can exist.

For prime(4)=7, it turns out the m=100 is the least possibility, i.e. 123...99100 and the permutations 234...991001, 345...9910012, ... 100123...99, (00)123...991, (0)123...9910 are all divisible by 7.

PROG

(PARI) A181373(p, LIM=999, MIN=1)={ p=prime(p); p!=2 & p!=5 & for(n=MIN, LIM, my(S=eval(concat(vector(n, i, Str(i)))), L=#Str(S)-1); S%p & next; for(k=1, L, (S=[1, 10^L]*divrem(S, 10)) % p & next(2)); return(n)) } /* highly unoptimized code, for illustration purpose */

CROSSREFS

Cf. A180346 and references there.

Sequence in context: A156485 A009270 A033838 * A046065 A003321 A012333

Adjacent sequences:  A181370 A181371 A181372 * A181374 A181375 A181376

KEYWORD

nonn,base,more

AUTHOR

M. F. Hasler and Marco Ripà, Jan 27 2011

STATUS

approved

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

Content is available under The OEIS End-User License Agreement .

Last modified April 19 21:10 EDT 2014. Contains 240777 sequences.