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.

A226241 Primes that cannot be reached from 2 via a chain of primes obtained adding or deleting a digit from the end or the beginning of the previous term of the chain.

This page as a plain text file.
%I A226241 #6 Jun 01 2013 03:04:09
%S A226241 89,101,103,107,109,151,163,227,251,257,263,269,281,307,389,401,409,
%T A226241 457,503,509,521,557,563,569,587,601,607,701,709,809,821,827,857,863,
%U A226241 881,887,907,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069
%N A226241 Primes that cannot be reached from 2 via a chain of primes obtained adding or deleting a digit from the end or the beginning of the previous term of the chain.
%C A226241 All the primes containing a 0 are members since a 0 cannot be added at the end (it is even) nor at the beginning since, for example, 02 and 0013 are not canonical representations. The sequence is infinite, since there are exactly 820293 other primes that can be reached from 2, the largest one being 5481899436575987524681453773937333.
%H A226241 Giovanni Resta, <a href="/A226241/b226241.txt">Table of n, a(n) for n = 1..1000</a>
%H A226241 Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_690.htm">Puzzle 690 - Unreachable Primes</a>
%e A226241 All the primes < 89 can be reached from 2. For example, 2 -> 23 -> 3 -> 37.
%t A226241 step[p_] := Block[{dn = 10^IntegerLength@p}, Select[ Union[{Floor[p/10], Mod[p, dn/10]}, p*10 + {1, 3, 7, 9}, Range[9]*dn + p], PrimeQ[#] &]]; old = {}; new = {2}; wrk = {}; While[new != {}, wrk = Flatten[step /@ new]; old = Union[new, old]; new = Complement[wrk, old]; Print["# = ", Length@old, "  max = ", Max[old], " new # = ", Length@new]]; Print["Missing up to 1000 = ", Complement[Prime@Range[168], old]]
%Y A226241 Cf. A226144, A050249.
%K A226241 nonn,base
%O A226241 1,1
%A A226241 _Giovanni Resta_, Jun 01 2013