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 A086150 #17 Jul 23 2025 11:37:50 %S A086150 1,0,0,1,0,1,0,1,1,2,0,2,0,1,2,1,0,2,1,1,2,1,1,2,2,2,2,2,1,1,0,1,1,1, %T A086150 1,2,0,1,2,2,1,2,1,1,2,2,1,2,2,1,2,2,1,2,1,2,2,2,1,2,1,2,2,2,2,1,1,2, %U A086150 2,1,0,2,0,1,2,1,1,2,0,2,2,2,1,2,2,2,2,1,1,2,1,1,2,2,1,2,0,1,1,3,1,6,3,4,6 %N A086150 Number of permutations of decimal digits of n which yield nonprime numbers. %C A086150 From _Robert Israel_, Aug 13 2017: (Start) %C A086150 Leading zeros are allowed. %C A086150 a(n) = 0 for n in A003459. (End) %H A086150 Robert Israel, <a href="/A086150/b086150.txt">Table of n, a(n) for n = 1..10000</a> %F A086150 a(n) + A039999(n) = A047726(n). - _Robert Israel_, Aug 13 2017 %e A086150 n=117, digit-permutations={117,171,711} are all composites, so a(117)=3. %p A086150 f:= proc(L) option remember; %p A086150 nops(remove(isprime, map(t -> add(t[i]*10^(i-1),i=1..nops(t)), combinat:-permute(L)))) %p A086150 end proc: %p A086150 seq(f(sort(convert(n,base,10))),n=1..200); # _Robert Israel_, Aug 13 2017 %t A086150 nd[x_, y_] := 10*x+y tn[x_] := Fold[nd, 0, x] Table[Count[Table[PrimeQ[tn[Part[Permutations[ IntegerDigits[w]], j]]], {j, 1, Length[Permutations[ IntegerDigits[w]]]}], False], {w, 1, 128}] %t A086150 Table[Count[FromDigits/@Permutations[IntegerDigits[n]],_?(!PrimeQ[#]&)],{n,110}] (* _Harvey P. Dale_, Dec 24 2016 *) %Y A086150 Cf. A003459, A039999, A047726. %K A086150 base,nonn %O A086150 1,10 %A A086150 _Labos Elemer_, Aug 04 2003