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.
%I A053653 #24 Aug 29 2024 18:46:24 %S A053653 0,0,1,0,1,0,1,2,0,0,3,4,8,0,6,11,3,0,3,6,1,1,4,3,0,2,5,6,15,15,17,16, %T A053653 12,12,4,10,8,5,8,18,11,23,5,13,9,10,8,6,27,9,4,6,14,4,24,3,14,6,4,33, %U A053653 7,14,11,12,6,86,26,53,13,79,27,51,81,61,26,39,25,54,17,25 %N A053653 Number of ways to rearrange digits of prime(n)*prime(n+1) to form a prime. %C A053653 Leading zeros are not allowed in the rearranged number. %H A053653 Michael S. Branicky, <a href="/A053653/b053653.txt">Table of n, a(n) for n = 1..10000</a> %e A053653 a(8) = 2 because 19*23 = 437 and 2 primes, 347 and 743, can be formed from the digits of 437. %t A053653 nfp[n_]:=With[{id=IntegerDigits[n]},Length[Select[FromDigits/@Permutations[id],IntegerLength[ #] ==IntegerLength[n]&&PrimeQ[#]&]]]; nfp/@Times@@@Partition[Prime[Range[90]],2,1] (* _Harvey P. Dale_, Aug 29 2024 *) %o A053653 (Python) %o A053653 from sympy import isprime, prime %o A053653 from sympy.utilities.iterables import multiset_permutations as mp %o A053653 def c(s): %o A053653 return sum(1 for t in mp(s) if t[0]!='0' and isprime(int("".join(t)))) %o A053653 def a(n): return c(str(prime(n)*prime(n+1))) %o A053653 print([a(n) for n in range(1, 72)]) # _Michael S. Branicky_, Dec 22 2021 %Y A053653 Cf. A053652, A053736. %K A053653 easy,nonn,look,base %O A053653 1,8 %A A053653 _Enoch Haga_, Feb 18 2000 %E A053653 Edited by _Jens Kruse Andersen_, Dec 01 2006