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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A123123 Numbers n such that, modulo k with 2<=k<=n, only one of the residues is equal to 2. 0
5, 6, 7, 9, 13, 15, 19, 21, 25, 31, 33, 39, 43, 45, 49, 55, 61, 63, 69, 73, 75, 81, 85, 91, 99, 103, 105, 109, 111, 115, 129, 133, 139, 141, 151, 153, 159, 165, 169, 175, 181, 183, 193, 195, 199, 201, 213, 225, 229, 231, 235, 241, 243, 253, 259, 265, 271, 273, 279 (list; graph; refs; listen; history; internal format)
OFFSET

1,1

COMMENTS

From 7 on, sequence gives primes + two. This can be easily seen since the statement: 'numbers n such that there's only one k, 2<=k<=n, with n=2 (mod k)' is equivalent to the following: 'numbers n such that there's only one k, 2<=k<=n-2, that divides n-2'. So k|(n-2) and values of k: n and n-1 are not considered since don't divide n-2. But this 2nd statement is also the same as saying that n-2 is a prime number and so n = prime +2.

Essentially the same as A048974. - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Jun 18 2008

FORMULA

a(n) = p(n)+2 = A000040(n)+2 for n>=3 (p(3)=5>4).

PROG

(PARI) for(n=1, 500, if(sum(k=2, n, if(n%k==2, 1, 0))==1, print1(n, ", ")))

CROSSREFS

Sequence in context: A072956 A080708 A047576 * A092858 A138966 A184804

Adjacent sequences:  A123120 A123121 A123122 * A123124 A123125 A123126

KEYWORD

nonn

AUTHOR

Jared B. Ricks (jaredricks(AT)yahoo.com), Sep 24 2006

EXTENSIONS

Edited by Herman Jamke (hermanjamke(AT)fastmail.fm), Sep 24 2006

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

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

Last modified February 14 20:38 EST 2012. Contains 205663 sequences.