login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A228297
Generalized meta-Fibonacci sequence a(n) with parameters s=0 and k=5.
3
1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 15, 16, 17, 18, 19, 20, 20, 21, 22, 23, 24, 25, 25, 25, 26, 27, 28, 29, 30, 30, 31, 32, 33, 34, 35, 35, 36, 37, 38, 39, 40, 40, 41, 42, 43, 44, 45, 45, 46, 47, 48, 49, 50, 50, 50, 51, 52, 53
OFFSET
1,2
COMMENTS
Each integer n appears x+1 times where x is the greatest power of 5 in the factorization of n!. - Gerald Hillier, Feb 08 2020
LINKS
C. Deugau and F. Ruskey, Complete k-ary Trees and Generalized Meta-Fibonacci Sequences, J. Integer Seq., Vol. 12, 2009, Article 09.4.3.
FORMULA
a(n) = A007845(n)/5. - M. F. Hasler, Dec 27 2019
MATHEMATICA
Array[ConstantArray[#, IntegerExponent[#, 5] + 1] &, 53] // Flatten (* Michael De Vlieger, Feb 08 2020 *)
PROG
(PARI) a(n)= {local(A); if(n<=5, max(0, n), A=vector(n, i, i); for(k=6, n, A[k]= A[k-A[k-1]] + A[k-1-A[k-2]] + A[k-2-A[k-3]] + A[k-3-A[k-4]] + A[k-4-A[k-5]]; ); A[n]; ); }
(HP 49G calculator)
« DUPDUP 5 IQUOT -
WHILE DUP 0 OVER
DO 5 IQUOT DUP
ROT + SWAP DUP NOT
UNTIL
END DROP +
PICK3 <
REPEAT 1 +
END NIP
» Gerald Hillier, Sep 19 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Aug 20 2013
STATUS
approved