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.

A046812 Number of prime anagrams of A046811(n).

This page as a plain text file.
%I A046812 #11 Apr 02 2025 18:33:16
%S A046812 0,1,2,3,4,8,11,16,21,25,27,31,36,37,39,41,44,46,54,58,78,79,87,95,97,
%T A046812 101,116,148,158,161,169,179,197,226,231,244,253,377,437,488,534,665,
%U A046812 685,727,731,760,949,1071,1148,1209,1303,1431,1666,1698,2283,2701,2857
%N A046812 Number of prime anagrams of A046811(n).
%H A046812 Robert Israel, <a href="/A046812/b046812.txt">Table of n, a(n) for n = 1..86</a>
%p A046812 S[1]:= [seq([i], i=1..9)]:
%p A046812 for d from 2 to 7 do S[d]:= map(t -> seq([i, op(t)], i=t[1]..9), S[d-1]) od:
%p A046812 f:= proc(L) local t, i;
%p A046812   add(`if`(isprime(add(t[i]*10^(i-1), i=1..nops(t))), 1, 0), t=combinat:-permute(L))
%p A046812 end proc:
%p A046812 R:= NULL: m:= -1:
%p A046812 for d from 1 to 7 do
%p A046812 for L in S[d] do
%p A046812     v:= f(L);
%p A046812     if v > m then m:= v; R:= R, v; fi
%p A046812 od od:
%p A046812 R; # _Robert Israel_, Apr 02 2025
%Y A046812 Cf. A046811.
%K A046812 nonn,base
%O A046812 1,3
%A A046812 _David W. Wilson_