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.

A003062 Beginnings of periodic unitary aliquot sequences.

This page as a plain text file.
%I A003062 M4190 #46 Jan 24 2024 21:28:07
%S A003062 6,30,42,54,60,66,78,90,100,102,114,126,140,148,194,196,208,220,238,
%T A003062 244,252,274,288,292,300,336,348,350,364,374,380,382,386,388,400,420,
%U A003062 436,440,476,482,484,492,516,528,540,542,550,570,578,592,600,612,648,660,680,688,694,708,720,722,740,756,758,764,766,770,780,784,792,794,812
%N A003062 Beginnings of periodic unitary aliquot sequences.
%C A003062 Provided that A034460 has no infinite unbounded trajectories, these are also numbers m such that when iterating the map k -> A034460(k), starting from k = m, the iteration will never reach 0, that is, will instead eventually enter into a finite cycle. - _Antti Karttunen_, Sep 23 2018
%D A003062 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A003062 Antti Karttunen, <a href="/A003062/b003062.txt">Table of n, a(n) for n = 1..20000</a>
%H A003062 H. J. J. Te Riele, <a href="https://ir.cwi.nl/pub/9137/">Unitary Aliquot Sequences</a>, Report MR-139/72, Mathematisch Centrum, Amsterdam, September 1972.
%t A003062 a034460[0] = 0; (* avoids dividing by 0 when an iteration reaches 0 *)
%t A003062 a034460[n_] := Total[Select[Divisors[n], GCD[#, n/#]==1&]]-n/;n>0
%t A003062 periodicQ[k_] := NestWhile[a034460, k, UnsameQ, All]!=0
%t A003062 nmax = 812; Select[Range[nmax], periodicQ]
%t A003062 (* _Hartmut F. W. Hoft_, Jan 24 2024 *)
%o A003062 (PARI)
%o A003062 up_to = 20000;
%o A003062 A034460(n) = (sumdivmult(n, d, if(gcd(d, n/d)==1, d))-n); \\ From A034460
%o A003062 A318880(n) = { my(visited = Map()); for(j=1, oo, if(mapisdefined(visited, n), return(1), mapput(visited, n, j)); n = A034460(n); if(!n,return(0))); };
%o A003062 A003062list(up_to) = { my(v = vector(up_to), k=0, n=1); while(k<up_to,if(A318880(n), k++; v[k] = n); n++); (v); };
%o A003062 v003062 = A003062list(up_to);
%o A003062 A003062(n) = v003062[n]; \\ _Antti Karttunen_, Sep 23 2018
%Y A003062 Cf. A034460, A097010 (complement), A318880 (characteristic function).
%Y A003062 Cf. also A002827, A063991, A097024, A097030, A097034, A097035, A097036, A097037.
%K A003062 nonn
%O A003062 1,1
%A A003062 _N. J. A. Sloane_
%E A003062 More terms from _Antti Karttunen_, Sep 23 2018