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.
%I A163464 #10 Jul 26 2017 09:33:15 %S A163464 0,0,0,1,1,1,2,2,3,4,4,5,5,6,6,8,9,9,10,11,11,12,12,13,14,16,16,17,17, %T A163464 18,20,20,21,21,24,24,25,26,26,27,28,28,30,30,32,32,34,35,36,36,37,38, %U A163464 38,40,41,42,43,43,44,45,45,46,49,50,50,51,53,54,57,57,58,59,60,61,62 %N A163464 Cumulative sum of a repeated shift-and-add operation on the base-7 representation of prime(n). %C A163464 Starting from the base-7 representation of prime(n) = d_m*7^m + ... + d_3*7^3 + d_2*7^2 + d_1*7 + d_0, the least-significant digit is recursively removed (a shift-right operation in base 7), and the intermediate numbers are all added up: %C A163464 a(n) = (d_m*7^(m-1) + ... + d_3*7^2 + d_2*7 + d_1) %C A163464 + (d_m*7^(m-2) + ... + d_4*7^2 + d_3*7 + d_2) %C A163464 + (d_m*7^(m-3) + ... + d_4*7 + d_3) %C A163464 + ... + d_m %C A163464 = Sum_{j=1..m} d_j*(7^j - 1)/6. %H A163464 G. C. Greubel, <a href="/A163464/b163464.txt">Table of n, a(n) for n = 1..5000</a> %p A163464 shiftadd := proc(n,b) dgs := convert(n,base,b) ; add( op(i,dgs)*(b^(i-1)-1),i=2..nops(dgs))/(b-1) ; end: %p A163464 A163464 := proc(n) shiftadd(ithprime(n),7) ; end: %p A163464 seq(A163464(n),n=1..40) ; # _R. J. Mathar_, Aug 02 2009 %t A163464 lst={}; Do[p=Prime[n]; s=0; While[p>1,p=IntegerPart[p/7];s+=p;]; AppendTo[lst, s],{n,6!}]; lst %Y A163464 Cf. A080085, A080086, A080087. %K A163464 nonn,easy,base %O A163464 1,7 %A A163464 _Vladimir Joseph Stephan Orlovsky_, Jul 28 2009 %E A163464 Definition rewritten by _R. J. Mathar_, Aug 02 2009