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.

A134742 Numbers whose square is a permutational number A134640.

This page as a plain text file.
%I A134742 #17 Sep 04 2020 21:23:17
%S A134742 0,1,15,50,85,195,327,561,789,867,1323,1764,2450,2751,2858,2878,3213,
%T A134742 3418,3538,4834,4846,5062,5342,5770,6286,7814,8574,8634,9722,10254,
%U A134742 10610,10614,11522,11702,11826,12363,12543,13490,14246,14502,14538,14676,14818,14902,15186,15434,15681,15874,15963
%N A134742 Numbers whose square is a permutational number A134640.
%H A134742 Robert Israel, <a href="/A134742/b134742.txt">Table of n, a(n) for n = 1..261</a>
%F A134742 a(n) = sqrt(A134741(n)).
%p A134742 N:= 10^5: # for terms <= N
%p A134742 extend:= proc(x,N,S,b,k)
%p A134742   local i,R;
%p A134742   R:= NULL;
%p A134742   for i in S while x + i*b^k <= N^2 do
%p A134742     if k = 0 then
%p A134742        if issqr(x+i*b^k) then R:= R, sqrt(x+i*b^k) fi
%p A134742     else
%p A134742        R:= R, procname(x+i*b^k,N,subs(i=NULL,S),b,k-1)
%p A134742     fi
%p A134742   od;
%p A134742   R
%p A134742 end proc:
%p A134742 f:= (b,N) -> extend(0,N,[$0..(b-1)],b,b-1):
%p A134742 R:= 0:
%p A134742 for b from 2 while b^(b-2) < N^2 do
%p A134742   R:= R, f(b,N);
%p A134742 od:
%p A134742 sort([R]); # _Robert Israel_, Sep 04 2020
%t A134742 a = {}; b = {}; Do[AppendTo[b, n]; w =Permutations[b]; Do[j = FromDigits[w[[m]], n + 1]; If[IntegerQ[j^(1/2)], AppendTo[a, j]], {m, 1, Length[w]}], {n, 0, 7}]; Sqrt[a]
%Y A134742 Cf. A134640, A134641, A134642, A134643, A134644, A023811, A134741.
%K A134742 nonn
%O A134742 1,3
%A A134742 _Artur Jasinski_, Nov 07 2007
%E A134742 Corrected and more terms from _Robert Israel_, Sep 04 2020