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.

A007731 a(n) = a(floor(n/2)) + a(floor(n/3)) + a(floor(n/6)), with a(0) = 1.

This page as a plain text file.
%I A007731 #38 Apr 10 2025 10:45:59
%S A007731 1,3,5,7,9,9,15,15,17,19,19,19,29,29,29,29,31,31,41,41,41,41,41,41,55,
%T A007731 55,55,57,57,57,57,57,59,59,59,59,85,85,85,85,85,85,85,85,85,85,85,85,
%U A007731 103,103,103,103,103,103,117,117
%N A007731 a(n) = a(floor(n/2)) + a(floor(n/3)) + a(floor(n/6)), with a(0) = 1.
%H A007731 T. D. Noe, <a href="/A007731/b007731.txt">Table of n, a(n) for n = 0..10000</a>
%H A007731 P. Erdős, A. Hildebrand, A. Odlyzko, P. Pudaite and B. Reznick, <a href="https://msp.org/pjm/1987/126-2/pjm-v126-n2-p02-s.pdf">The asymptotic behavior of a family of sequences</a>, Pacific J. Math., 126 (1987), pp. 227-241.
%F A007731 From given link, a(n) is asymptotic to c*n where c = 12/log(432) = 1.97744865... - _Benoit Cloitre_, Dec 18 2002
%p A007731 A007731 := proc(n) option remember; if n=0 then RETURN(1) else RETURN( A007731(trunc(n/2))+A007731(trunc(n/3))+A007731(trunc(n/6))); fi; end;
%p A007731 # second Maple program:
%p A007731 a:= proc(n) option remember; `if`(n=0, 1,
%p A007731       add(a(floor(n/i)), i=[2, 3, 6]))
%p A007731     end:
%p A007731 seq(a(n), n=0..100);  # _Alois P. Heinz_, Sep 27 2023
%t A007731 a[n_] := a[n] = a[Floor[n/2]] + a[Floor[n/3]] + a[Floor[n/6]] ; a[0] = 1; Table[a[n], {n, 0, 60}] (* _Jean-François Alcover_, Mar 06 2014 *)
%o A007731 (Haskell)
%o A007731 a007731 n = a007731_list !! n
%o A007731 a007731_list = 1 : (zipWith3 (\u v w -> u + v + w)
%o A007731    (map (a007731 . (`div` 2)) [1..])
%o A007731    (map (a007731 . (`div` 3)) [1..])
%o A007731    (map (a007731 . (`div` 6)) [1..]))
%o A007731 -- _Reinhard Zumkeller_, Jan 11 2014
%o A007731 (PARI) a(n)=if(n<5, 2*n+1, a(n\2) + a(n\3) + a(n\6)) \\ _Charles R Greathouse IV_, Feb 08 2017
%Y A007731 Cf. A083662, A088468, A165704, A165706, A061984.
%K A007731 nonn,easy,nice
%O A007731 0,2
%A A007731 _N. J. A. Sloane_
%E A007731 Name clarified by _Michel Marcus_, Apr 10 2025