cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A103509 a(n) is the least j such that 2n+1 = 2*A000040(k) + A000040(j) for some k > 1, or 0 if no such j exists.

Original entry on oeis.org

0, 0, 0, 2, 3, 2, 3, 2, 3, 4, 6, 2, 3, 2, 3, 4, 6, 2, 3, 2, 3, 4, 6, 2, 3, 4, 7, 5, 6, 2, 3, 2, 3, 4, 6, 5, 6, 2, 3, 4, 12, 2, 3, 2, 3, 4, 6, 2, 3, 4, 7, 5, 6, 2, 3, 4, 10, 5, 6, 2, 3, 2, 3, 4, 6, 5, 6, 2, 3, 4, 12, 2, 3, 2, 3, 4, 6, 5, 6, 2, 3, 4, 18, 2, 3, 4, 7, 5, 6, 2, 3, 4, 10, 5, 6, 15, 7, 2, 3, 4, 12, 2, 3, 2, 3
Offset: 1

Views

Author

Lei Zhou, Feb 10 2005

Keywords

Examples

			For n < 4 there are no such primes, thus a(1)=a(2)=a(3)=0.
For n=4, 2*4+1 = 9 = 2*3+3 and 3=A000040(2), thus a(4)=2.
For n=11, 2*11+1 = 23 = 13+2*5 and 13=A000040(6), thus a(11)=6.
		

Crossrefs

Can be used to compute A103506 and A103510. Cf. A103507.

Programs

  • Mathematica
    Do[m = 3; While[ ! (PrimeQ[m] && (((n - m)/2) > 2) && PrimeQ[(n - m)/2]), m = m + 2]; k = PrimePi[m]; Print[k], {n, 9, 299, 2}]
  • PARI
    A103509(n) = if(n<=3,0,my(o=n+n+1); for(i=2,oo, if(isprime((o-prime(i))/2),return(i)))); \\ Antti Karttunen, Mar 30 2021

Formula

a(n) = A049084(A103506(n)), for n >= 4.

Extensions

Edited by Antti Karttunen, Jun 19 2007

A103508 a(n) = 1 + 2 * least i such that A103507(i)=n+1, 0 if no such i exists.

Original entry on oeis.org

9, 15, 31, 101, 139, 227, 91, 503, 995, 451, 751, 539, 1819, 1397, 2957, 3461, 1831, 1417, 6023, 3769, 1777, 9587, 5411, 9421, 18653, 8089, 4511, 6541, 10529, 16051, 19049, 13163, 3139, 22937, 23929, 43363, 24919, 43571, 97367, 55571, 14419, 75209
Offset: 1

Views

Author

Lei Zhou, Feb 10 2005

Keywords

Crossrefs

Programs

  • Scheme
    (define (A103508 n) (+ 1 (* 2 (first-n-where-fun_n-is-i1 A103507 (+ 1 n)))))
    (define (first-n-where-fun_n-is-i1 fun i) (let loop ((n 1)) (cond ((= i (fun n)) n) (else (loop (+ n 1))))))

Extensions

Edited and Scheme-code added by Antti Karttunen, Jun 19 2007
Showing 1-2 of 2 results.