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.

A081849 Consider recurrence b(0) = (2n+1)/2, b(n) = b(0)*ceiling(b(n-1)); sequence gives first integer reached.

This page as a plain text file.
%I A081849 #17 Jun 30 2024 09:09:42
%S A081849 3,20,14,468,33,299,60,47328,95,1218,138,25475,189,3161,248,20830128,
%T A081849 315,6512,390,181138,473,11655,564,9015167,663,18974,770,671745,885,
%U A081849 28853,1008,38906570560,1139,41676,1278,1799888,1425,57827,1580,110341278,1743,77690
%N A081849 Consider recurrence b(0) = (2n+1)/2, b(n) = b(0)*ceiling(b(n-1)); sequence gives first integer reached.
%C A081849 k = A001511(n) is the number of steps to reach an integer b(k).
%F A081849 a(n) = s*(n*s^k - 1/2) / (s-1) where s = b(0) = (2*n+1)/2 and k = A001511(n). - _Kevin Ryde_, Jun 30 2024
%p A081849 Digits := 100: c := ceil; A081849 := proc(a) local i,t0,t; t0 := a; t := 0; for i from 1 to 100 do if whattype(t0) <> integer then t0 := a*c(t0); t := t+1; else RETURN(t0); fi; od; RETURN('FAIL'); end;
%t A081849 a[n_]:=Module[{b=b0=(2n+1)/2},While[!IntegerQ[b],b=b0*Ceiling[b]]; b]; Array[a,42] (* _Stefano Spezia_, Jun 26 2024 *)
%o A081849 (Python)
%o A081849 from math import ceil
%o A081849 from fractions import Fraction
%o A081849 def a(n):
%o A081849   b0 = b = Fraction((2*n+1), 2)
%o A081849   while b.denominator != 1: b = b0*ceil(b)
%o A081849   return b.numerator
%o A081849 print([a(n) for n in range(1, 43)]) # _Michael S. Branicky_, Mar 20 2021
%o A081849 (PARI) a(n) = if(n==1,3, my(t=2*n+1, k=1+valuation(n,2)); n*t^(k+1) >>k \ (t-2)); \\ _Kevin Ryde_, Jun 30 2024
%Y A081849 Cf. A001511, A081853, A073524, A074078.
%K A081849 nonn,easy
%O A081849 1,1
%A A081849 _N. J. A. Sloane_, Apr 13 2003