A163464 Cumulative sum of a repeated shift-and-add operation on the base-7 representation of prime(n).
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, 18, 20, 20, 21, 21, 24, 24, 25, 26, 26, 27, 28, 28, 30, 30, 32, 32, 34, 35, 36, 36, 37, 38, 38, 40, 41, 42, 43, 43, 44, 45, 45, 46, 49, 50, 50, 51, 53, 54, 57, 57, 58, 59, 60, 61, 62
Offset: 1
Links
- G. C. Greubel, Table of n, a(n) for n = 1..5000
Programs
-
Maple
shiftadd := proc(n,b) dgs := convert(n,base,b) ; add( op(i,dgs)*(b^(i-1)-1),i=2..nops(dgs))/(b-1) ; end: A163464 := proc(n) shiftadd(ithprime(n),7) ; end: seq(A163464(n),n=1..40) ; # R. J. Mathar, Aug 02 2009
-
Mathematica
lst={}; Do[p=Prime[n]; s=0; While[p>1,p=IntegerPart[p/7];s+=p;]; AppendTo[lst, s],{n,6!}]; lst
Extensions
Definition rewritten by R. J. Mathar, Aug 02 2009
Comments