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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A178216 a(n)==p_(A178215(n)) mod p_n (0<=a(n)<=p_n-1). 1
1, 1, 4, 1, 10, 12, 1, 1, 22, 27, 1, 32, 10, 33, 27, 24, 1, 24, 8, 48, 72, 55, 39, 69, 44, 22, 16, 105, 44, 56, 14, 76, 87, 129, 22, 138, 85, 50, 82, 130, 69, 93, 18, 60, 135, 170, 105, 110, 225, 44 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

a(n) is the last residue modulo p_n in the minimal set of the first primes, which contains all residues modulo p_n.

Build the smallest set {prime(1),prime(2),...,prime(k)} of the first k consecutive primes such that the set {prime(1) mod prime(n), prime(2) mod prime(n),.. ,prime(k) mod prime(n)} contains all residues {0,1,2,...,prime(n)-1}. The a(n) = prime(k) mod prime(n). [From R. J. Mathar, Oct 25 2010]

LINKS

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

EXAMPLE

If n=3, then p_n=5 and {2,3,5,7,11,13,17,19} is the minimal set of the first primes, which contains all residues modulo 5. We have consecutive residues {2,3,0,2,1,3,2,4}. Therefore a(3)=4.

MAPLE

A178216 := proc(n) local p, k, modP, i ; p := ithprime(n) ; for k from 1 do modP := [seq( ithprime(j) mod p, j=1..k)] ; {seq(i, i=0..p-1)} minus convert(modP, set) ; if % = {} then return op(-1, modP) ; end if; end do: end proc: seq(A178216(n), n=1..50) ; [From R. J. Mathar, Oct 25 2010]

CROSSREFS

Cf. A000040 A178215.

Sequence in context: A213765 A182971 A062145 * A019213 A019128 A283433

Adjacent sequences:  A178213 A178214 A178215 * A178217 A178218 A178219

KEYWORD

nonn

AUTHOR

Vladimir Shevelev, May 22 2010

EXTENSIONS

a(10) corrected, more terms appended - R. J. Mathar, Oct 25 2010

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified June 28 09:49 EDT 2017. Contains 288813 sequences.