A330073 Irregular triangle read as rows in which row n is the result of iterating the operation f(n) = n/5 if n == 0 (mod 5), otherwise f(n) = 5*(floor(n/5) + n + 1), terminating at the first occurrence of 1.
1, 2, 15, 3, 20, 4, 25, 5, 1, 3, 20, 4, 25, 5, 1, 4, 25, 5, 1, 5, 1, 6, 40, 8, 50, 10, 2, 15, 3, 20, 4, 25, 5, 1, 7, 45, 9, 55, 11, 70, 14, 85, 17, 105, 21, 130, 26, 160, 32, 195, 39, 235, 47, 285, 57, 345, 69, 415, 83, 500, 100, 20, 4, 25, 5, 1, 8, 50
Offset: 1
Examples
The irregular array T(n,k) starts: n\k 0 1 2 3 4 5 6 7 8 9 10 11 12 13 ... 1: 1 2: 2 15 3 20 4 25 5 1 3: 3 20 4 25 5 1 4: 4 25 5 1 5: 5 1 6: 6 40 8 50 10 2 15 3 20 4 25 5 1 7: 7 45 9 55 11 70 14 85 17 105 21 130 26 160 ... 8: 8 50 10 2 15 3 20 4 25 5 1 9: 9 55 11 70 14 85 17 105 21 130 26 160 32 195 ... 10: 10 2 15 3 20 4 25 5 1 T(7,31) = 1 and T(9,29) = 1.
Programs
-
Mathematica
Array[NestWhileList[If[Mod[#, 5] == 0, #/5, 5 (Floor[#/5] + # + 1)] &, #, # > 1 &] &, 8] // Flatten (* Michael De Vlieger, Dec 01 2019 *)
-
PARI
row(n)=my(N=[n],m=5);while(n>1,N=concat(N,n=if(n%m,m*(n+floor(n/m)+1),n/m)));N
Formula
T(n,0) = n, T(n,k + 1) = T(n,k)/5 if T(n,k) == 0 (mod 5), 5*(T(n,k) + floor(T(n,k)/5) + 1) otherwise, for n >= 1.
Comments