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.

A114409 Length of all-prime chain of prime[n] + successive even pentagonal numbers.

This page as a plain text file.
%I A114409 #7 Jun 15 2016 09:21:30
%S A114409 1,2,3,2,1,2,4,1,2,4,1,2,1,2,1,2,4,4,2,1,1,1,2,2,2,1,1,1,1,4,1,2,2,1,
%T A114409 3,1,1,2,1,2,2,1,1,1,2,4,1,2,3,1,2,1,2,2,1,2,3,1,2,1,1,1,1,1,1,1,3,2,
%U A114409 1,1,1,3,1,1,1,2,4,1,4,2,4,2,1,1,1,2,1
%N A114409 Length of all-prime chain of prime[n] + successive even pentagonal numbers.
%C A114409 a(1) is undefined, as prime(1) is the only even prime, for which the length-5 chain is of 2 + successive odd pentagonal numbers A014632: 2 prime, 2+1 = 3 prime, 2+5 = 7 prime, 2+35 = 37 prime, 2+51 = 53 prime, but 2+117 = 119 = 7 * 17 nonprime. Pentagonal numbers A000326 = n*(3*n-1)/2 = 0, 1, 5, 12, 22, 35, 51, 70, 92, 117, 145, ... Even pentagonal numbers A014633 = 12, 22, 70, 92, 176, 210, 330, 376, 532, 590, 782, 852, 1080, ...
%F A114409 a(n) = k = length of chain prime[n] + A014633(1) + ... + A014633(k) such that each term in the chain is prime.
%e A114409 a(2) = 1 because prime(2) = 3 is prime, but prime(2) + EvenPent(1) = 3 + 12 = 15 = 3 * 5 is nonprime, giving a chain of just 1 successive prime.
%e A114409 a(3) = 2 because 5 is prime, prime(3) + EvenPent(1) = 5 + 12 = 17 is prime, but prime(3) + EvenPent(2) = 5 + 22 = 27 = 3^3 is nonprime, giving a chain of 2 successive primes.
%e A114409 a(4) = 3 because 7 is prime, 7+12 = 19 is prime, 7+22 = 29 is prime, but 7+70 = 77 = 7*11 is nonprime, for a chain of 3 successive primes.
%t A114409 evp = Select[#*(3*# - 1)/2 &@ Range[200], EvenQ]; a[n_] := Block[{s = Prime@n, c = 1}, While[PrimeQ[s + evp[[c]]], c++]; c]; a /@ Range[2, 90] (* _Giovanni Resta_, Jun 14 2016 *)
%Y A114409 Cf. A000040, A000326, A014633.
%K A114409 easy,nonn
%O A114409 2,2
%A A114409 _Jonathan Vos Post_, Feb 11 2006
%E A114409 Corrected and extended by _Giovanni Resta_, Jun 14 2016