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.

A178033 Lesser of a twin prime pair (p,p+2) such that permuting the digits of p and those of p+2 gives a different twin prime pair (q, q+2).

This page as a plain text file.
%I A178033 #25 Oct 25 2024 18:13:13
%S A178033 281,461,641,821,1031,1091,1229,1277,1301,1319,1427,1697,1721,1787,
%T A178033 1877,2081,2129,2381,2687,2711,2801,3119,3251,3257,3371,3467,3527,
%U A178033 3581,3821,3851,4091,4127,4157,4217,4241,4271,4421,4517,4637,4649,4721,4787,4931,4967,5231,5417,5477,5651
%N A178033 Lesser of a twin prime pair (p,p+2) such that permuting the digits of p and those of p+2 gives a different twin prime pair (q, q+2).
%C A178033 Permutations with initial zeros are disallowed, so that 101 is not a member (101,103 and 11,13); equivalently, we require that p is a permutation of the digits of q as well.
%H A178033 Hans Rudolf Widmer, <a href="/A178033/b178033.txt">Table of n, a(n) for n = 1..20000</a>
%e A178033 281 is a term as 281 is the lesser of the twin prime pair 281,283, and after permuting 821, 823 is also a twin prime pair.
%e A178033 1229 is a term as (1229,1231) is a twin prime pair and after permuting (2129, 2131) is also a twin prime pair.
%t A178033 perm@n_ :=
%t A178033  Select[FromDigits@# & /@
%t A178033    DeleteCases[Rest@Permutations@IntegerDigits@n, _?(First@# == 0 &)],
%t A178033    PrimeQ];
%t A178033 Cases[{#, perm@# & /@ #} & /@
%t A178033   Cases[6*# + {-1, 1} & /@
%t A178033     Range@2000, {_?PrimeQ ..}], {{x_, _}, {{___, a_, ___}, {___, b_, ___}} /; b - a == 2} :> x] (* _Hans Rudolf Widmer_, Oct 04 2024 *)
%Y A178033 Cf. A001359, A172271, A172494, A173255, A174454
%K A178033 nonn,base
%O A178033 1,1
%A A178033 Ulrich Krug (leuchtfeuer37(AT)gmx.de), May 17 2010
%E A178033 Corrected and edited by _D. S. McNeil_, Nov 23 2010
%E A178033 More terms from _Hans Rudolf Widmer_, Oct 04 2024