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.

A260930 Differences between the numbers n such that n^2 + 2 is prime.

This page as a plain text file.
%I A260930 #11 Feb 16 2025 08:33:26
%S A260930 1,2,6,6,6,12,6,6,12,24,18,6,6,6,6,24,24,48,6,12,6,6,6,18,24,6,6,12,
%T A260930 24,6,12,6,6,12,30,6,6,12,6,6,24,24,12,36,6,6,12,30,6,42,24,6,18,12,
%U A260930 42,24,30,12,18,30,18,12,6,6,24,24,12,12,30,24,36,42,18
%N A260930 Differences between the numbers n such that n^2 + 2 is prime.
%C A260930 Sequence A067201 has the values of n. This sequence is the first differences of A067201.
%C A260930 a(n) is divisible by 6 for n>2.
%H A260930 Michel Lagneau, <a href="/A260930/b260930.txt">Table of n, a(n) for n = 1..10000</a>
%H A260930 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Near-SquarePrime.html">Near-Square Prime</a>
%e A260930 a(6)=12 because A067201(7) - A067201(6) = 33 - 21 = 12.
%p A260930 i0:=0:
%p A260930 for k from 1 to 1500 do:
%p A260930    p:=k^2+2:
%p A260930    if isprime(p) then printf(`%d, `,k-i0):i0:=k:
%p A260930    else
%p A260930    fi:
%p A260930 od:
%t A260930 Differences[Select[Range[1500], PrimeQ[2 + #^2] &, 100]]
%o A260930 (PARI) first(m)=my(u=vector(m+1),v=vector(m),r=0);for(i=1,m+1,while(!isprime(r^2 + 2),r++);u[i]=r;r++);for(i=1,m,v[i]=u[i+1]-u[i]);v; \\ _Anders Hellström_, Aug 14 2015
%Y A260930 Cf. A056899 (primes of the form n^2+2), A067201 (values of n).
%K A260930 nonn
%O A260930 1,2
%A A260930 _Michel Lagneau_, Aug 04 2015