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.

A336890 Numbers that eventually reach the fixed point 8208 under "x --> sum of the fourth powers of digits of x".

This page as a plain text file.
%I A336890 #11 Sep 03 2020 17:42:09
%S A336890 12,17,21,46,64,71,102,107,120,137,145,154,170,173,201,210,224,242,
%T A336890 279,288,297,317,349,357,371,375,379,394,397,406,415,422,439,451,460,
%U A336890 493,514,537,541,573,599,604,640,701,710,713,729,731,735,739,753,792,793,828,882,927,934,937,943,959,972,973,995
%N A336890 Numbers that eventually reach the fixed point 8208 under "x --> sum of the fourth powers of digits of x".
%H A336890 Robert Israel, <a href="/A336890/b336890.txt">Table of n, a(n) for n = 1..10000</a>
%e A336890 12 --> 1^4+2^4 = 17 --> 1^4+7^4 = 2402 --> 2^4+4^4+0^4+2^4 = 288 --> 2^4+8^4+8^4 = 8208.
%p A336890 V:= Vector(32805): V[8208]:= true:
%p A336890 g:= proc(n) local L, t;
%p A336890   add(t^4, t = convert(n,base,10))
%p A336890 end proc:
%p A336890 f:= proc(n) local x,S; global V;
%p A336890   if n <= 32805 then
%p A336890      if V[n] <> 0 then return V[n]
%p A336890      else S:= [n]
%p A336890      fi
%p A336890   else S:= []
%p A336890   fi;
%p A336890   x:= n;
%p A336890   do
%p A336890     x:= g(x);
%p A336890     if V[x] <> 0 then
%p A336890        V[S]:= V[x];
%p A336890        return V[x]
%p A336890     elif member(x,S) then
%p A336890        V[S]:= false;
%p A336890        return false
%p A336890     fi;
%p A336890     if x <= 32805 then S:= [op(S), x] fi;
%p A336890   od;
%p A336890 end proc;
%p A336890 select(f, [$1..10000]); # _Robert Israel_, Sep 03 2020
%t A336890 okQ[n] := MemberQ[NestList[Total[IntegerDigits[#]^4]&, n, 30], 8208]; Select[Range[1000], okQ]
%Y A336890 Cf. A219111, A031185, A031184.
%K A336890 nonn,base
%O A336890 1,1
%A A336890 _Sergio Falcon_, Aug 07 2020