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.

A271774 a(1) = 1, then a(n) is the maximum of all 0 < m < n for which a(m) divides n.

This page as a plain text file.
%I A271774 #11 Apr 15 2016 15:57:17
%S A271774 1,1,2,3,2,5,2,7,4,7,2,11,2,13,6,13,2,17,2,19,10,19,2,23,6,23,4,27,2,
%T A271774 29,2,31,12,31,10,33,2,37,16,37,2,41,2,43,6,43,2,47,10,49,18,47,2,53,
%U A271774 12,53,22,53,2,59,2,61,10,61,16,61,2,67,26,67,2,71,2
%N A271774 a(1) = 1, then a(n) is the maximum of all 0 < m < n for which a(m) divides n.
%C A271774 If n is an odd prime, then a(n) = 2 and a(n+1) = n.  All n for which a(n) = 2 are odd primes. - _Robert Israel_, Apr 14 2016
%H A271774 Robert Israel, <a href="/A271774/b271774.txt">Table of n, a(n) for n = 1..10000</a>
%e A271774 a(1) = 1 by definition.
%e A271774 a(2) = 1 because a(1) divides 2.
%e A271774 a(3) = 2 because a(2) divides 3.
%e A271774 a(4) = 3 because a(3) divides 4.
%e A271774 a(5) = 2 because a(2) divides 5.
%e A271774 a(6) = 5 because a(5) divides 6.
%e A271774 a(7) = 2 because a(2) divides 7.
%e A271774 a(8) = 7 because a(7) divides 8.
%p A271774 A:= proc(n) option remember; local m;
%p A271774     for m from n-1 by -1 do
%p A271774       if n mod A(m) = 0 then return m fi
%p A271774     od
%p A271774 end proc:
%p A271774 A(1):= 1:
%p A271774 seq(A(i),i=1..100); # _Robert Israel_, Apr 14 2016
%t A271774 a[1] = 1; a[n_] := a[n] = Block[{m = n - 1}, While[Mod[n, a[m]] > 0, m--]; m]; Array[a, 100] (* _Giovanni Resta_, Apr 14 2016 *)
%Y A271774 Cf. A088167, A269347, A271503, A271504, A271773.
%K A271774 nonn
%O A271774 1,3
%A A271774 _Peter Kagey_, Apr 14 2016