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 A340325 #18 Feb 06 2021 12:35:37 %S A340325 5,6,10,11,12,13,14,15,17,18,19,20,22,23,24,25,26,28,29,30,33,34,35, %T A340325 36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58, %U A340325 59,60,61,62,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,82,83,84 %N A340325 Numbers k such that starting with k and repeatedly applying the map x -> A340323(x) reaches the fixed point 12. %C A340325 From _Sebastian Karlsson_, Jan 15 2021: (Start) %C A340325 The sequence contains no powers of two. If a number isn't a power of two, then it is in this sequence if and only if either of the following conditions hold: %C A340325 - It is a multiple of a prime that is not a Mersenne prime. %C A340325 - It is divisible by the square of a Mersenne prime greater than 3. (End) %t A340325 fa[n_]:=fa[n]=FactorInteger[n];phi[1]=1; phi[p_, s_]:= (p + 1)*( p - 1)^(s - 1) %t A340325 phi[n_]:=Product[phi[fa[n][[i, 1]], fa[n][[i, 2]]], {i, Length[fa[n]]}]; %t A340325 S[n_] := NestWhile [phi, n, ! ( # == 12 || # == 3 || # == 4) &]; %t A340325 Select[1 + Range[100], S[#] == 12 &] %o A340325 (PARI) f(n) = if(1==n, n, my(f=factor(n)); prod(i=1, #f~, (f[i, 1]+1)*((f[i, 1]-1)^(f[i, 2]-1)))); \\ A340323 %o A340325 isok(m) = if (m==1, return(0)); while(! ((m==3) || (m==4) || (m==12)), m = f(m)); (m==12); \\ _Michel Marcus_, Jan 21 2021 %Y A340325 Cf. A340323, A340324. %Y A340325 Cf. A000668. %K A340325 nonn %O A340325 1,1 %A A340325 _José María Grau Ribas_, Jan 07 2021