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.

A183227 a(n) is the base-5 digit sum of 10^n-1.

This page as a plain text file.
%I A183227 #12 Jan 06 2019 04:55:01
%S A183227 0,5,11,15,19,23,31,31,35,43,51,55,59,63,63,71,79,87,91,95,95,95,107,
%T A183227 115,123,119,135,139,135,147,159,163,159,155,163,171,175,187,179,191,
%U A183227 195,203,211,211,211,219,219,231,235,239
%N A183227 a(n) is the base-5 digit sum of 10^n-1.
%F A183227 a(n) = A053824(10^n-1) = 4*n + A053824(2^n-1).
%e A183227 a(9) = 43 because 10^9 - 1 is written as 4021444444444_5, and 2^9 - 1 = 511 is written as 4021_5.
%p A183227 A053824 := proc(n) add(d,d=convert(n,base,5)) ; end proc:
%p A183227 A183227 := proc(n) A053824(10^n-1) ; end proc: # _R. J. Mathar_, Jan 09 2011
%o A183227 (PARI)\\L is a list of the N digits of 2^n - 1 in  quinary
%o A183227 convert(n)={n = 2^n - 1; x=n; N=floor(log(n)/log(5))+1;
%o A183227 L = listcreate(N);
%o A183227 while(x, n=floor(n/5); r=x-5*n; listput(L, r); x=n; );
%o A183227 L; N};
%o A183227 print1("0, "); for(n = 1,100, convert(n); s = 0; for(i = 1, N, s += L[i];); print1(s+4*n, ", "));
%Y A183227 Cf. A183226, A183228.
%K A183227 nonn,easy,base
%O A183227 0,2
%A A183227 _Washington Bomfim_, Jan 01 2011