Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A103507
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A103507 a(n) = Least i > 1, such that 2n+1 = 2*A000040(i)+A000040(k) for some k>1, 0 if no such i exists. +0
4
0, 0, 0, 2, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 4, 3, 2, 2, 3, 3, 2, 4, 2, 2, 3, 2, 4, 3, 2, 4, 3, 2, 2, 3, 3, 2, 4, 2, 2, 3, 3, 2, 4, 2, 8, 3, 2, 4, 3, 5, 2, 5, 2, 2, 3, 2, 2, 3, 2, 4, 3, 5, 4, 5, 5, 2, 5, 2, 6, 3, 2, 2, 3, 3, 4, 4, 2, 2, 3, 3, 2, 4, 3, 2, 4, 2, 6, 3, 2, 4, 3, 2, 2, 3, 3, 4, 4, 2, 2, 3, 2, 2, 3, 3, 4, 4, 5, 2 (list; graph; listen)
OFFSET

1,4

EXAMPLE

For n < 4 there are no such primes, thus a(1)-a(3)=0. For n=4, 2*4+1 = 9 = 2*3+3 and 3=A000040(2), thus a(4)=2. For n=7, 2*7+1 = 15 = 2*5+5 and 5=A000040(3), thus a(7)=3.

MATHEMATICA

Do[m = 3; While[ ! (PrimeQ[m] && ((n - 2*m) > 2) && PrimeQ[n - 2*m]), m = m + 2]; k = PrimePi[m]; Print[k], {n, 9, 299, 2}]

PROGRAM

(Scheme, with Aubrey Jaffer's SLIB Scheme library from http://www.swiss.ai.mit.edu/~jaffer/SLIB.html )

(define (A103507 n) (let loop ((i 2)) (let ((p1 (A000040 i))) (cond ((>= p1 n) 0) ((prime? (+ 1 (* 2 (- n p1)))) i) (else (loop (+ 1 i)))))))

CROSSREFS

a(n) = A049084(A103153(n)), for n >= 4. Can be used to compute A103153 and A103508. Cf. A103509.

Sequence in context: A135592 A022912 A022922 this_sequence A085694 A160493 A091322

Adjacent sequences: A103504 A103505 A103506 this_sequence A103508 A103509 A103510

KEYWORD

nonn

AUTHOR

Lei Zhou (lzhou5(AT)emory.edu), Feb 09 2005

EXTENSIONS

Edited, Scheme-code added and starting offset changed from 0 to 1 by Antti Karttunen (His-Firstname.His-Surname(AT)gmail.com), Jun 19 2007

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research