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.

A247177 Primes p with property that the sum of the squares of the successive gaps between primes <= p is a prime number.

Original entry on oeis.org

5, 13, 29, 41, 89, 97, 139, 173, 179, 263, 269, 281, 307, 337, 353, 431, 439, 461, 487, 499, 509, 569, 607, 613, 641, 643, 661, 709, 739, 761, 809, 823, 839, 857, 919, 941, 967, 991, 1031, 1039, 1061, 1117, 1129, 1163, 1171, 1201, 1229, 1277, 1381, 1399
Offset: 1

Views

Author

Abhiram R Devesh, Nov 22 2014

Keywords

Comments

If A074741(n) is prime, then prime(n+1) is in this sequence. - Michel Marcus, Jan 12 2015

Examples

			a(1)=5; primes less than or equal to 5: [2, 3, 5]; squares of prime gaps: [1, 4]; sum of squares of prime gaps: 5.
a(2)=13; primes less than or equal to 13: [2, 3, 5, 7, 11, 13]; squares of prime gaps: [1, 4, 4, 16, 4]; sum of squares of prime gaps: 29.
		

Crossrefs

Cf. A074741 (sum of squares of gaps between consecutive primes).

Programs

  • PARI
    listp(nn) = {my(s = 0); my(precp = 2); forprime (p=3, nn, if (isprime(ns = (s + (p - precp)^2)), print1(p, ", ")); s = ns; precp = p;);} \\ Michel Marcus, Jan 12 2015
  • Python
    from sympy import nextprime, isprime
    p = 2
    s = 0
    while s < 8000:
        np = nextprime(p)
        if isprime(s):
            print(p)
        d = np - p
        s += d*d
        p = np
    

A135406 Sum of squares of gaps between consecutive semiprimes.

Original entry on oeis.org

4, 13, 14, 30, 31, 67, 68, 77, 78, 127, 128, 129, 138, 139, 188, 197, 201, 217, 221, 222, 238, 247, 263, 288, 297, 322, 331, 332, 333, 349, 353, 354, 355, 476, 501, 517, 526, 527, 531, 532, 533, 569, 585, 586, 635, 636, 637, 641, 642, 723, 732, 733, 737, 762
Offset: 1

Views

Author

Jonathan Vos Post, Dec 09 2007

Keywords

Comments

This is to semiprimes A001358 as A074741 is to primes A000040. What is the semiprime analog of D. R. Heath-Brown's conjecture: Sum_{prime(n)<=N} (prime(n)-prime(n-1))^2 ~ 2*N*log(N) and Marek Wolf's conjecture: Sum_{prime(n)A000720(n).

Examples

			a(10) = (6-4)^2 + (9-6)^2 + (10-9)^2 + (14-10)^2 + (15-14)^2 + (21-15)^2 + (22-21)^2 + (25-22)^2 + (26-25)^2 + (33-26)^2 = (2^2) + (3^2) + (1^2) + (4^2) + (1^2) + (6^2) + (1^2) + (3^2) + (1^2) + (7^2) = 127.
		

Crossrefs

Programs

  • Maple
    A001358 := proc(n) option remember ; local a ; if n = 1 then 4; else for a from A001358(n-1)+1 do if numtheory[bigomega](a) = 2 then RETURN(a) ; fi ; od: fi ; end: A065516 := proc(n) A001358(n+1)-A001358(n) ; end: A135406 := proc(n) add( (A065516(k))^2,k=1..n) ; end: seq(A135406(n),n=1..80) ; # R. J. Mathar, Jan 07 2008
  • Mathematica
    Accumulate[Differences[Select[Range[200],PrimeOmega[#]==2&]]^2] (* Harvey P. Dale, Mar 05 2015 *)

Formula

a(n) = SUM[k=1..n] A065516(k)^2 = SUM[k=1..n] (A001358(n+1) - A001358(n))^2.

Extensions

More terms from R. J. Mathar, Jan 07 2008
Showing 1-2 of 2 results.