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.

A169637 The number of permutations of the first n elements of the Hofstaedter Q-sequence (A005185), augmented by Q(0)=1.

This page as a plain text file.
%I A169637 #14 Jun 29 2021 17:18:53
%S A169637 1,1,1,4,20,60,420,3360,15120,151200,831600,3326400,43243200,
%T A169637 302702400,1513512000,24216192000,411675264000,3705077376000,
%U A169637 70396470144000,703964701440000,14783258730240000,162615846032640000,1246721486250240000,7480328917501440000
%N A169637 The number of permutations of the first n elements of the Hofstaedter Q-sequence (A005185), augmented by Q(0)=1.
%C A169637 An augmented Hofstadter sequence 1,1,1,2,3,3,... is defined by adding a single 1 in front of A005185. a(n) is the number of permutations using the first n+1 elements, 1 up to A005185(n), of this augmented sequence.
%H A169637 Rémy Sigrist, <a href="/A169637/a169637.gp.txt">PARI program for A169637</a>
%e A169637 For n=3, the first 4 elements of the augmented sequence are (1,1,1,2), with a(3)=4 permutations, namely (1,1,1,2), (1,1,2,1), (1,2,1,1) and (2,1,1,1).
%t A169637 f[0] = 1; f[1] = 1; f[2] = 1;
%t A169637 f[n_] := f[n] = f[n - f[n - 1]] + f[n - f[n - 2]];
%t A169637 a[m_] := Length[Permutations[Table[f[i], {i, 0, m}]]];
%t A169637 (* b = Table[a[m], {m, 0, 10}]  *)
%t A169637 (* A much better way to compute the terms is to use the multinomials of the multiplicities of the terms of A005229! - _Joerg Arndt_, Dec 23 2014 *)
%o A169637 (PARI) See Links section.
%Y A169637 Cf. A005185.
%K A169637 nonn
%O A169637 0,4
%A A169637 _Roger L. Bagula_, Apr 04 2010
%E A169637 Definition clarified, comment and example added - _R. J. Mathar_, Dec 08 2010
%E A169637 More terms from _Rémy Sigrist_, Jun 29 2021