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.

A183226 Sum of digits of (2^n) in base 5, also sum of digits of (10^n) in base 5.

This page as a plain text file.
%I A183226 #18 Oct 29 2015 15:23:46
%S A183226 1,2,4,4,4,4,8,4,4,8,12,12,12,12,8,12,16,20,20,20,16,12,20,24,28,20,
%T A183226 32,32,24,32,40,40,32,24,28,32,32,40,28,36,36,40,44,40,36,40,36,44,44,
%U A183226 44,44,48,52,52,48,56,40,56,68,60,52,52,48,60,56,64,60,48,56,60,60,64,60,60,60,64,52,48,64,68,56,80,80
%N A183226 Sum of digits of (2^n) in base 5, also sum of digits of (10^n) in base 5.
%C A183226 If i >= 2, a(n) mod 4 = 0. (Cf. A053824)
%H A183226 Robert Israel, <a href="/A183226/b183226.txt">Table of n, a(n) for n = 0..10000</a>
%e A183226 a(9) = 8 because 10^9 = 4022000000000_5, and 2^9 = 512 = 4022_5.
%p A183226 a:= n-> add(i, i=convert (2^n, base, 5)):
%p A183226 seq(a(n), n=0..82);  # _Alois P. Heinz_, Jan 06 2011
%t A183226 Table[Plus@@IntegerDigits[2^n, 5], {n, 0, 49}] (* Either that one or this one *) Table[Plus@@IntegerDigits[10^n, 5], {n, 0, 49}] (* _Alonso del Arte_, Jan 06 2011 *)
%o A183226 (PARI)\\  L is the list of the N digits of 2^n in quinary.
%o A183226      \\ L[1] = a_0 , ..., L[N] = a_(N-1).
%o A183226 convert(n)={n=2^n; x=n; N=floor(log(n)/log(5))+1;
%o A183226 L = listcreate(N);
%o A183226 while(x, n=floor(n/5); r=x-5*n; listput(L, r); x=n; );
%o A183226 L; N};
%o A183226 for(n=0,100,convert(n);an=0;for(i=1,N,an+=L[i];); print1(an,", "));
%o A183226 (PARI) t(n) = if(n<1, 0, if(n%5, t(n-1)+1, t(n/5)));
%o A183226 vector(200, n, n--; t(2^n)) \\ _Altug Alkan_, Oct 28 2015
%Y A183226 Cf. A055476, A173670, A183227, A183228.
%K A183226 nonn,easy,base
%O A183226 0,2
%A A183226 _Washington Bomfim_, Jan 01 2011