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.

Showing 1-2 of 2 results.

A103372 a(1) = a(2) = a(3) = a(4) = a(5) = 1 and for n>5: a(n) = a(n-4) + a(n-5).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 4, 4, 4, 5, 7, 8, 8, 9, 12, 15, 16, 17, 21, 27, 31, 33, 38, 48, 58, 64, 71, 86, 106, 122, 135, 157, 192, 228, 257, 292, 349, 420, 485, 549, 641, 769, 905, 1034, 1190, 1410, 1674, 1939, 2224, 2600, 3084, 3613, 4163, 4824, 5684, 6697, 7776
Offset: 1

Views

Author

Jonathan Vos Post, Feb 03 2005

Keywords

Comments

k=4 case of the family of sequences whose k=1 case is the Fibonacci sequence A000045, k=2 case is the Padovan sequence A000931 (offset so as to begin 1,1,1) and k=3 case is A079398 (offset so as to begin 1,1,1,1).
The general case for integer k>1 is defined: a(1) = a(2) = ... = a(k+1) and for n>(k+1) a(n) = a(n-k) + a(n-[k+1]).
For this k=4 case, the ratio of successive terms a(n)/a(n-1) approaches the unique positive root of the irreducible characteristic polynomial: x^5 - x - 1 = 0, A160155.
The sequence of prime values in this k=4 case is A103382; The sequence of semiprime values in this k=4 case is A103392.

Examples

			a(14) = 5 because a(14) = a(14-4) + a(14-5) = a(10) + a(9) = 3 + 2 = 5.
		

References

  • Zanten, A. J. van, The golden ratio in the arts of painting, building and mathematics, Nieuw Archief voor Wiskunde, 4 (17) (1999) 229-245.

Crossrefs

Programs

  • Mathematica
    k = 4; Do[a[n] = 1, {n, k + 1}]; a[n_] := a[n] = a[n - k] + a[n - k - 1]; Array[a, 61]
    LinearRecurrence[{0,0,0,1,1},{1,1,1,1,1},70] (* Harvey P. Dale, Apr 22 2015 *)
  • PARI
    a(n)=([0,1,0,0,0; 0,0,1,0,0; 0,0,0,1,0; 0,0,0,0,1; 1,1,0,0,0]^(n-1)*[1;1;1;1;1])[1,1] \\ Charles R Greathouse IV, Oct 03 2016

Formula

G.f. -x*(1+x)*(1+x^2) / ( -1+x^4+x^5 ). - R. J. Mathar, Aug 26 2011
a(n) = A124789(n-2)+A124798(n-1). - R. J. Mathar, Jun 30 2020

Extensions

Edited by Ray Chandler and Robert G. Wilson v, Feb 06 2005

A124797 Sum of cyclic permutations of 123...n seen as number written in base n+1: ((n+1)^n-1)*(n+1)/2.

Original entry on oeis.org

1, 12, 126, 1560, 23325, 411768, 8388604, 193710240, 4999999995, 142655835300, 4458050224122, 151437553296120, 5556003412779001, 218946945190429680, 9223372036854775800, 413620130943168382080, 19673204037648268787703
Offset: 1

Views

Author

M. F. Hasler, Nov 07 2006

Keywords

Comments

Sequence A083956 becomes "unnatural" for n>9. The present sequence is more universal since 10 is not singled out as a particular value. See A124798 for the sequence of digits of a(n) in base n+1 and for more results.

Examples

			a(2) = 12[3] + 21[3] = 110[3] = 12[10] where [b] indicates the basis b in which the number is written;
a(3) = 123[4] + 231[4] + 312[4] = 126[10];
a(4) = 1234[5] + 2341[5] + 3412[5] + 4123[5] = 22220[5] = 1560[10],...
		

Crossrefs

Programs

  • Magma
    [((n + 1)^n - 1)*(n + 1) div 2: n in [1..20]]; // Vincenzo Librandi, Jan 09 2013
  • Maple
    a:=proc(n) local b,m,i,s; b:=n+1: m:=add(i*b^(n-i),i=1..n): s:=m: for i to n-1 do m:=b^(n-1)*modp(m,b)+iquo(m,b): s:=s+m: od: s end; # or simply # a := n -> (n+1)/2*((n+1)^n-1)
  • Mathematica
    Table[((n+1)^n-1)*(n+1)/2, {n,22}] (* Vladimir Joseph Stephan Orlovsky, Dec 28 2010 *)

Formula

a(n) = (n+1)/2*((n+1)^n-1).
Showing 1-2 of 2 results.