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.

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

This page as a plain text file.
%I A247177 #25 Jun 03 2020 12:13:21
%S A247177 5,13,29,41,89,97,139,173,179,263,269,281,307,337,353,431,439,461,487,
%T A247177 499,509,569,607,613,641,643,661,709,739,761,809,823,839,857,919,941,
%U A247177 967,991,1031,1039,1061,1117,1129,1163,1171,1201,1229,1277,1381,1399
%N A247177 Primes p with property that the sum of the squares of the successive gaps between primes <= p is a prime number.
%C A247177 If A074741(n) is prime, then prime(n+1) is in this sequence. - _Michel Marcus_, Jan 12 2015
%H A247177 Abhiram R Devesh, <a href="/A247177/b247177.txt">Table of n, a(n) for n = 1..1000</a>
%e A247177 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.
%e A247177 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.
%o A247177 (Python)
%o A247177 from sympy import nextprime, isprime
%o A247177 p = 2
%o A247177 s = 0
%o A247177 while s < 8000:
%o A247177     np = nextprime(p)
%o A247177     if isprime(s):
%o A247177         print(p)
%o A247177     d = np - p
%o A247177     s += d*d
%o A247177     p = np
%o A247177 (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
%Y A247177 Cf. A074741 (sum of squares of gaps between consecutive primes).
%K A247177 nonn,easy
%O A247177 1,1
%A A247177 _Abhiram R Devesh_, Nov 22 2014