A304657 Number of ways to represent n/100 years in Shinigami time.
26, 76, 76, 208, 176, 252, 176, 544, 208, 604, 176, 768, 176, 604, 604, 1376, 176, 768, 176, 1888, 604, 604, 176, 2208, 818, 604, 544, 1888, 176, 2316, 176, 3392, 604, 604, 1460, 2568, 176, 604, 604, 5536, 176, 2316, 176, 1888, 1888, 604, 176, 6080, 818, 3172
Offset: 1
Examples
For n = 1, we have 0.01*3600 = 36 and 36 = 2 * 2 * 3 * 3. Thus, the possible representations are as follows: 2 2 3 3; 2 3 2 3; 2 3 3 2; 3 2 2 3; 3 2 3 2; 3 3 2 2 2 2 9; 2 3 6; 2 6 3; 2 9 2; 3 2 6; 3 3 4; 3 4 3; 3 6 2; 4 3 3; 6 2 3; 6 3 2; 9 2 2 2 18; 3 12; 4 9; 6 6; 9 4; 12 3; 18 2 36 There are 6 representations of length 4, 12 representations of length 3, 7 representations of length 2 and 1 representation of length 1. 6 + 12 + 7 + 1 = 26, so a(1) = 26.
References
- Tsugumi Ohba and Takeshi Obata, Death Note 13: How to Read, Paw Prints, 2008.
Links
- Death Note Wiki, Lifespan
- Death Note Wiki, Rules of the Death Note/Manga Chapter Rules - Volume 8
- WHO, The World Health Report 2003
- Wikipedia, Death Note
Programs
-
PARI
step_a(n) = n/100 step_b(n) = floor(n*3600) step_c(n, o=[1])=if(n>1, concat(apply(t->vector(t[2], i, t[1]), Vec(factor(n)~))), o) \\ after M. F. Hasler in A027746 find_index_a(vec) = my(r=#vec-1); while(1, if(vec[r] < vec[r+1], return(r)); r--; if(r==0, return(-1))) find_index_b(r, vec) = my(s=#vec); while(1, if(vec[r] < vec[s], return(s)); s--; if(s==r, return(-1))) switch_elements(vec, firstpos, secondpos) = my(g); g=vec[secondpos]; vec[secondpos]=vec[firstpos]; vec[firstpos] = g; vec \\ from David A. Corneth reverse_order(vec, r) = my(v=[], w=[]); for(x=1, r, v=concat(v, vec[x])); for(y=r+1, #vec, w=concat(w, vec[y])); w=Vecrev(w); concat(v, w) next_permutation(vec) = my(r=find_index_a(vec)); if(r==-1, return(0), my(s=find_index_b(r, vec)); vec=switch_elements(vec, r, s); vec=reverse_order(vec, r)); vec multiply_neighboring_elements(vec, pos) = my(x=vec[pos]*vec[pos+1], w=[]); for(k=1, pos-1, w=concat(w, vec[k])); w=concat(w, [x]); for(r=pos+2, #vec, w=concat(w, vec[r])); w all_permutations(vec) = my(v=[vecsort(vec)], w=vecsort(vec)); while(1, w=next_permutation(w); if(w==0, return(v), v=concat(v, [0]); v[#v]=w)) all_sets_from_multiplying_neighboring_elements(vec) = my(v=[]); for(k=1, #vec-1, v=concat(v, [0]); v[#v]=multiply_neighboring_elements(vec, k)); v count_eligible_sets(vec) = my(v=all_permutations(vec), w=[], i=#v); while(1, for(x=1, #v, my(asfmne=all_sets_from_multiplying_neighboring_elements(v[x])); if(#asfmne==0, return(i)); for(y=1, #asfmne, w=concat(w, [0]); w[#w]=asfmne[y]); w=vecsort(w, , 8)); i=i+#w; v=w; w=[]) a(n) = my(f=step_c(step_b(step_a(n)))); count_eligible_sets(f)
Extensions
Entry revised by Felix Fröhlich, Apr 03 2021
Comments