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.

A212813 Number of steps for n to reach 8 under iteration of the map i -> A036288(i), or -1 if 8 is never reached.

This page as a plain text file.
%I A212813 #30 Oct 12 2018 23:34:16
%S A212813 -1,-1,-1,-1,-1,-1,1,0,2,1,2,1,3,2,3,3,4,3,3,2,3,3,3,2,3,4,2,2,4,3,4,
%T A212813 3,4,3,4,3,5,4,5,2,5,4,5,4,2,5,3,2,4,4,4,4,3,2,5,3,4,4,5,4,5,4,3,4,4,
%U A212813 5,5,4,3,4,5,4,4,3,3,3,4,4,4,3,4,5,5,4,4,6,5,4,4,3,4,3,5,5,4,3,6,5,4,4,5,4,4,3,4,4,4,3,5,4,6,4,5,4,5,4,3,5,4
%N A212813 Number of steps for n to reach 8 under iteration of the map i -> A036288(i), or -1 if 8 is never reached.
%C A212813 It is known that a(n) >= 0 for n >= 7. Bellamy and Cadogan call a(n) the "class number" of n, but this is not a good idea as this term is already overworked.
%C A212813 a(A212911(n)) = n and a(m) < n for m < A212911(n). - _Reinhard Zumkeller_, May 30 2012
%D A212813 Bellamy, O. S.; Cadogan, C. C. Subsets of positive integers: their cardinality and maximality properties. Proceedings of the Tenth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1979), pp. 167--178, Congress. Numer., XXIII-XXIV, Utilitas Math., Winnipeg, Man., 1979. MR0561043 (82b:10006)
%D A212813 R. Honsberger, Mathematical Morsels, MAA, 1978, p. 223.
%H A212813 Reinhard Zumkeller, <a href="/A212813/b212813.txt">Table of n, a(n) for n = 1..10000</a>
%p A212813 Simple-minded Maple program from _N. J. A. Sloane_, May 30 2012:
%p A212813 f:=proc(n) local i,t1; t1:=ifactors(n)[2]; 1+add( t1[i][1]*t1[i][2], i=1..nops(t1)); end; # this is A036288
%p A212813 g:=proc(n) local i,t1; global f; t1:=n; for i from 1 to 1000 do if t1=8 then RETURN(i-1); fi; t1:=f(t1); od; -1; end; # this is A212813
%t A212813 imax = 11 (* = max term plus 1 *);
%t A212813 a36288[n_] := If[n == 1, 1, Total[Times @@@ FactorInteger[n]] + 1];
%t A212813 a[n_] := Module[{i, k}, For[k = n; i = 1, i <= imax, i++, If[k == 8, Return[i - 1]]; k = a36288[k]]; If[n > 6, Print["imax ", imax, " probably too small"]]; -1];
%t A212813 Array[a, 120] (* _Jean-François Alcover_, Aug 01 2018 *)
%o A212813 (Haskell)
%o A212813 a212813 n | n < 7     = -1
%o A212813           | otherwise = fst $ (until ((== 8) . snd))
%o A212813                               (\(s, x) -> (s + 1, a036288 x)) (0, n)
%o A212813 -- _Reinhard Zumkeller_, May 30 2012
%o A212813 (PARI) A212813(n)={ n>8 & for(c=1,9e9,(n=A036288(n))==8 & return(c));(n==7)-(n<7) }  \\ _M. F. Hasler_, May 30 2012
%Y A212813 Cf. A036288, A212814, A212815, A212816, A212908, A212909, A212911.
%K A212813 sign
%O A212813 1,9
%A A212813 _N. J. A. Sloane_, May 30 2012