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.

A376614 a(n) is the least n-gonal number that is an interprime, i.e. the average of two consecutive primes.

This page as a plain text file.
%I A376614 #8 Sep 30 2024 12:56:35
%S A376614 6,4,12,6,18,21,9,370,30,12,405,39,15,45,231,18,2619,2772,21,205,596,
%T A376614 69,72,26,154,81,574,30,441,93,315,34,102,105,108,111,39,1377,120,42,
%U A376614 1485,129,45,1990,138,465,144,50,150,4564,515,19684,1120,56,334,846,861,60,180,5474,186,64,192,195
%N A376614 a(n) is the least n-gonal number that is an interprime, i.e. the average of two consecutive primes.
%C A376614 a(n) is the first number of the form ((n-2)*k^2 - (n-4)*k)/2 for k >= 0 that is in A024675.
%C A376614 a(n) = n if n is in A024675.
%H A376614 Robert Israel, <a href="/A376614/b376614.txt">Table of n, a(n) for n = 3..10000</a>
%e A376614 a(5) = 12 because 12 = A000326(3) is a pentagonal number and is the average of consecutive primes 11 and 13, and neither of the previous pentagonal numbers (1 and 5) are averages of consecutive primes.
%p A376614 f:= proc(s) local n,x;
%p A376614    for n from 1 do
%p A376614      x:= ((s-2)*n^2 - (s-4)*n)/2;
%p A376614      if x >= 4 and not isprime(x) and prevprime(x) + nextprime(x) = 2*x then return x fi
%p A376614    od
%p A376614 end proc:
%p A376614 map(f, [$3..100]);
%Y A376614 Cf. A024675, A000326, A086270.
%K A376614 nonn
%O A376614 3,1
%A A376614 _Robert Israel_, Sep 29 2024