cp's OEIS Frontend

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.

A288120 Number of partitions of n into distinct pentanacci numbers (with a single type of 1) (A001591).

This page as a plain text file.
%I A288120 #16 Feb 16 2025 08:33:47
%S A288120 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,
%T A288120 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,1,1,1,1,1,
%U A288120 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
%N A288120 Number of partitions of n into distinct pentanacci numbers (with a single type of 1) (A001591).
%C A288120 The first occurrences of 1, 2, 3, 4, 5, ... are at n=0, 31, 912, 1824, 26815, ... - _Antti Karttunen_, Dec 22 2017
%H A288120 Antti Karttunen, <a href="/A288120/b288120.txt">Table of n, a(n) for n = 0..52656</a>
%H A288120 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Fibonaccin-StepNumber.html">Fibonacci n-Step Number</a>
%H A288120 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PentanacciNumber.html">Pentanacci Number</a>
%H A288120 <a href="/index/Par#part">Index entries for related partition-counting sequences</a>
%F A288120 G.f.: Product_{k>=5} (1 + x^A001591(k)).
%e A288120 a(31) = 2 because we have [31] and [16, 8, 4, 2, 1].
%o A288120 (PARI)
%o A288120 A001591(n) = { if(n<=3,return(0)); my(p0=0,p1=0,p2=0,p3=1,p4=1,old_p0); while(n>5,n--;old_p0=p0;p0=p1;p1=p2;p2=p3;p3=p4;p4=old_p0+p0+p1+p2+p3;); p4; }
%o A288120 v288120nthgen(up_to) = { my(k=6,fk,vec = [1],vec2); while(k<=up_to, fk = A001591(k); k++; vec2 = vector(length(vec)+fk,i,(i==fk)+if(i>fk,vec[i-fk],0)+if(i<=length(vec),vec[i],0)); vec = vec2); vector(fk,i,vec[i]); }
%o A288120 write_to_bfile_with_a0_as_given(a0,vec,bfilename) = { write(bfilename, 0, " ", a0); for(n=1, length(vec), write(bfilename, n, " ", vec[n])); }
%o A288120 write_to_bfile_with_a0_as_given(1,v288120nthgen(21),"b288120.txt"); \\ _Antti Karttunen_, Dec 22 2017
%o A288120 (Scheme)
%o A288120 (define (A288120 n) (let ((s (list 0))) (let fork ((r n) (i 5)) (cond ((zero? r) (set-car! s (+ 1 (car s)))) ((> (A001591 i) r) #f) (else (begin (fork (- r (A001591 i)) (+ 1 i)) (fork r (+ 1 i)))))) (car s)))
%o A288120 ;; This one uses memoization-macro definec
%o A288120 (definec (A001591 n) (cond ((<= n 3) 0) ((= 4 n) 1) (else (+ (A001591 (- n 1)) (A001591 (- n 2)) (A001591 (- n 3)) (A001591 (- n 4)) (A001591 (- n 5))))))
%o A288120 ;; _Antti Karttunen_, Dec 22 2017
%Y A288120 Cf. A001591, A000119, A000121, A003263, A117546, A287656, A296209.
%K A288120 nonn
%O A288120 0,32
%A A288120 _Ilya Gutkovskiy_, Jun 05 2017
%E A288120 More terms from _Antti Karttunen_, Dec 22 2017